/* =========================================================================
 * OneGrid Web — Layout
 * -------------------------------------------------------------------------
 * Grid: header / sub-header (client + phenom) / sub-header (event) / main
 * content (county grid + discussion) / footer. Each strip is centred at
 * 1440 px max width but expands to full width on smaller viewports so the
 * dashboard still reads on tablets and phones (spec R4.3 / R4.4).
 * =======================================================================*/

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--bg-one);
    color: var(--text-foreground);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

[v-cloak] { display: none !important; }

.og-app {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) var(--space-3);
}

/* ---------- Header ----------------------------------------------------- */
.og-header,
.og-subheader,
.og-footer {
    display: flex;
    justify-content: center;
}

.og-header__shell,
.og-subheader__shell,
.og-footer__shell {
    width: 100%;
    max-width: 1440px;
    background: var(--bg-two);
    border-radius: var(--radius-shell);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-5);
}

.og-header__shell {
    min-height: var(--header-height);
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.og-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    outline: none;
}

.og-header__brand:focus-visible {
    box-shadow: var(--shadow-focus);
    border-radius: 6px;
}

.og-header__logo {
    display: block;
    /* Enhancement §3.5: header vertical size reduced, logo scales down
     * to match without warping the 1800:760 viewbox aspect. */
    height: 32px;
    width: auto;
}

.og-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ---------- Sub-headers ------------------------------------------------ */
.og-subheader__shell {
    min-height: var(--subheader-height);
    justify-content: space-between;
    gap: var(--space-4);
}

.og-subheader__client {
    display: flex;
    flex-direction: column;
    /* Enhancement §21.3 — token-driven gap so the eyebrow label sits
     * flush against the client name (or the studio can dial it up). */
    gap: var(--eyebrow-space);
}

.og-subheader__eyebrow {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-description);
    letter-spacing: 0.02em;
    line-height: var(--eyebrow-line-height);
    margin: 0;
}

.og-subheader__client-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-title);
}

.og-subheader__pickers {
    display: flex;
    align-items: stretch;
    gap: var(--space-3);
}

.og-subheader__divider {
    width: 1px;
    background: var(--bg-three);
    align-self: stretch;
    margin: 4px 0;
}

.og-subheader--event .og-subheader__shell {
    min-height: 48px;
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.og-eventinfo {
    display: flex;
    flex-direction: column;
    /* Enhancement §21.1 — token-driven gap so Event Type / Event Window
     * sits tight against its primary text. */
    gap: var(--eyebrow-space);
}

.og-eventinfo--right {
    text-align: right;
    margin-left: auto;
}

.og-eventinfo__eyebrow {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-description);
    line-height: var(--eyebrow-line-height);
    margin: 0;
}

.og-eventinfo__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-active);
}

/* ---------- Main content ---------------------------------------------- */
.og-content {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.og-empty {
    padding: var(--space-8);
    text-align: center;
    color: var(--text-description);
    background: var(--bg-two);
    border-radius: var(--radius-shell);
    box-shadow: var(--shadow-card);
    font-size: 14px;
}

.og-empty--error {
    color: var(--red);
}

/* Grid: 2 columns above 1080px, 1 column below (spec R4.3). */
.og-county-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 1080px) {
    .og-county-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Footer ----------------------------------------------------- */
.og-footer__shell {
    min-height: var(--footer-height);
    padding: var(--space-2) var(--space-5);
    justify-content: space-between;
    color: var(--text-description);
    font-size: 12px;
    font-weight: 400;
}

.og-footer__copyright { text-align: left; }
.og-footer__version   { text-align: right; }

/* ---------- Responsive tweaks ----------------------------------------- */
@media (max-width: 720px) {
    .og-app { padding: var(--space-2) var(--space-3); gap: var(--space-2); }

    .og-header__shell,
    .og-subheader__shell,
    .og-footer__shell {
        padding: var(--space-2) var(--space-3);
    }

    .og-header__shell { flex-direction: column; align-items: flex-start; }
    .og-header__actions { align-self: stretch; justify-content: space-between; }

    .og-subheader__shell { flex-direction: column; align-items: flex-start; }
    .og-subheader__pickers { flex-direction: column; align-items: stretch; width: 100%; }
    .og-subheader__divider { display: none; }

    .og-header__logo { height: 38px; }
    .og-subheader__client-name { font-size: 14px; }
    .og-eventinfo--right { margin-left: 0; text-align: left; }
    .og-subheader--event .og-subheader__shell { flex-direction: column; align-items: flex-start; }
}
