/* Sign-in and sign-up as the app draws them (18 Oct 2026, Michael: "the web
 * sign up does not mirror the app"). Mirrors login_screen.dart and
 * signup_screen.dart: an app bar with only a back arrow (to Home), then one
 * centred column — the CutQ lockup, the title and its line, the Apple and
 * Google buttons when switched on, the form, the "Already have an account?"
 * line. No top bar with a second Sign in link, no card, no marketing panel:
 * the app has none of them. Desktop keeps the same column, centred. Loaded
 * after auth.css on both pages. */

.auth-body {
    background: var(--brand-white, #ffffff);
}

/* AppBar(leading: Icons.adaptive.arrow_back → context.go('/')) */
.auth-appbar {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 max(8px, env(safe-area-inset-left, 0px));
}

.auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: var(--brand-primary, #111111);
    text-decoration: none;
}

.auth-back:hover {
    background: rgba(17, 17, 17, 0.05);
}

.auth-back svg {
    width: 24px;
    height: 24px;
}

.auth-main {
    display: block;
    min-height: 0;
    padding: 0 24px 32px;
}

/* 400 px: Google draws Continue with Google no wider than 400 (GIS), so the
 * column is 400 and Apple, Google, the fields and Sign in share one width
 * and one pair of edges — Apple's no narrower than Sign in (HIG). Phones are
 * narrower than this anyway (24 px margins). Scoped to .auth-body so it
 * outranks signup.css's later .auth-card.auth-card-wide { max-width: 560px }. */
.auth-body .auth-card,
.auth-body .auth-card.auth-card-wide {
    max-width: 400px;
    margin: 0 auto;
    padding: 8px 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    /* Not a scroll box (auth.css): the page scrolls, so the footer below
     * sticks to the screen and its hairline can run edge to edge. */
    overflow: visible;
}

.auth-image {
    display: none;
}

/* Center(Column(CutQueueLogoImage, 20, title, 6, line)) */
.auth-welcome {
    text-align: center;
    margin-bottom: 24px;
}

/* CutQueueLogoImage: the app's own lockup file (assets/3.0x/logo.png, the
 * 110×40 framing) at kCutQueueLogoHeight 28, so it is the app's size and
 * truly centred — the site-wide logo.png is a 600×150 canvas with the
 * lockup in its left half. */
.auth-logo {
    display: block;
    width: auto;
    height: 28px;
    object-fit: contain;
    margin: 0 auto 20px;
}

.auth-welcome .auth-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.auth-welcome .auth-subtitle {
    font-size: 15px;
    line-height: 1.45;
    color: var(--brand-gray-dark, #555555);
    margin: 0;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

/* Sign-up's fields carry their name inside, with the glyph (InputDecoration
 * labelText + prefixIcon); the email line sits right under its field, and an
 * error takes its place, as Flutter's helper/error text does. */
#signupForm .form-hint {
    margin-top: 6px;
    padding-left: 14px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--brand-gray-dark, #555555);
}

#signupForm .form-group:has(.form-error:not(:empty)) > .form-hint:not(#passwordRequirements) {
    display: none;
}

#signupForm .terms-checkbox {
    margin-top: 8px;
}


.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    margin: 0;
}

/* No room held for an error that is not there: Flutter's field takes no
 * space for an absent errorText, so the fields sit 16 px apart. */
.auth-form .form-error:empty {
    min-height: 0;
    margin: 0;
}

.auth-footer {
    padding-top: 0;
}

/* "Forgot password?" is a CqLink on the right under the password field
 * (login_screen.dart): accent, underlined, a 44 pt target. */
.form-options.form-options-end {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin: -4px 0 16px;
}

.form-options-end .forgot-password-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--brand-accent, #3441B5);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Complete profile (complete_profile_screen.dart): first name and surname
 * side by side at every width (Row, 12 apart), fields 16 apart, the phone's
 * helper line small and italic (helperStyle 12, italic), Continue 28 below. */
#completeProfileForm .form-row {
    flex-direction: row;
    gap: 12px;
    margin-bottom: 16px;
}

#completeProfileForm .form-row .form-group {
    margin-bottom: 0;
    min-width: 0;
}

#completeProfileForm .form-hint {
    margin-top: 6px;
    padding-left: 14px;
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
    color: var(--brand-gray-dark, #555555);
}

#completeProfileForm .form-message:not([style*="none"]) {
    margin-top: 16px;
}

#completeProfileForm .auth-submit {
    margin-top: 28px;
}

/* "Don't have an account? Sign up" / "Already have an account? Sign in"
 * under a hairline, held in view at the foot of the screen whenever the
 * form is taller than it (the app pins it: AuthSwitchFooter, as Instagram,
 * Threads and Facebook do). */
.auth-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 24px -24px 0;
    padding: 6px 24px max(6px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border, #E5E5E5);
    background: var(--brand-white, #ffffff);
}

.auth-footer p {
    min-height: 44px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 4px;
}

/* Every sign-in button on these pages is 40 px: Google's own renderer draws
 * Continue with Google no taller than 40 (GIS size "large"), Apple asks that
 * Continue with Apple be "no smaller than other sign-in buttons", and Google
 * that its button be "at least as prominent" as other providers' — so the
 * email Sign in / Continue matches them (40 is also Material 3's button
 * height). The app draws all three at 48. */
.auth-form .auth-submit {
    height: 40px;
    min-height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

/* One paint (18 Oct 2026, Michael: "they seem to load the old page first
 * then switches to the new page"): while html.auth-pending is set the form
 * is laid out but not painted, so it never shows without its Apple and
 * Google buttons and then jumps down when they arrive. The app bar stays.
 * customer-auth.js liftAuthPending() removes it (AuthPaintGate in the app). */
.auth-pending .auth-main {
    visibility: hidden;
}

/* The buttons' place, held before their script arrives (login.html,
 * signup.html #socialAuthPlaceholder): the same boxes as social-sign-in.js
 * draws — two 40 px buttons 12 apart, the 13 px consent line 12 below, the
 * "or" divider 24 below that, 24 above the form — invisible. mount() swaps
 * the real section in at the same size, so nothing below moves. */
.cq-social-placeholder {
    visibility: hidden;
    margin: 0 0 24px;
}
.cq-social-placeholder .cq-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}
.cq-ph-button {
    height: 40px;
}
.cq-ph-terms {
    margin: 12px auto 0;
    max-width: 400px;
    text-wrap: balance;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
}
.cq-ph-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
    font-size: 13px;
}
