/* =============================================================================
   Del Plaza — auth
   Auth page (sign-in / create account) & responsive
   =============================================================================*/

/* Auth Page — Customer Sign In / Create Account (/login.php)*/
.auth-page__title {
  font-family: 'Univers', var(--font-primary);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-content-heading);
  margin-bottom: var(--spacing-xxs);
  padding-bottom: var(--spacing-xxs);
  border-bottom: 1px solid var(--color-border-primary);
}

.auth-page__lead {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-content-primary);
  max-width: 640px;
  margin-bottom: var(--spacing-md);
}

/* ---- Auth Page Shell ----*/
.auth-page {
  padding-top: 2.25rem; /* 36px — overrides .main-content top padding*/
}

/* ---- Breadcrumb ----*/
.auth-breadcrumb {
  padding: var(--spacing-xs) 0 var(--spacing-xxs);
}

.auth-breadcrumb .breadcrumb {
  margin-bottom: 0;
}

.auth-breadcrumb .breadcrumb-item {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.auth-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--cognac);
  content: "\203A";
}

.auth-breadcrumb .breadcrumb-item a {
  color: var(--color-content-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.auth-breadcrumb .breadcrumb-item a:hover {
  color: var(--cognac);
}

.auth-breadcrumb .breadcrumb-item.active {
  color: var(--color-content-heading);
  font-weight: 600;
}

/* ---- Auth Sections (Cards) ----*/
.auth-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md); /* sharp top, rounded bottom*/
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease-out);
}

.auth-section:hover {
  box-shadow: var(--shadow-light);
}

.auth-section__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-xs);
  background-color: var(--color-surface-header-tint);
}

.auth-section__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0 0 9px 9px;
  background-color: var(--cognac);
  color: #ffffff;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Icon-step variant — mirrors checkout-section__step--icon*/
.auth-section__step--icon {
  background-color: var(--deep-navy);
  font-size: 1rem;
  padding-top: 0.125rem;
}

.auth-section__title {
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.15;
  color: var(--color-content-heading);
  margin-bottom: 0;
  padding-right: calc(1.75rem + var(--spacing-xxs));
  padding-bottom: var(--spacing-xxs);
  border-bottom: 2px solid var(--deep-navy);
  flex: 1 1 auto;
  min-width: 0;
}

.auth-section__body {
  padding: var(--spacing-xs);
  flex: 1 1 auto;
}

.auth-section__intro {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-content-primary);
  margin-bottom: var(--spacing-xs);
}

.auth-section__foot {
  padding: var(--spacing-xs);
  border-top: 1px solid var(--color-border-primary);
  background-color: var(--color-surface-header-tint);
}

/* ---- Login variant: Deep Navy hospitality surface ----*/
.auth-section--login {
  background-color: var(--deep-navy);
  border-color: var(--color-border-on-dark);
}

.auth-section--login:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.auth-section--login .auth-section__header {
  background-color: rgba(247, 238, 218, 0.05);
}

.auth-section--login .auth-section__title {
  color: var(--color-content-on-dark);
  border-bottom-color: var(--cognac);
}

.auth-section--login .auth-section__step {
  background-color: var(--cognac);
}

.auth-section--login .auth-section__intro {
  color: var(--color-content-on-dark);
}

.auth-section--login .auth-section__foot {
  border-top-color: var(--color-border-on-dark);
  background-color: rgba(247, 238, 218, 0.05);
}

.auth-section--login .form-label {
  color: var(--color-content-on-dark);
}

/* ---- Form Controls (auth-scoped, mirrors checkout patterns) ----*/
.auth-page .form-label {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-content-heading);
  margin-bottom: var(--spacing-quark);
}

.auth-page .form-control,
.auth-page .form-select {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--color-content-primary);
  background-color: #ffffff;
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 9px 9px;
  padding: 0.625rem 0.875rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.auth-page .form-control::placeholder {
  color: var(--color-content-muted);
  font-weight: 300;
  font-size: 0.875rem;
}

.auth-page .form-control:focus,
.auth-page .form-select:focus {
  border-color: var(--cognac);
  box-shadow: 0 0 0 2px rgba(162, 99, 48, 0.15);
  outline: none;
}

.auth-page .form-control.is-invalid,
.auth-page .form-select.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

.auth-page .form-control.is-valid,
.auth-page .form-select.is-valid {
  border-color: var(--deep-navy);
  box-shadow: 0 0 0 2px rgba(60, 71, 122, 0.12);
}

