/**
 * header-strip.css — Dashboard Header Panel Styling
 *
 * Extracted from unified-dashboard.html's inline <style> block (lines 120-341).
 *
 * EXTRACTION NOTE (2026-05-06):
 * =============================
 * This CSS was extracted from the following inline blocks in the monolith:
 *   - .header { ... } (L124-135)
 *   - .header-brand { ... } (L191-197)
 *   - .header-hero-price { ... } (L142-166)
 *   - .header-status-cluster { ... } (L182-189)
 *   - .status-lights-bar { ... } (L281-290)
 *   - .status-light { ... } (L292-341)
 *   - @keyframes pulse, statusPulse
 *
 * Class prefix: hs- (HeaderStrip) to avoid collisions with header-brand.css
 * (which styles .logo and .tagline for the MONOLITH's header).
 *
 * The monolith's header-brand.css (L1-84) still owns .header .logo and
 * .header .tagline. This file owns .hs-logo and .hs-tagline as render
 * alternatives. Once the monolith's header is removed, migrate the
 * brand styling from header-brand.css into this file if needed.
 *
 * Theme variables used:
 *   --bg-primary, --bg-secondary, --bg-panel
 *   --border-color, --text-primary, --text-secondary
 *   --profit-color, --loss-color, --ml-color, --neutral-color
 *   --brand-red-bright, --brand-red, --brand-red-glow
 *
 * Animations:
 *   @keyframes hs-status-pulse — 1.2s soft pulse for active lights
 *   @keyframes hs-equity-flash-up — 300ms gold→green for upward price tick
 *   @keyframes hs-equity-flash-down — 300ms gold→red for downward price tick
 *
 * Accessibility:
 *   @media (prefers-reduced-motion) disables all animations
 *   High contrast colors for status lights (green #00ff88, red #ff3366)
 *   Title attributes on interactive elements
 */

/* Root header container — shared with monolith, reused by module */
header#dashHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #0d0d1a 0%, #080812 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    height: 60px;
    position: relative;
    z-index: 10;
}

/* ========================================================================
   BRAND ZONE — Logo + Tagline (LEFT)
   ======================================================================== */

.hs-brand {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 0;
}

.hs-logo {
    /* Brand red gradient — matches header-brand.css for consistency */
    background: linear-gradient(
        135deg,
        var(--brand-red-bright) 0%,
        var(--brand-red) 45%,
        #b91c1c 75%,
        var(--brand-red-bright) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1;

    /* Outer glow — reads through transparent text fill */
    filter: drop-shadow(0 0 14px rgba(220, 38, 38, 0.45))
            drop-shadow(0 0 4px rgba(0, 0, 0, 0.85));

    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Diamond accent — same as header-brand.css */
.hs-logo::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    background: linear-gradient(
        135deg,
        var(--brand-red-bright) 0%,
        var(--brand-red) 100%
    );
    box-shadow:
        0 0 12px var(--brand-red-glow),
        0 0 0 1px rgba(255, 255, 255, 0.10) inset;
    filter: drop-shadow(0 0 6px var(--brand-red-glow));
}

.hs-tagline {
    color: #888888;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.8px;
    margin-top: 4px;
    text-shadow: 0 0 6px rgba(220, 38, 38, 0.18);
}

/* ========================================================================
   HERO PRICE ZONE — Centered Equity Display (CENTER)
   ======================================================================== */

.hs-hero-price {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.hs-hero-price-main {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: 1.5px;
    text-shadow: 0 0 22px rgba(34, 197, 94, 0.4);
    line-height: 1;
    transition: color 120ms ease, text-shadow 120ms ease;
}

.hs-hero-price-main.neg {
    color: #ef4444;
    text-shadow: 0 0 22px rgba(239, 68, 68, 0.4);
}

.hs-hero-price-main.flash-up {
    animation: hs-equity-flash-up 300ms ease-out;
}

.hs-hero-price-main.flash-down {
    animation: hs-equity-flash-down 300ms ease-out;
}

.hs-hero-price-delta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #888888;
    margin-top: 4px;
    letter-spacing: 0.5px;
    transition: color 120ms ease;
}

.hs-hero-price-delta.pos {
    color: #22c55e;
}

.hs-hero-price-delta.neg {
    color: #ef4444;
}

@keyframes hs-equity-flash-up {
    0% {
        color: #ffd700;
        text-shadow: 0 0 22px rgba(255, 215, 0, 0.6);
    }
    100% {
        color: #22c55e;
        text-shadow: 0 0 22px rgba(34, 197, 94, 0.4);
    }
}

@keyframes hs-equity-flash-down {
    0% {
        color: #ffd700;
        text-shadow: 0 0 22px rgba(255, 215, 0, 0.6);
    }
    100% {
        color: #ef4444;
        text-shadow: 0 0 22px rgba(239, 68, 68, 0.4);
    }
}

/* ========================================================================
   STATUS CLUSTER ZONE — Lights + Risk + Account (RIGHT)
   ======================================================================== */

.hs-status-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin-left: auto;
    justify-self: end;
}

/* Multi-status lights bar (DATA, BOT, TRAI) */
.hs-status-lights-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hs-status-light {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status light dot */
.hs-status-light .hs-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444444;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.hs-status-light .hs-light.active {
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    animation: hs-status-pulse 1.2s infinite;
}

.hs-status-light .hs-light.error {
    background: #ff3366;
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
    animation: hs-status-pulse 1s infinite;
}

.hs-status-light .hs-label {
    color: #888888;
}

.hs-status-light .hs-light.active + .hs-label {
    color: #00ff88;
}

.hs-status-light .hs-light.error + .hs-label {
    color: #ff3366;
}

@keyframes hs-status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Risk budget meter */
.hs-risk-budget {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 70px;
}

.hs-risk-budget-percent {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--profit-color);
    letter-spacing: 1px;
}

.hs-risk-budget-percent.warn {
    color: var(--ml-color);
}

.hs-risk-budget-percent.danger {
    color: var(--loss-color);
}

.hs-risk-budget-level {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--profit-color);
    margin-top: 2px;
}

.hs-risk-budget-level.warn {
    color: var(--ml-color);
}

.hs-risk-budget-level.danger {
    color: var(--loss-color);
}

/* Account selector dropdown (stub for v1, ready for multi-account) */
.hs-account-selector {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 150px;
}

.hs-account-selector:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
}

.hs-account-selector option {
    background: #000000;
    color: #ffffff;
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hs-status-light .hs-light.active,
    .hs-status-light .hs-light.error,
    .hs-hero-price-main.flash-up,
    .hs-hero-price-main.flash-down {
        animation: none;
    }
}
