/* === Afitt Bistro — Global operational status bar ===
   Canonical StatusBar::render() output, placed directly BELOW the sticky site
   header (2026-10-03). Deliberately compact and quiet: a single centered
   status sentence (no CTA, no oversized strip) smaller than the category
   pill bar. Enqueued site-wide on the public frontend only (inc/assets.php);
   never loaded in WP admin. All visual values reference tokens. */

/* ---- One ordered sticky stack: status bar + site header ---- */
/* .afitt-header-stack is the sticky containing block. The stack's sticky
   `top` is driven by --afitt-stack-top (see admin-bar rules below) so a
   later page-specific sticky rule (menu.css) composes with the toolbar
   offset instead of overriding it. */
.afitt-header-stack {
    position: relative;
    z-index: var(--z-sticky);
}

/* WP admin toolbar (logged-in only): the whole stack starts below it. */
body.admin-bar .afitt-header-stack {
    --afitt-stack-top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .afitt-header-stack {
        --afitt-stack-top: 46px;
    }
}

/* ---- Full-viewport-width compact indicator strip (single centered line) ---- */
.afitt-status-bar {
    display: block;
    width: 100%;
    font-family: var(--font-body);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.afitt-status-bar__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 6px clamp(var(--space-md), 4vw, var(--space-2xl));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    text-align: center;
}

.afitt-status-icon {
    flex: 0 0 auto;
    font-size: 0.8rem;
    line-height: 1;
}

.afitt-status-label {
    /* Quiet status sentence: 16px at 1920, tapering down on smaller viewports. */
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 500;
    font-size: clamp(12px, 11px + 0.27vw, 16px);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.afitt-status-copy {
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 500;
    font-size: clamp(12px, 11px + 0.27vw, 16px);
    line-height: 1.35;
    text-align: center;
}

.afitt-status-cta {
    flex: 0 0 auto;
    margin-left: auto;
    font-weight: 700;
    font-size: var(--text-micro);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    text-decoration: none;
}

/* ---- Owner state colour contract (PROMPT 1) ---- */
/* Open / ordering available — green. */
.afitt-status-bar.is-open {
    background: var(--status-green-bg);
    color: var(--status-green-fg);
}
.afitt-status-bar.is-open .afitt-status-cta {
    background: var(--color-brand-orange);
    color: var(--color-text-inverse);
}

/* Pre-open / T-3 upcoming closure — orange notice (not "closed now"). */
.afitt-status-bar.is-preopen,
.afitt-status-bar.is-upcoming-notice {
    background: var(--status-orange-bg);
    color: var(--status-orange-fg);
}

/* Shop closed (today / regular closed day / special closure / manual pause):
   solid BRAND red with white text (owner request 2026-10-10). */
.afitt-status-bar.is-closed-for-today,
.afitt-status-bar.is-closed,
.afitt-status-bar.is-special-closure,
.afitt-status-bar.is-paused {
    background: var(--color-brand-red-bright, #E11B1C);
    color: var(--color-text-inverse, #fff);
}

/* Resolver error — amber/safe neutral; never green. */
.afitt-status-bar.is-unknown {
    background: var(--status-amber-bg);
    color: var(--status-amber-fg);
}

/* ---- Mobile: compact wrap-able centered line, no overflow ---- */
@media (max-width: 640px) {
    .afitt-status-bar__inner {
        align-items: center;
        gap: var(--space-2xs);
        flex-wrap: wrap;
        padding-block: 6px;
    }
    /* The label is a full sentence — let it wrap instead of overflowing
       narrow (≤320px) viewports. */
    .afitt-status-label {
        flex: 0 1 auto;
        min-width: 0;
        overflow-wrap: break-word;
    }
    .afitt-status-copy {
        flex: 1 1 100%;
        order: 3;
    }
    /* CTA is not part of the compact strip any more (kept for API parity). */
    .afitt-status-cta {
        display: none;
    }
}
