/* Bravo Market Update — front-end widget styles
 * Matches the Executive direction from design v2. Single CSS file,
 * BEM-ish naming, scoped under .bmu so it won't leak.
 */

.bmu {
    --bmu-accent: #0A2540;
    --bmu-ink: #0B1220;
    --bmu-muted: #6B7A8F;
    --bmu-hairline: #E3E8EF;
    --bmu-soft: #F5F7FA;
    --bmu-up: #16A34A;
    --bmu-down: #DC2626;
    --bmu-flat: #6B7A8F;
    --bmu-up-mono: #047857;
    --bmu-down-mono: #B91C1C;

    background: #ffffff;
    border-top: 2px solid var(--bmu-accent);
    border-bottom: 1px solid var(--bmu-hairline);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--bmu-ink);
    width: 100%;
    box-sizing: border-box;
}

.bmu *, .bmu *::before, .bmu *::after { box-sizing: border-box; }

.bmu__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 40px;
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 32px;
}

.bmu--density-compact .bmu__inner     { padding: 16px 32px; }
.bmu--density-spacious .bmu__inner    { padding: 36px 48px; }

.bmu__label { min-width: 0; }

.bmu__eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--bmu-accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bmu__sub {
    font-size: 13px;
    color: var(--bmu-muted);
    line-height: 1.4;
}

.bmu__rates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.bmu__rate {
    padding: 0 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.bmu__rate + .bmu__rate { border-left: 1px solid var(--bmu-hairline); }

.bmu--density-compact .bmu__rate  { gap: 4px; }
.bmu--density-spacious .bmu__rate { gap: 8px; }

.bmu__rate-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 600;
    color: var(--bmu-muted);
    text-transform: uppercase;
}

.bmu__rate-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.bmu__value {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 32px;
    font-weight: 500;
    color: var(--bmu-ink);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.bmu--density-compact .bmu__value  { font-size: 26px; }
.bmu--density-spacious .bmu__value { font-size: 38px; }

.bmu__pct {
    font-size: 0.6em;
    color: var(--bmu-muted);
    margin-left: 1px;
}

.bmu__change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.bmu__change-glyph { font-size: 10px; }

.bmu__change--up   { color: var(--bmu-up); }
.bmu__change--down { color: var(--bmu-down); }
.bmu__change--flat { color: var(--bmu-flat); }

.bmu--change-mono .bmu__change--up   { color: var(--bmu-up-mono); }
.bmu--change-mono .bmu__change--down { color: var(--bmu-down-mono); }

.bmu__spark {
    display: block;
    color: var(--bmu-accent);
}

.bmu--no-spark .bmu__spark { display: none; }

.bmu__meta {
    text-align: right;
    white-space: nowrap;
}

.bmu__meta-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: var(--bmu-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bmu__meta-date {
    font-size: 11px;
    color: var(--bmu-ink);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

.bmu__meta-src {
    font-size: 9px;
    color: #94A3B8;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    margin-top: 4px;
}

/* --- Stale notice (admin-only) --- */
.bmu__stale-notice {
    background: #FEF3C7;
    border-top: 1px solid #FDE68A;
    color: #6B4F12;
    font-size: 12px;
    padding: 8px 40px;
    text-align: center;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* --- Unconfigured state --- */
.bmu--unconfigured {
    background: #fff;
    border: 1px dashed #94A3B8;
    border-top-color: #94A3B8;
}
.bmu--unconfigured .bmu__inner {
    grid-template-columns: auto 1fr auto;
    padding: 22px 40px;
    gap: 16px;
}
.bmu__unconfigured-icon {
    width: 36px; height: 36px; background: var(--bmu-soft);
    border: 1px solid #CBD5E0; color: var(--bmu-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.bmu__unconfigured-title { font-size: 13px; font-weight: 600; color: var(--bmu-ink); }
.bmu__unconfigured-hint  { font-size: 12px; color: var(--bmu-muted); margin-top: 2px; }
.bmu__unconfigured-cta {
    background: var(--bmu-accent); color: #fff;
    padding: 8px 16px; font-size: 12px; font-weight: 600;
    letter-spacing: 0.3px; text-decoration: none;
}
.bmu__unconfigured-cta:hover { color: #fff; }

/* --- Grid display variant --- */
.bmu--grid {
    background: var(--bmu-soft);
    border: none;
    padding: 24px 0;
}
.bmu--grid .bmu__inner {
    grid-template-columns: 1fr;
    gap: 14px;
}
.bmu--grid .bmu__label {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.bmu--grid .bmu__rates {
    gap: 16px;
}
.bmu--grid .bmu__rate {
    background: #fff;
    border: 1px solid var(--bmu-hairline);
    padding: 20px 24px;
    border-left: 1px solid var(--bmu-hairline);
}

/* --- Sidebar display variant --- */
.bmu--sidebar {
    max-width: 320px;
    border-top: 3px solid var(--bmu-accent);
    border-bottom: 1px solid var(--bmu-hairline);
    border-left: 1px solid var(--bmu-hairline);
    border-right: 1px solid var(--bmu-hairline);
}
.bmu--sidebar .bmu__inner {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
}
.bmu--sidebar .bmu__label {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #F1F5F9;
}
.bmu--sidebar .bmu__rates {
    grid-template-columns: 1fr;
}
.bmu--sidebar .bmu__rate {
    padding: 14px 20px;
    border-left: none;
    border-bottom: 1px solid #F1F5F9;
}
.bmu--sidebar .bmu__rate:last-child { border-bottom: none; }
.bmu--sidebar .bmu__value { font-size: 22px; }
.bmu--sidebar .bmu__meta { display: none; }

/* --- Footer display variant --- */
.bmu--footer {
    background: #0B1220;
    color: #E6EDF7;
    border-top: none;
    border-bottom: none;
}
.bmu--footer .bmu__inner {
    grid-template-columns: auto 1fr auto;
    padding: 14px 40px;
}
.bmu--footer .bmu__eyebrow { color: #4A90E2; }
.bmu--footer .bmu__sub { display: none; }
.bmu--footer .bmu__rate { padding: 0 20px; border-left: 1px solid #1F2937; }
.bmu--footer .bmu__rate:first-child { border-left: none; }
.bmu--footer .bmu__value { font-size: 18px; color: #fff; }
.bmu--footer .bmu__pct { color: #7A8FA8; }
.bmu--footer .bmu__rate-label { color: #7A8FA8; }
.bmu--footer .bmu__spark { display: none; }
.bmu--footer .bmu__meta-label { color: #7A8FA8; }
.bmu--footer .bmu__meta-date  { color: #E6EDF7; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .bmu__inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 20px;
    }
    .bmu__rates {
        grid-template-columns: 1fr;
    }
    .bmu__rate {
        padding: 12px 0;
        border-left: none !important;
        border-bottom: 1px solid var(--bmu-hairline);
    }
    .bmu__rate:last-child { border-bottom: none; }
    .bmu__meta { text-align: left; }
}
