/* dashboard-chrome.css -- shared header + footer for all in-repo lab dashboards.
 * Spec (ticket #936): consistent chrome across claude_usage,
 * status_public_dashboard, internal_status_page. The page-body styling and
 * theme tokens stay per-dashboard; this file only owns header/footer layout +
 * typography. Tokens (--bg, --bg-card, --border, --text, --text-muted,
 * --blue/--accent) are expected to be declared by the host dashboard's
 * stylesheet via :root, in line with GitHub-dark.
 *
 * Header layout:
 *   .chrome-header
 *     .chrome-title-block        (left)
 *       h1.chrome-title          (bold)
 *       p.chrome-subtitle        ("Updated HH:MM:SS")
 *     .chrome-controls           (right, flex row, gap 0.5rem)
 *       <custom controls slot, e.g. range select>
 *       button.chrome-refresh-btn
 *       span.chrome-countdown    ("Next: Ns")
 *
 * Footer layout:
 *   .chrome-footer
 *     .chrome-footer-left        ("Last refresh: HH:MM:SS")
 *     .chrome-footer-right       ("Auto-refresh: Ns")
 *
 * Hosts that need to fall back to existing class names (e.g. countdown,
 * refresh-btn, last-updated) can keep them as additional classes on the
 * same node -- chrome rules target .chrome-* so they layer cleanly.
 */

.chrome-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.chrome-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.chrome-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin: 0;
}

.chrome-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted, #8b949e);
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.chrome-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chrome-controls select,
.chrome-controls .chrome-refresh-btn,
.chrome-refresh-btn {
    background: var(--bg-card, var(--surface, #161b22));
    color: var(--text, #c9d1d9);
    border: 1px solid var(--border, #30363d);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.chrome-refresh-btn:hover,
.chrome-controls select:hover {
    color: var(--blue, var(--accent, #58a6ff));
    border-color: var(--blue, var(--accent, #58a6ff));
}

.chrome-countdown {
    font-size: 0.75rem;
    color: var(--text-muted, #8b949e);
    font-variant-numeric: tabular-nums;
    background: var(--bg-card, var(--surface, #161b22));
    border: 1px solid var(--border, #30363d);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    line-height: 1.2;
    white-space: nowrap;
}

.chrome-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted, #8b949e);
    font-variant-numeric: tabular-nums;
}

.chrome-footer-left,
.chrome-footer-right {
    flex: 0 0 auto;
}

.chrome-footer-right {
    text-align: right;
}

@media (max-width: 600px) {
    .chrome-header {
        flex-direction: column;
        align-items: stretch;
    }

    .chrome-controls {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .chrome-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .chrome-footer-right {
        text-align: center;
    }
}
