/**
 * Stigma brutalist auth — Sign In / Sign Up / Lost Password / Reset Password.
 * Loaded only on non-logged-in account pages.
 */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;600;700&family=Bangers&family=JetBrains+Mono:wght@400;700&display=swap');

/* Reset for the auth page (we replace the theme chrome with our own) */
body.woocommerce-account:not(.logged-in) {
    background: #FAF9F4 !important;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23000' fill-opacity='0.10'/%3E%3C/svg%3E") !important;
    font-family: 'Archivo', sans-serif !important;
    color: #0a0a0b !important;
    margin: 0 !important;
}

/* Stigma design tokens (scoped to auth) */
.wccma-auth-page {
    --wccma-accent: #00C8E0;
    --wccma-alt:    #FF1F8F;
    --wccma-ink:    #0a0a0b;
    --wccma-paper:  #fff;
    --wccma-bg:     #FAF9F4;
    --wccma-muted:  #6B6358;
    --wccma-display: 'Bangers', 'Archivo Black', sans-serif;
    --wccma-heavy:   'Archivo Black', sans-serif;
    --wccma-body:    'Archivo', sans-serif;
    --wccma-mono:    'JetBrains Mono', monospace;
    font-family: var(--wccma-body);
    color: var(--wccma-ink);
}
.wccma-auth-page *,
.wccma-auth-page *::before,
.wccma-auth-page *::after { box-sizing: border-box; }
.wccma-auth-page a { color: inherit; text-decoration: none; }
.wccma-auth-page .wccma-accent { color: var(--wccma-accent); }

/* Top nav (logo bar) */
.wccma-auth-nav {
    background: #fff;
    border-bottom: 4px solid #000;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wccma-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--wccma-heavy);
    font-size: 18px;
    color: var(--wccma-ink);
}
.wccma-auth-logo svg { width: 38px; height: 38px; }
.wccma-auth-logo img { max-height: 38px; width: auto; display: block; }
.wccma-auth-logo-word {
    font-family: var(--wccma-heavy);
    font-size: 18px;
    letter-spacing: .04em;
    color: var(--wccma-ink);
    text-transform: uppercase;
}

/* Auth card wrapper with cyan glow behind */
.wccma-auth {
    max-width: 520px;
    margin: 48px auto 64px;
    padding: 0 24px;
    position: relative;
}
.wccma-auth::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 200, 224, 0.35), transparent 60%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

/* Tab toggle (Sign In / Sign Up) */
.wccma-auth-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #000;
    position: relative;
    z-index: 1;
}
.wccma-auth-tab {
    background: transparent;
    border: none;
    padding: 18px 16px;
    font-family: var(--wccma-display);
    font-size: 24px;
    letter-spacing: .04em;
    cursor: pointer;
    color: var(--wccma-ink);
    border-right: 3px solid #000;
    text-transform: uppercase;
    transition: background .12s;
}
.wccma-auth-tab:last-child { border-right: none; }
.wccma-auth-tab:hover { background: var(--wccma-bg); }
.wccma-auth-tab.is-active {
    background: #000;
    color: var(--wccma-accent);
}

/* Auth card (each pane) */
.wccma-auth-card {
    background: #fff;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 var(--wccma-accent);
    padding: 36px;
}
/* When stacked under the toggle, drop the top border so they merge */
.wccma-auth-toggle + .wccma-auth-card,
.wccma-auth-toggle ~ .wccma-auth-card {
    border-top: none;
}
.wccma-auth-card[hidden] { display: none !important; }

