/* ============================================================
 * user_ui - Banned/Frozen banner chrome.
 * ============================================================
 *
 * Persistent top-of-page banner. Two states render with the
 * same structural CSS (`.site-banner` base) and a state
 * modifier (`.site-banner-banned` / `.site-banner-frozen`)
 * supplying the accent color.
 *
 * PLACEHOLDER visual - simple horizontal bar with icon +
 * title + body + CTA. Keep selectors stable so that an
 * owner-supplied redesign is pure CSS work.
 *
 * Section-local classes (no canonical mockup equivalents):
 *   - .site-banner                    base bar (full-width)
 *   - .site-banner-banned             red accent
 *   - .site-banner-frozen             gold/amber accent
 *   - .site-banner-network-lockout    teal accent (site-wide lockout)
 *   - .site-banner-bank-awaiting      sky accent (bank deposit not cleared)
 *   - .site-banner-bank-holding       green accent (bank deposit cleared)
 *   - .site-banner-crypto-detected    indigo accent (crypto deposit detected)
 *   - .site-banner-withdrawal-hold    slate accent (withdrawals in the hold)
 *   - .site-banner-link               inline link inside the banner text
 *   - .site-banner-list               stacked rows of a multi-row banner
 *   - .site-banner-countdown          live countdown inside a row
 *   - .site-banner-more               '+N more' line below the rows
 *   - .site-banner-row                inner flex row inside .wrap
 *   - .site-banner-icon               20x20 left icon
 *   - .site-banner-content            title + text stack
 *   - .site-banner-title              short headline
 *   - .site-banner-text               body copy
 *   - .site-banner-cta                primary CTA button
 *
 * Layout: full-bleed background bar; inner content centred
 * inside .wrap (project-wide max-width container, defined in
 * shared/base.css). Sits ABOVE the header by virtue of DOM
 * order in base.html - the banner block precedes the header
 * block.
 *
 * Loaded by base.html after notifications/notifications.css.
 * ============================================================ */

/* ============================================================
 * 1. Base bar - structural styles shared by both states.
 *    Background + border-bottom + text color set per state.
 *    Padding tuned so the row reads at 56px tall on desktop.
 * ============================================================ */
.site-banner {
    width: 100%;
    border-bottom: 1px solid transparent;
    color: #fff;
    /* Hardcoded white text on the colored background - the
       banner color carries through both light + dark themes,
       so the contrast pair is fixed. */
}

/* ============================================================
 * 2. State variants - accent backgrounds.
 *    Banned uses a deep red; frozen uses an amber/gold. Both
 *    sit well alongside the brand orange without competing.
 * ============================================================ */
.site-banner-banned {
    background: #B91C1C; /* red 700 */
    border-bottom-color: #991B1B; /* red 800 */
}
.site-banner-frozen {
    background: #B45309; /* amber 700 */
    border-bottom-color: #92400E; /* amber 800 */
}
/* Steam Account Age Restriction (banner partial branches 3 + 4).
   Deep blue for the known-age "too young" lockout, violet for the
   unverifiable-age (private profile) lockout — both informational
   rather than punitive, so they sit apart from the red/amber pair
   while keeping the same fixed white-text contrast contract. */
.site-banner-age-restricted {
    background: #1D4ED8; /* blue 700 */
    border-bottom-color: #1E40AF; /* blue 800 */
}
.site-banner-age-unknown {
    background: #6D28D9; /* violet 700 */
    border-bottom-color: #5B21B6; /* violet 800 */
}
/* Network lockout — site-wide, shown to every visitor while trades are
   disabled. Teal sets it apart from every account-state colour (it is
   about the site, not the account); same fixed white-text contrast
   contract. It has no CTA. */
