/**
 * Auth pages (sign in / sign up), light Banana Computer / hero language.
 * Yellow is the primary fill (buttons, highlight, selected plan).
 */

:root {
    --auth-dark:      #0F172A;
    --auth-dark-hover:#1E293B;
    --auth-accent:    #FF9A00;
    --auth-yellow:    #FFD93D;
    --auth-border:    #E2E8F0;
    --auth-muted:     #64748B;
    --auth-bg:        #FAFAFA;
}

body.auth-body {
    background: var(--auth-bg);
    color: var(--auth-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}
body.auth-body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 50% at 18% 12%, rgba(255, 217, 61, 0.32), transparent 62%),
                radial-gradient(ellipse 45% 40% at 92% 80%, rgba(255, 154, 0, 0.12), transparent 58%);
}
body.auth-body > * { position: relative; z-index: 1; }

::selection { background: var(--auth-yellow); color: var(--auth-dark); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--auth-bg); }
::-webkit-scrollbar-thumb { background: var(--auth-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #CBD5E1; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4375rem;
}

/* Used when the label shares a row with a helper link. */
.auth-label--inline { margin-bottom: 0; }

.auth-input {
    width: 100%;
    height: 2.875rem;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
    color: var(--auth-dark);
    background: #FFFFFF;
    border: 1px solid var(--auth-border);
    border-radius: 0.625rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-input::placeholder { color: #94A3B8; }

.auth-input:hover:not(:focus) { border-color: #CBD5E1; }

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(255, 154, 0, 0.14);
}

/* Password field leaves room for the reveal toggle. */
.auth-input--password { padding-right: 2.875rem; }

.auth-input.has-error {
    border-color: #DC2626;
}
.auth-input.has-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.auth-error {
    display: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: #DC2626;
    margin-top: 0.375rem;
}
.auth-error.is-visible { display: block; }

.auth-reveal {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #94A3B8;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 140ms ease, background-color 140ms ease;
}
.auth-reveal:hover { color: #475569; background: #F1F5F9; }
.auth-reveal:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 1px;
}

/* Checkbox, native control, restyled just enough to match. */
.auth-check {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 1.0625rem;
    height: 1.0625rem;
    margin: 0;
    border: 1px solid #CBD5E1;
    border-radius: 0.3125rem;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background-color 120ms ease, border-color 120ms ease;
}
.auth-check:checked {
    background: var(--auth-yellow);
    border-color: var(--auth-yellow);
}
.auth-check:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid var(--auth-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.auth-check:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}
.auth-check.has-error { border-color: #DC2626; }

/* ============================================================
   BUTTONS
   ============================================================ */

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.875rem;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, filter 140ms ease;
}

.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* The Tailwind play CDN injects its utilities after this file, so `.hidden`
   would otherwise lose to `.auth-btn` on equal specificity. */
.auth-btn.hidden,
.auth-btn[hidden] { display: none; }

.auth-btn--primary {
    width: 100%;
    background: var(--auth-yellow);
    color: var(--auth-dark);
}
.auth-btn--primary:hover:not(:disabled) { filter: brightness(1.04); }
.auth-btn--primary:focus-visible {
    outline: 2px solid var(--auth-dark);
    outline-offset: 2px;
}

.auth-btn--ghost {
    background: #fff;
    color: #475569;
    border-color: var(--auth-border);
    border-radius: 999px;
}
.auth-btn--ghost:hover:not(:disabled) { background: #F8FAFC; color: var(--auth-dark); }

.auth-btn--paypal {
    width: 100%;
    background: #FFFFFF;
    color: #253B80;
    border-color: #CBD5E1;
}
.auth-btn--paypal:hover:not(:disabled) { background: #F8FAFC; border-color: #94A3B8; }

.auth-link {
    color: var(--auth-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(15, 23, 42, 0.25);
    text-underline-offset: 2px;
    transition: text-decoration-color 140ms ease;
}
.auth-link:hover { text-decoration-color: var(--auth-accent); }

.auth-highlight {
    background: var(--auth-yellow);
    display: inline-block;
    padding: 0 0.55rem 0.1rem;
    transform: rotate(-1deg);
    border-radius: 3px;
}

.auth-top-cta {
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: var(--auth-yellow);
    color: var(--auth-dark);
    font-size: 0.8125rem;
    font-weight: 700;
}
.auth-top-cta:hover { filter: brightness(1.04); }

.auth-link--muted {
    color: var(--auth-muted);
    font-weight: 500;
    text-decoration: none;
}
.auth-link--muted:hover { color: var(--auth-dark); }

/* ============================================================
   ALERT
   ============================================================ */

.auth-alert {
    display: none;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #991B1B;
}
.auth-alert.is-visible { display: flex; }

/* ============================================================
   STEPPER (sign up)
   ============================================================ */

.auth-step-track {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-step-bar {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: var(--auth-border);
    transition: background-color 300ms ease;
}
.auth-step-bar.is-done { background: var(--auth-yellow); }

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

/* ============================================================
   PLAN ROWS (sign up, step 2)
   ============================================================ */

.auth-plan {
    display: block;
    position: relative;
    padding: 1rem 1.125rem;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease;
}
.auth-plan:hover { border-color: #CBD5E1; background: #FCFCFD; }

.auth-plan.is-selected {
    border-color: var(--auth-yellow);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--auth-yellow);
}

/* Radio dot */
.auth-plan__dot {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 999px;
    border: 1.5px solid #CBD5E1;
    display: grid;
    place-items: center;
    transition: border-color 140ms ease;
}
.auth-plan.is-selected .auth-plan__dot { border-color: var(--auth-dark); }
.auth-plan__dot::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--auth-yellow);
    transform: scale(0);
    transition: transform 140ms ease;
}
.auth-plan.is-selected .auth-plan__dot::after { transform: scale(1); }

.auth-plan__tag {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--auth-dark);
    background: var(--auth-yellow);
    border: 0;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
}

/* ============================================================
   SHOWCASE PANEL (right column)
   ============================================================ */

.auth-showcase {
    background: transparent;
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--auth-border);
}

.auth-showcase__inner { position: relative; z-index: 1; }

.auth-mat {
    background: #fff;
    padding: 10px 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.28);
}
.auth-mat video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 0.95rem;
    background: #0F172A;
}
.auth-mat figcaption {
    margin: 8px 4px 0;
    font-size: 11px;
    font-weight: 500;
    color: #64748B;
    letter-spacing: 0.02em;
}

.auth-fact {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.auth-fact__mark {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.0625rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--auth-yellow);
    color: var(--auth-dark);
}

/* ============================================================
   MOTION
   ============================================================ */

.auth-fade {
    animation: authFade 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-fade { animation: none; }
    .auth-input, .auth-btn, .auth-plan, .auth-step-bar { transition: none; }
}