/* Card headline */
.wccma-auth-h1 {
    font-family: var(--wccma-display);
    font-size: clamp(38px, 6vw, 48px);
    letter-spacing: .04em;
    margin: 0 0 6px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--wccma-ink);
}
.wccma-auth-h1 .wccma-accent {
    color: var(--wccma-accent);
    filter: drop-shadow(3px 3px 0 #000);
}
.wccma-auth-lead {
    font-size: 14px;
    color: var(--wccma-ink);
    margin: 0 0 24px;
    line-height: 1.4;
}

/* Form field */
.wccma-auth-field { margin-bottom: 16px; }
.wccma-auth-field label {
    display: block;
    font-family: var(--wccma-heavy);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--wccma-ink);
    margin-bottom: 6px;
}
.wccma-auth-input { position: relative; }
.wccma-auth-input input {
    width: 100%;
    padding: 14px 16px;
    border: 3px solid #000;
    background: #fff;
    font-family: var(--wccma-body);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    box-shadow: 4px 4px 0 #000;
    transition: transform .1s, box-shadow .1s;
    color: var(--wccma-ink);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.wccma-auth-input input:focus {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--wccma-accent);
}
.wccma-auth-input input::placeholder { color: var(--wccma-muted); font-weight: 500; }

/* Password show/hide eye */
.wccma-auth-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: var(--wccma-accent);
    border: none;
    width: 50px;
    height: 32px;
    font-family: var(--wccma-heavy);
    font-size: 10px;
    cursor: pointer;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.wccma-auth-eye:hover { background: var(--wccma-accent); color: #000; }

/* Remember + Forgot row */
.wccma-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.wccma-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--wccma-heavy);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--wccma-ink);
    cursor: pointer;
}
.wccma-auth-remember input[type=checkbox] {
    width: 18px;
    height: 18px;
    border: 3px solid #000;
    accent-color: #000;
    cursor: pointer;
    margin: 0;
}
.wccma-auth-forgot {
    font-family: var(--wccma-heavy);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--wccma-ink);
    border-bottom: 2px solid var(--wccma-accent);
    padding-bottom: 1px;
}
.wccma-auth-forgot:hover { color: var(--wccma-accent); }

/* Submit button */
.wccma-auth-submit { margin: 0; }
.wccma-auth-btn {
    width: 100%;
    background: var(--wccma-accent);
    color: #000;
    border: 4px solid #000;
    padding: 18px;
    font-family: var(--wccma-display);
    font-size: 26px;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 6px 6px 0 #000;
    transition: transform .1s, box-shadow .1s;
    line-height: 1.2;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.wccma-auth-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 #000;
    background: var(--wccma-accent);
    color: #000;
}

/* Perks grid (under Sign In) */
.wccma-auth-perks {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 24px;
}
.wccma-auth-perk {
    padding: 14px 12px;
    background: var(--wccma-bg);
    border: 3px solid #000;
    text-align: center;
}
.wccma-auth-perk-ic {
    font-family: var(--wccma-display);
    font-size: 24px;
    color: var(--wccma-accent);
    filter: drop-shadow(2px 2px 0 #000);
    line-height: 1;
}
.wccma-auth-perk-lbl {
    font-family: var(--wccma-heavy);
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--wccma-ink);
    margin-top: 6px;
}

