/* Phase 3.6.5 — transactional/authentication surfaces.
 * Deliberately scoped to .as-auth-shell so loading it from base.html cannot
 * restyle ordinary public marketing pages.
 */

.as-auth-shell,
.as-auth-shell * {
  box-sizing: border-box;
}

.as-auth-shell .as-auth-grid,
.as-auth-shell .as-auth-copy,
.as-auth-shell .as-auth-card,
.as-auth-shell form,
.as-auth-shell label {
  min-width: 0;
}

.as-auth-shell .as-auth-grid {
  align-items: start;
  gap: clamp(22px, 4vw, 56px);
}

.as-auth-shell .as-auth-copy {
  position: sticky;
  top: 96px;
}

.as-auth-shell .as-auth-copy h1,
.as-auth-shell .as-auth-card h2 {
  overflow-wrap: anywhere;
}

.as-auth-shell .as-auth-card {
  display: grid;
  gap: 15px;
  width: 100%;
  max-width: 620px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(212, 175, 55, .22);
  background:
    radial-gradient(circle at 100% 0, rgba(136, 255, 0, .035), transparent 30%),
    linear-gradient(180deg, rgba(11, 15, 18, .97), rgba(3, 6, 7, .99));
  box-shadow: 0 22px 64px rgba(0, 0, 0, .28);
}

.as-auth-shell .as-auth-card__heading {
  margin-bottom: 2px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(212, 175, 55, .14);
}

.as-auth-shell .as-auth-card__heading > span,
.as-auth-shell .as-eyebrow {
  color: var(--as-lime);
}

.as-auth-shell form.as-auth-card,
.as-auth-shell .as-auth-card form,
.as-auth-shell form.as-form {
  display: grid;
  gap: 14px;
}

.as-auth-shell form > label,
.as-auth-shell .as-auth-card label {
  display: grid;
  gap: 7px;
  color: #e7ecee;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.as-auth-shell label small,
.as-auth-shell .as-form-note,
.as-auth-shell .as-auth-card__foot {
  color: var(--as-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.as-auth-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.as-auth-shell select,
.as-auth-shell textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0;
  color: var(--as-white);
  background: #030607;
  outline: none;
  font: 500 .92rem/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.as-auth-shell textarea {
  min-height: 128px;
  resize: vertical;
}

.as-auth-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover,
.as-auth-shell select:hover,
.as-auth-shell textarea:hover {
  border-color: rgba(212, 175, 55, .48);
}

.as-auth-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus-visible,
.as-auth-shell select:focus-visible,
.as-auth-shell textarea:focus-visible {
  border-color: var(--as-lime);
  box-shadow: 0 0 0 3px rgba(136, 255, 0, .10);
}

.as-auth-shell input[aria-invalid="true"] {
  border-color: #ff6b6b;
}

.as-auth-shell .as-check-control,
.as-auth-shell label:has(> input[type="checkbox"]),
.as-auth-shell label:has(> input[type="radio"]) {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #d6dde0;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
}

.as-auth-shell input[type="checkbox"],
.as-auth-shell input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--as-lime);
}

.as-auth-shell .as-button--block,
.as-auth-shell form > .as-button,
.as-auth-shell form > button:not(.as-purchase-choice) {
  width: 100%;
  justify-content: center;
}

.as-auth-shell .as-purchase-choice {
  width: 100%;
  min-width: 0;
}

.as-auth-shell .as-purchase-choice span,
.as-auth-shell .as-purchase-choice strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.as-auth-shell .as-form-note {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(212, 175, 55, .14);
  background: rgba(212, 175, 55, .025);
}

.as-auth-shell .as-form-note > :first-child {
  margin-top: 0;
}

.as-auth-shell .as-form-note > :last-child {
  margin-bottom: 0;
}

.as-auth-shell .as-form-note label + label {
  margin-top: 10px;
}

.as-auth-shell .as-auth-points {
  padding-left: 1.15rem;
}

.as-auth-shell .as-auth-points li + li {
  margin-top: 7px;
}

.as-auth-shell .as-config-warning {
  padding: 15px 16px;
  border: 1px solid rgba(212, 175, 55, .24);
  border-left: 3px solid var(--as-gold);
  background: rgba(212, 175, 55, .035);
}

@media (max-width: 820px) {
  .as-auth-shell .as-auth-grid {
    grid-template-columns: 1fr;
  }

  .as-auth-shell .as-auth-copy {
    position: static;
  }

  .as-auth-shell .as-auth-card {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .as-auth-shell .as-auth-card {
    padding: 17px;
  }

  .as-auth-shell .as-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .as-auth-shell .as-actions .as-button,
  .as-auth-shell .as-purchase-choice {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-auth-shell input,
  .as-auth-shell select,
  .as-auth-shell textarea {
    transition: none;
  }
}
