/*
 * Best Before · Auth gate (login / register / lost password / reset password).
 * Loaded only on is_account_page() while logged out (see inc/pages/account.php).
 * Builds on the base .bb-authgate rules in account.css (grid split, mobile
 * stack); this file adds the benefits panel, single-panel screens (lost/reset
 * password) and auth-specific notice spacing. Tokens only, per
 * THEME-ARCHITECTURE rule 6.
 */

.bb-authgate { align-items: stretch; }
.bb-authgate__panel { display: flex; flex-direction: column; }
.bb-authgate__title { margin: 0 0 14px; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.75rem); }
.bb-authgate__lead { margin: 0 0 18px; color: var(--bb-body); font-size: .9375rem; }

/* ---------- Register panel: benefits list ---------- */
.bb-authgate__panel--register { background: var(--bb-ink); color: #fff; border-color: var(--bb-ink); }
.bb-authgate__panel--register h2 { color: var(--bb-yellow); }
.bb-authgate__panel--register .bb-label { color: #fff; }
.bb-authgate__panel--register .bb-urgency { color: var(--bb-yellow); }
.bb-authgate__panel--register .bb-input { background: #fff; color: var(--bb-ink); }
.bb-authgate__panel--register .woocommerce-form-row p,
.bb-authgate__panel--register p { color: rgba(255, 255, 255, .85); }
/* Woo's own registration-privacy-policy link (.woocommerce-privacy-policy-link)
   inherits main.css's default ink-coloured link rule, which is unreadable on
   this dark panel - found during QA (16 Nov 2026). */
.bb-authgate__panel--register a { color: var(--bb-yellow); }
.bb-authgate__panel--register a:hover { color: #fff; }

.bb-authgate__benefits { display: grid; gap: 10px; margin: 0 0 22px; padding: 16px; border-radius: var(--bb-r-tile); background: rgba(255, 255, 255, .06); }
.bb-authgate__benefits li { display: flex; align-items: center; gap: 12px; font-size: .875rem; color: #fff; }
.bb-authgate__benefitval { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 48px; height: 30px; padding: 0 8px; border-radius: var(--bb-r-small); background: var(--bb-yellow); color: var(--bb-ink); font-weight: 800; font-size: .875rem; }
.bb-authgate__benefiticon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--bb-yellow); }
.bb-authgate__benefiticon svg { width: 16px; height: 16px; }

/* Newsletter opt-in checkbox injected into the register form (inc/pages/newsletter.php). */
.bb-authgate__optin { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 16px 0; font-size: .875rem; line-height: 1.5; color: rgba(255, 255, 255, .85); }
/* 20px box centred on the first 21px text line. */
.bb-authgate__optin input { width: 20px; height: 20px; margin: 0; margin-top: calc((1.5em - 20px) / 2); flex: none; }
/* Woo's register notes: same small size and rhythm as the opt-in, so the block reads as one group. */
.woocommerce-form-register > p:not(.form-row):not(:has(button)), .woocommerce-form-register .woocommerce-privacy-policy-text p { margin: 12px 0; font-size: .875rem; line-height: 1.5; color: rgba(255, 255, 255, .75); }

/* ---------- Single-panel screens: lost password, reset password, confirmation ---------- */
.bb-authgate--single { max-width: 460px; }
/* account.css's generic `.woocommerce-ResetPassword { grid-template-columns: repeat(2, 1fr); max-width: 760px }`
   rule (written for Woo's own form-row-first/last markup) doesn't fit this task's
   single-column panel - found during QA (16 Nov 2026). Loads after account.css
   (bbt-auth depends on bbt-account), so this wins on specificity without !important. */
.bb-authgate--single .woocommerce-ResetPassword { display: block; max-width: none; }
.bb-authgate__backlink { margin: 14px 0 0; font-size: .875rem; }
.bb-authgate__backlink a { font-weight: 600; }

/* Notices inside the auth gate sit above the panel they belong to, full width. */
.bb-authgate .woocommerce-NoticeGroup,
.bb-authgate .woocommerce-message,
.bb-authgate .woocommerce-error,
.bb-authgate .woocommerce-info { margin: 0 0 18px; }
.bb-authgate .woocommerce-error li { margin: 0 0 4px; }

@media (max-width: 767px) {
	.bb-authgate__panel--login { order: 1; }
	.bb-authgate__panel--register { order: 2; }
	.bb-authgate--single { max-width: none; }
}