/* "New here?" alt card — clickable to switch to signup */
.wccma-auth-alt-card {
    width: 100%;
    margin-top: 20px;
    background: #000;
    color: #fff;
    border: 4px solid #000;
    padding: 18px 22px;
    box-shadow: 6px 6px 0 var(--wccma-alt);
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
    text-align: left;
    font-family: var(--wccma-body);
    display: block;
}
.wccma-auth-alt-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--wccma-alt);
}
.wccma-auth-alt-l {
    font-family: var(--wccma-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
    color: #888;
    text-transform: uppercase;
}
.wccma-auth-alt-t {
    font-family: var(--wccma-display);
    font-size: 22px;
    margin-top: 6px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.1;
}
.wccma-auth-alt-t .wccma-accent { color: var(--wccma-accent); }

/* Fine print */
.wccma-auth-fineprint {
    font-size: 11px;
    color: var(--wccma-ink);
    margin-top: 14px;
    text-align: center;
    line-height: 1.5;
}
.wccma-auth-fineprint a {
    color: var(--wccma-ink);
    border-bottom: 1.5px solid var(--wccma-accent);
}

/* Back-to-signin link on lost-password */
.wccma-auth-back {
    margin: 20px 0 0;
    text-align: center;
}

/* WC notices (success / error / info) on auth pages */
.wccma-auth .woocommerce-message,
.wccma-auth .woocommerce-error,
.wccma-auth .woocommerce-info,
.wccma-auth-page .woocommerce-message,
.wccma-auth-page .woocommerce-error,
.wccma-auth-page .woocommerce-info {
    background: #000 !important;
    color: #fff !important;
    padding: 12px 16px !important;
    margin: 0 0 18px !important;
    font-family: var(--wccma-mono) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .05em !important;
    border: none !important;
    border-left: 6px solid var(--wccma-alt) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    list-style: none !important;
}
.wccma-auth .woocommerce-message,
.wccma-auth-page .woocommerce-message {
    border-left-color: var(--wccma-accent) !important;
}
.wccma-auth .woocommerce-error li,
.wccma-auth .woocommerce-info li,
.wccma-auth .woocommerce-message li,
.wccma-auth-page .woocommerce-error li,
.wccma-auth-page .woocommerce-info li,
.wccma-auth-page .woocommerce-message li {
    margin: 0; padding: 0; list-style: none;
}
/* Notices need to appear above the card; WC drops them outside our card by default */
.wccma-auth-page .woocommerce-notices-wrapper { margin: 0 0 18px; }

/* Hide theme chrome on auth pages — body has woocommerce-account class */
body.woocommerce-account:not(.logged-in) > .site-header,
body.woocommerce-account:not(.logged-in) > #masthead,
body.woocommerce-account:not(.logged-in) > .header-wrapper,
body.woocommerce-account:not(.logged-in) > footer,
body.woocommerce-account:not(.logged-in) > .site-footer,
body.woocommerce-account:not(.logged-in) > #colophon,
body.woocommerce-account:not(.logged-in) > .footer-wrapper {
    /* Intentionally not hiding by default — uncomment if you want full-bleed:
    display: none !important; */
}

/* Prevent horizontal scroll from brutalist shadows on narrow viewports */
body.woocommerce-account:not(.logged-in) { overflow-x: hidden; }

/* ===== TABLET / SMALL DESKTOP (≤ 768px) ===== */
@media (max-width: 768px) {
    .wccma-auth { margin: 32px auto 48px; padding: 0 20px; }
    .wccma-auth::before { width: 90vw; height: 320px; top: -40px; }
    .wccma-auth-card { padding: 28px 24px; }
    .wccma-auth-tab { font-size: 22px; padding: 16px 12px; }
}

/* ===== PHONE (≤ 540px) ===== */
@media (max-width: 540px) {
    /* Nav bar */
    .wccma-auth-nav { padding: 12px 16px; }
    .wccma-auth-logo svg { width: 32px; height: 32px; }
    .wccma-auth-logo img { max-height: 32px; }
    .wccma-auth-logo-word { font-size: 15px; }

    /* Wrap */
    .wccma-auth { margin: 20px auto 36px; padding: 0 14px; }
    .wccma-auth::before { width: 90vw; height: 260px; top: -30px; filter: blur(50px); }

    /* Toggle */
    .wccma-auth-toggle { box-shadow: 5px 5px 0 #000; border-width: 3px; }
    .wccma-auth-tab {
        font-size: 18px;
        padding: 14px 10px;
        border-right-width: 2px;
    }

    /* Card */
    .wccma-auth-card {
        padding: 22px 18px;
        box-shadow: 5px 5px 0 var(--wccma-accent);
        border-width: 3px;
    }
    .wccma-auth-toggle + .wccma-auth-card,
    .wccma-auth-toggle ~ .wccma-auth-card { border-top: none; }

    /* Headline */
    .wccma-auth-h1 { font-size: clamp(28px, 8vw, 38px); margin-bottom: 8px; }
    .wccma-auth-h1 .wccma-accent { filter: drop-shadow(2px 2px 0 #000); }
    .wccma-auth-lead { font-size: 13px; margin-bottom: 20px; line-height: 1.5; }

    /* Fields */
    .wccma-auth-field { margin-bottom: 14px; }
    .wccma-auth-field label {
        font-size: 10px;
        letter-spacing: .16em;
        margin-bottom: 5px;
    }
    .wccma-auth-input input {
        padding: 14px 14px;
        font-size: 16px;        /* 16px+ stops iOS Safari from auto-zooming on focus */
        box-shadow: 3px 3px 0 #000;
        border-width: 2.5px;
    }
    .wccma-auth-input input:focus {
        box-shadow: 1px 1px 0 var(--wccma-accent);
    }

    /* Password eye — smaller + tighter so it doesn't crowd the input */
    .wccma-auth-eye {
        width: 44px;
        height: 30px;
        font-size: 10px;
        right: 8px;
    }
    /* Reserve space inside password inputs for the eye button */
    .wccma-auth-input:has(.wccma-auth-eye) input {
        padding-right: 58px;
    }

    /* Remember + Forgot row */
    .wccma-auth-row { margin: 8px 0 18px; gap: 10px; }
    .wccma-auth-remember,
    .wccma-auth-forgot {
        font-size: 10px;
        letter-spacing: .12em;
    }
    .wccma-auth-remember input[type=checkbox] { width: 16px; height: 16px; border-width: 2.5px; }

    /* Submit button */
    .wccma-auth-btn {
        font-size: 22px;
        padding: 16px;
        box-shadow: 5px 5px 0 #000;
        border-width: 3px;
    }
    .wccma-auth-btn:hover { box-shadow: 3px 3px 0 #000; }

    /* Perks (3 across stays — they fit at 3 col grid here) */
    .wccma-auth-perks { gap: 6px; margin-top: 20px; }
    .wccma-auth-perk { padding: 10px 6px; border-width: 2.5px; }
    .wccma-auth-perk-ic { font-size: 20px; }
    .wccma-auth-perk-ic { filter: drop-shadow(1.5px 1.5px 0 #000); }
    .wccma-auth-perk-lbl {
        font-size: 9px;
        letter-spacing: .1em;
        margin-top: 4px;
    }

    /* Alt card */
    .wccma-auth-alt-card {
        margin-top: 18px;
        padding: 14px 16px;
        box-shadow: 5px 5px 0 var(--wccma-alt);
        border-width: 3px;
    }
    .wccma-auth-alt-card:hover { box-shadow: 3px 3px 0 var(--wccma-alt); }
    .wccma-auth-alt-l { font-size: 9px; letter-spacing: .16em; }
    .wccma-auth-alt-t { font-size: 18px; margin-top: 4px; }

    .wccma-auth-fineprint { font-size: 10px; line-height: 1.5; }

    /* Notices — tighter on mobile */
    .wccma-auth .woocommerce-message,
    .wccma-auth .woocommerce-error,
    .wccma-auth .woocommerce-info,
    .wccma-auth-page .woocommerce-message,
    .wccma-auth-page .woocommerce-error,
    .wccma-auth-page .woocommerce-info {
        padding: 10px 14px !important;
        font-size: 11px !important;
    }
}

/* ===== VERY NARROW (iPhone SE / 360px) ===== */
@media (max-width: 380px) {
    .wccma-auth { padding: 0 12px; }
    .wccma-auth-card { padding: 18px 14px; }
    .wccma-auth-tab { font-size: 16px; padding: 12px 8px; }
    .wccma-auth-h1 { font-size: 26px; }
    .wccma-auth-btn { font-size: 20px; padding: 14px; }
    .wccma-auth-perk-ic { font-size: 18px; }
    .wccma-auth-perk-lbl { font-size: 8px; letter-spacing: .08em; }
    .wccma-auth-alt-t { font-size: 16px; }
}