/* ---- Input Group (password reveal toggle) ----
   Field and toggle are one control in the house geometry: sharp on top, rounded along
   the bottom. Each carries its own bottom corner — the field the left, the toggle the
   right — rather than the group rounding them by clipping. An overlay clips a square
   corner; it does not curve it, so the field's bottom-left corner was sliced away
   instead of rounded, leaving the bite that showed on Password and Confirm Password.
   The group paints nothing of its own, so it needs neither a radius nor a clip — and
   without the clip, the field's focus ring is no longer cut off at the edges. */
.auth-page .input-group > .form-control {
  border-radius: 0 0 0 9px;
}

.auth-password-toggle {
  background-color: var(--color-surface-secondary);
  border: 1px solid var(--color-border-primary);
  border-left: none;
  border-radius: 0 0 9px 0;
  color: var(--color-content-primary);
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  padding: 0.625rem 0.75rem;
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.auth-password-toggle:hover {
  background-color: #ffffff;
  color: var(--deep-navy);
}

.auth-password-toggle.is-pressed {
  color: var(--cognac);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--cognac);
  outline-offset: -2px;
}

/* ---- Checkboxes (Bootstrap override) ----*/
.auth-page .form-check {
  min-height: 1.5rem;
  margin-bottom: var(--spacing-nano);
}

.auth-page .form-check-input {
  border-color: var(--color-border-primary);
  border-radius: 0 0 3px 3px;
  margin-top: 0.15rem;
}

.auth-page .form-check-input:checked {
  background-color: var(--color-interactive-primary);
  border-color: var(--color-interactive-primary);
}

.auth-page .form-check-input:focus {
  border-color: var(--cognac);
  box-shadow: 0 0 0 2px rgba(162, 99, 48, 0.15);
}

.auth-page .form-check-label {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-content-primary);
}

/* Dark login variant: re-tune checkbox & label for the Deep Navy surface*/
.auth-section--login .form-check-label {
  color: var(--color-content-on-dark);
}

.auth-section--login .form-check-input {
  background-color: rgba(247, 238, 218, 0.08);
  border-color: rgba(247, 238, 218, 0.55);
}

.auth-section--login .form-check-input:checked {
  background-color: var(--cognac);
  border-color: var(--cognac);
}

.auth-section--login .form-check-input:focus {
  border-color: var(--cognac);
  box-shadow: 0 0 0 2px rgba(162, 99, 48, 0.35);
}

/* ---- Auth Links ----*/
.auth-link {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--deep-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease-out);
}

.auth-link:hover {
  color: var(--cognac);
}

