/**
 * Sign-in route styles for /civic-action (logged-out) and /civic-action/sign-in.
 *
 * The light "brutalist" sign-in (#13): a flat cream page (no orbs) with a
 * "Welcome To Civic Action" hero, a "How it works" step strip and a single
 * bordered card whose panels (sign-in / sign-up / reset / magic-link) swap
 * client-side. Inputs and buttons follow the site's 2px-ink-border +
 * `4px 4px 0` offset-shadow language, with orange primary actions.
 *
 * Loaded exclusively by templates/routes/sign-in.php (via $iod_styles), so the
 * authed-app component styles never ship to logged-out visitors. Assumes
 * base.css (tokens, reset, .app / .screen) is already present.
 */

/* The sign-in screen wants more room than base.css's 720px .app for the wide
   hero. sign-in.css only ships on this route, so widening .app here is safe. */
.app {
    max-width: 860px
}

#screen-signin {
    padding: 0
}

.signin-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 22px 64px;
    text-align: center;
}

/* ---- Hero ---- */
.signin-hero {
    margin-bottom: 40px
}

.hero-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(40px, 8vw, 72px);
    line-height: 1.02;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 18px;
}

.hero-lead {
    font-weight: 700;
    font-size: clamp(15px, 2.4vw, 18px);
    color: var(--text);
    margin: 0 auto 16px;
    max-width: 640px;
}

.hero-body {
    font-size: clamp(14px, 2.2vw, 16px);
    color: var(--sub);
    line-height: 1.7;
    margin: 0 auto;
    max-width: 640px;
}

.hero-body b {
    color: var(--text);
    font-weight: 700
}

/* ---- How it works step strip ---- */
.how-it-works {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin-top: 34px;
    font-size: 15px;
    font-weight: 700;
}

.hiw-label {
    color: var(--text)
}

.hiw-step {
    color: var(--text)
}

.hiw-arrow {
    color: var(--o500);
    font-weight: 700
}

/* ---- Card ---- */
.auth-card {
    max-width: 626px;
    margin: 44px auto 0;
    background: var(--card);
    border: 2px solid var(--ink-shadow);
    border-radius: 4px;
    padding: 48px 56px 56px;
    text-align: left;
}

.auth-panel {
    display: none
}

.auth-panel.active {
    display: block;
    animation: fadeUp .3s ease
}

.panel-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -.4px;
    margin-bottom: 40px;
}

.panel-sub {
    font-size: 14px;
    color: var(--sub);
    line-height: 1.6;
    margin-bottom: 22px;
}

/* ---- Sign-in options row (remember / forgot) ---- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 22px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--ink-shadow);
    border-radius: 2px;
    background: var(--card);
    cursor: pointer;
    position: relative;
    flex: none;
}

.checkbox input:checked {
    background: var(--o500);
    border-color: var(--ink-shadow)
}

.checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* ---- OR divider ---- */
.or-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.or-divider::before,
.or-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background: var(--muted);
}

/* ---- Google button: our own themed control (see sign-in.js). The native GIS
   button is a cross-origin iframe we can't style, so we render a brutalist
   .btn instead and drive Google's OAuth popup from its click. ---- */
.gbtn-wrap {
    margin-bottom: 20px;
}

/* Change this one value to resize the Google logo. */
.btn-google .gbtn-logo {
    width: 24px;
    height: auto;
    flex: none;
}

/* ---- Links & footers ---- */
.link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--sub);
    cursor: pointer;
    text-decoration: none;
}

.link-btn:hover {
    color: var(--text);
    text-decoration: underline
}

.link-btn.strong {
    color: var(--o600);
    font-weight: 700
}

.link-btn.strong:hover {
    color: var(--o500)
}

.auth-foot {
    margin-top: 56px;
    text-align: center;
    font-size: 14px;
    color: var(--sub);
    line-height: 1.6;
}

.auth-foot .link-btn {
    font-size: 18px;
}

/* ---- Inline messages ---- */
.auth-err {
    display: none;
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 14px;
}

.auth-err.show {
    display: block
}

.auth-ok {
    display: none;
    font-size: 13px;
    color: var(--green);
    background: rgba(21, 128, 61, .08);
    border: 2px solid var(--green);
    border-radius: 2px;
    padding: 12px 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.auth-ok.show {
    display: block
}

.auth-ok b {
    color: var(--text);
    display: block;
    margin-bottom: 3px
}

/* ---- Magic-link verification overlay (restyled light) ---- */
.ml-verify {
    position: fixed;
    inset: 0;
    background: rgba(20, 17, 15, .55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.ml-verify.show {
    display: flex
}

.ml-verify-card {
    background: var(--card);
    border: 2px solid var(--ink-shadow);
    border-radius: 4px;
    box-shadow: 6px 6px 0 var(--ink-shadow);
    padding: 40px 32px;
    max-width: 360px;
    text-align: center;
}

.ml-verify-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 20px;
    border: 4px solid var(--border2);
    border-top-color: var(--o500);
    border-radius: 50%;
    animation: mlspin .8s linear infinite;
}

@keyframes mlspin {
    to {
        transform: rotate(360deg)
    }
}

.ml-verify-title {
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px
}

.ml-verify-sub {
    font-size: 14px;
    color: var(--sub);
    line-height: 1.5
}

.ml-verify.error .ml-verify-spinner {
    border-color: var(--red);
    border-top-color: var(--red);
    animation: none
}

.ml-verify.error .ml-verify-title {
    color: var(--red)
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .signin-wrap {
        padding: 36px 16px 48px
    }

    .auth-card {
        padding: 32px 24px 40px
    }

    .how-it-works {
        font-size: 13px;
        gap: 6px 8px
    }
}