.site-banner-network-lockout {
    background: #0F766E; /* teal 700 */
    border-bottom-color: #115E59; /* teal 800 */
}
/* Bank deposit banners — informational, about the user's own money on its
   way: sky while a transfer awaits clearance, green once it cleared. Sky
   uses its 800 step because sky 700 is too light for white text; both keep
   the fixed white-text contrast contract (sky 800 ~7.6:1, green 700 ~5:1).
   No CTA, so no CTA colour rules below. */
.site-banner-bank-awaiting {
    background: #075985; /* sky 800 */
    border-bottom-color: #0C4A6E; /* sky 900 */
}
.site-banner-bank-holding {
    background: #15803D; /* green 700 */
    border-bottom-color: #166534; /* green 800 */
}
/* Crypto deposit detected — informational, a crypto deposit the gateway saw
   on chain that is not credited yet. Indigo keeps it apart from the bank
   pair and the age-restriction blue; white text on indigo 700 is ~7.9:1.
   No CTA; its only control is the transaction link (section 5). */
.site-banner-crypto-detected {
    background: #4338CA; /* indigo 700 */
    border-bottom-color: #3730A3; /* indigo 800 */
}
/* Withdrawal hold — informational, the user's own withdrawals waiting out
   the settlement hold. Slate reads as "waiting" without the warning of the
   amber/red family and stays apart from every blue above; white text on
   slate 700 is ~10:1. No CTA; one banner lists every held withdrawal
   (section 5). */
.site-banner-withdrawal-hold {
    background: #334155; /* slate 700 */
    border-bottom-color: #1E293B; /* slate 800 */
}
/* Readiness banners — KEEP THESE RULES. They style the three readiness
   banners (delivery address, billing address, trade URL) that are
   commented out in banner/_banner.html: functional and intentionally not
   rendered at the moment, kept so they can be re-enabled by removing the
   comment tags there. No rendered element matches these selectors while
   the banners are commented out; that is expected — do not delete them
   as unused.
   Yellow for the two missing-address notices (one shared accent: both
   kinds gate the same actions), red for the missing-trade-URL notice
   ("big fat red banner" per the product decision). Stackable +
   independent of the account-state pair; same fixed white-text contrast
   contract. The red deliberately sits a step brighter than the banned
   red-700 so the two are distinguishable if design ever revives a
   banned banner. */
.site-banner-address-missing {
    background: #A16207; /* yellow 700 — a11y: white text on
                            yellow-600 (#CA8A04) fell below the contrast
                            threshold; 700 matches the level every other
                            banner background uses. */
    border-bottom-color: #854D0E; /* yellow 800 — one shade darker than
                                     the background, same pattern as the
                                     other state pairs. */
}
.site-banner-trade-url-missing {
    background: #DC2626; /* red 600 */
    border-bottom-color: #B91C1C; /* red 700 */
}

/* ============================================================
 * 3. Inner row - icon | content | CTA. Sits inside `.wrap` so
 *    horizontal padding matches the rest of the chrome.
 *
 *    Flex layout: icon (fixed), content (flex 1, wraps if
 *    needed), CTA (fixed). Vertically centred.
 * ============================================================ */
.site-banner-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

/* ============================================================
 * 4. Icon - 20x20 stroke icon, left of content.
 * ============================================================ */
.site-banner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #fff;
}

/* ============================================================
 * 5. Content - title (Saira 700/14) + text (Work Sans 400/13).
 *    Stacks on small viewports; inline on desktop.
 * ============================================================ */
.site-banner-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}
.site-banner-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #fff;
}
.site-banner-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}
/* Inline link in the banner text (the crypto banner's transaction link).
   Theme-invariant like the bar itself: white, underlined so it is not told
   apart by colour alone, with a white focus ring offset from the text. */
.site-banner-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}
.site-banner-link:hover {
    text-decoration-thickness: 2px;
}
.site-banner-link:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
    border-radius: 2px;
}
/* Multi-row banner (the withdrawal hold banner): one row per withdrawal,
   stacked, then the '+N more' line. Both take the content's full width so
   they stack under each other rather than flowing side by side. */