.auth-link--inline {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.auth-section--login .auth-link {
  color: var(--color-content-on-dark);
}

.auth-section--login .auth-link:hover {
  color: var(--cognac);
}

/* ---- Form Hint ----*/
.auth-page .form-message--hint {
  color: var(--color-content-muted);
  font-weight: 300;
  font-size: 0.6875rem;
}

/* ---- Password Strength Meter ----*/
.auth-password-strength {
  display: flex;
  align-items: center;
  gap: var(--spacing-nano);
  margin-top: var(--spacing-nano);
}

.auth-password-strength__meter {
  display: flex;
  gap: var(--spacing-tiny);
  flex: 1 1 auto;
  max-width: 10rem;
}

/* Four steps of one track. They keep a single line: the filled step used to lift 1px,
   which on a 4px bar took its whole edge out of line with the steps beside it, so a
   half-filled meter read as broken rather than as a meter. The fill now advances left to
   right along the track and the step's own colour carries the strength. */
.auth-password-strength__segment {
  height: 4px;
  flex: 1 1 0;
  background-color: var(--muted-silver);
  border-radius: 0 0 3px 3px;
  transition: background-color 0.3s var(--ease-out);
}

/* Strength is read the classic way — red at the weakest step through to green at the
   strongest. These four values are Bootstrap's own semantic colours and are the one
   deliberate exception to the house palette: Cognac and Imperial Plum are the house's
   words, and neither says anything about how strong a password is. Do not "correct"
   them back to palette tokens. */
.auth-password-strength__segment[data-level="1"].is-filled { background-color: #dc3545; }
.auth-password-strength__segment[data-level="2"].is-filled { background-color: #fd7e14; }
.auth-password-strength__segment[data-level="3"].is-filled { background-color: #ffc107; }
.auth-password-strength__segment[data-level="4"].is-filled { background-color: #198754; }

.auth-password-strength__label {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.6875rem;
  color: var(--color-content-muted);
  text-transform: uppercase;
}

.auth-password-strength__label.has-score {
  color: var(--color-content-heading);
  font-weight: 600;
}

/* ---- Submit Buttons (dark-surface variant for login) ----*/
.auth-section--login .btn-primary {
  --bs-btn-bg: var(--cognac);
  --bs-btn-border-color: var(--cognac);
  --bs-btn-hover-bg: var(--tawny-umber);
  --bs-btn-hover-border-color: var(--tawny-umber);
  --bs-btn-active-bg: var(--imperial-plum);
  --bs-btn-active-border-color: var(--imperial-plum);
}

/* ---- Guarantee Strip ----*/
.auth-guarantee {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-nano);
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--color-content-primary);
  line-height: 1.5;
}

.auth-guarantee i {
  font-size: 1.125rem;
  color: var(--cognac);
  flex-shrink: 0;
}

.auth-guarantee strong {
  font-weight: 600;
  color: var(--color-content-heading);
}

.auth-section--login .auth-guarantee {
  color: var(--color-content-on-dark);
}

.auth-section--login .auth-guarantee strong {
  color: #ffffff;
}

/* ---- The notice panel on the dark sign-in card

   The panel itself, its sizes and its grounds moved to the shared layer
   (public/css/components.css) when the merchant's door began showing one too. What stays
   here is the card's own ink: the same panel standing inside the Deep Navy sign-in card,
   which takes the card's cognac rather than a type colour of its own. */
.auth-section--login .auth-success {
  background-color: rgba(247, 238, 218, 0.06);
  border-color: var(--cognac);
}

.auth-section--login .auth-success__icon {
  color: var(--cognac);
}

.auth-section--login .auth-success__text {
  color: var(--color-content-on-dark);
}

.auth-section--login .auth-success__text strong {
  color: #ffffff;
}

/* ---- Form-Level Failure Alert (create-account card)

   When a sign-up submission is held back, the field slots below carry each reason — but a
   card that fails has to say so out loud, at the top, before the customer scrolls for the
   red borders. This panel is that announcement: the same finished geometry as the session
   flash (sharp top, generous foot, a 3px lintel), toned Imperial Plum by the --alert-accent
   variable, Parchment Cream body on a Muted Silver hairline. It lists every blocked reason
   and each line is a control that returns focus to its field, so the customer is never left
   with a red box and no explanation.

   role="alert" (assertive) is on the element; it is emptied and hidden the moment the
   customer corrects a field, and re-announced on the next refused submit. */
.auth-form-alert {
  --alert-accent: var(--imperial-plum);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xxs);
  padding: var(--spacing-xxs) var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
  background-color: var(--parchment-cream);
  border: 1px solid var(--color-border-primary);
  border-top: 3px solid var(--alert-accent);
  border-radius: 0 0 12px 12px;
}

.auth-form-alert[hidden] {
  display: none;
}

/* The panel's arrival is an event, not a fade-in: it settles into place. */
.auth-form-alert:not([hidden]) {
  animation: authAlertSettle 0.28s var(--ease-out) both;
}

@keyframes authAlertSettle {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-alert:not([hidden]) {
    animation: none;
  }
}

.auth-form-alert__icon {
  font-size: 1.375rem;
  color: var(--alert-accent);
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.auth-form-alert__body {
  flex: 1;
  min-width: 0;
}

.auth-form-alert__title {
  display: block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--color-content-heading);
  margin-bottom: var(--spacing-quark);
}

.auth-form-alert__list {
  margin: 0;
  padding-left: 1.125rem;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-content-primary);
}

.auth-form-alert__list li + li {
  margin-top: var(--spacing-quark);
}

/* Each reason returns focus to its own field — a control, so it is a button reset to type. */
.auth-form-alert__link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--imperial-plum);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s var(--ease-out);
}

.auth-form-alert__link:hover {
  color: var(--deep-navy);
}

.auth-form-alert__link:focus-visible {
  outline: 2px solid var(--deep-navy);
  outline-offset: 2px;
}

/* ---- Benefits Band ----*/
.auth-benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xxs);
  height: 100%;
  padding: var(--spacing-xxs);
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.auth-benefit:hover {
  box-shadow: var(--shadow-light);
  transform: translateY(-4px);
}

.auth-benefit i {
  font-size: 1.375rem;
  color: var(--cognac);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.auth-benefit__title {
  display: block;
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-content-heading);
  margin-bottom: var(--spacing-quark);
}

.auth-benefit__text {
  display: block;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-content-primary);
}

/* =============================================================================
   Auth Page — Responsive
   =============================================================================*/
@media (max-width: 991.98px) {
  .auth-page__title {
    margin-bottom: var(--spacing-xs);
  }
}

@media (max-width: 575.98px) {
  .auth-section__header {
    padding: var(--spacing-xs);
  }

  .auth-section__body {
    padding: var(--spacing-xxs);
  }

  .auth-section__foot {
    padding: var(--spacing-xxs);
  }
}