.site-banner-list {
    flex-basis: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.site-banner-more {
    flex-basis: 100%;
    margin: 0;
}
/* The live countdown inside a row. Tabular figures in the mono face keep
   the text from shifting as the seconds tick; it never breaks mid-time. */
.site-banner-countdown {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

/* ============================================================
 * 6. CTA - small button. Inverts colors relative to the bar:
 *    white background, banner-state text. Pulls focus.
 *
 *    `.btn.primary.sm` (canonical shared button) supplies
 *    height + padding + radius + typography; we override the
 *    background/text/border to fit the bar.
 *
 *    Theme-invariant: the banner backgrounds themselves are
 *    hardcoded red/amber (NOT theme-token-driven), so the CTA
 *    on top of them must also be hardcoded. Using
 *    `var(--text)` previously resolved to white in dark
 *    theme and produced white-on-white (invisible). Per-state
 *    text colours keep the CTA legible in both themes and
 *    echo the banner's own accent.
 * ============================================================ */
.site-banner-cta {
    flex-shrink: 0;
    background: #fff;
    border: 0;
    /* `color` set per-banner-state below — never via theme
       tokens, since the banner is theme-invariant. */
}
.site-banner-banned .site-banner-cta {
    color: #B91C1C;          /* banned accent (red 700) */
}
.site-banner-frozen .site-banner-cta {
    color: #B45309;          /* frozen accent (amber 700) */
}
.site-banner-age-restricted .site-banner-cta {
    color: #1D4ED8;          /* age accent (blue 700) */
}
.site-banner-age-unknown .site-banner-cta {
    color: #6D28D9;          /* age-unknown accent (violet 700) */
}
/* Readiness CTAs — style the commented-out readiness banners; keep
   (see the readiness note in section 2). */
.site-banner-address-missing .site-banner-cta {
    color: #A16207;          /* readiness accent (yellow 700) */
}
.site-banner-trade-url-missing .site-banner-cta {
    color: #B91C1C;          /* readiness accent (red 700) */
}
.site-banner-cta:hover {
    /* Theme-invariant light grey - distinct from #fff but
       still readable against any banner color. Text colour
       stays on the per-state rules above. */
    background: #F3F4F6;
}
.site-banner-banned .site-banner-cta:focus-visible {
    /* Darker red than the banner background so the focus
       ring is visible against the red bar. Matches the
       banner-bottom border colour for visual cohesion. */
    outline: 2px solid #991B1B;   /* red 800 */
    outline-offset: 2px;
}
.site-banner-frozen .site-banner-cta:focus-visible {
    outline: 2px solid #92400E;   /* amber 800 */
    outline-offset: 2px;
}
.site-banner-age-restricted .site-banner-cta:focus-visible,
.site-banner-age-unknown .site-banner-cta:focus-visible,
.site-banner-address-missing .site-banner-cta:focus-visible,
.site-banner-trade-url-missing .site-banner-cta:focus-visible {
    /* High-contrast white ring - a same-hue darker shade
       (blue 800 / violet 800) is near-invisible against the
       blue/violet bars (~1.3:1). The 2px offset leaves a strip of
       banner colour between the white button and the white ring, so
       the ring stays distinguishable from the button edge. The
       banned/frozen rings use the same-hue pattern above. */
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* Inert placeholder state - same dim treatment as the
   header/footer inert links. Lifted into the banner scope
   because the global rule lives inside nav.primary which
   doesn't apply here. */
.site-banner-cta[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
 * 7. Mobile - stack content + CTA vertically; CTA full-width
 *    so it doesn't get cropped on narrow viewports.
 * ============================================================ */
@media (max-width: 600px) {
    .site-banner-row {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px 14px;
    }
    .site-banner-icon {
        margin-top: 2px;
    }
    .site-banner-content {
        flex-basis: calc(100% - 34px);
    }
    .site-banner-cta {
        flex-basis: 100%;
        text-align: center;
    }
}
