/* ============================================
   HURRICANE CENTER — PAGE-SPECIFIC CSS
   Compact mission-control layout matching
   earth-report.html gold standard.
   Extends earth-monitor.css shared styles.
   ============================================ */

/* ── Hide old hero banner (from shared CSS) ── */
.earth-page-hurricane .em-hero-banner { display: none !important; }

/* ============================================
   COMMAND BAR — title + toggles + actions
   ============================================ */
.hc-command-bar {
    background: linear-gradient(180deg, rgba(8,10,16,0.95) 0%, rgba(6,8,14,0.98) 100%);
    border-bottom: 1px solid rgba(139,92,246,0.1);
    padding: 0 14px;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.hc-command-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.3) 30%, rgba(139,92,246,0.15) 70%, transparent);
}

.hc-title {
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(139,92,246,0.85);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    white-space: nowrap;
    flex-shrink: 0;
}

.hc-season {
    font-size: 0.4rem;
    color: var(--th-text-muted, #50546a);
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0.7;
    flex-shrink: 0;
}

.hc-layer-controls {
    position: static !important;
    display: flex !important;
    gap: 3px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.hc-layer-controls::-webkit-scrollbar { display: none; }
.hc-layer-controls .em-layer-btn {
    padding: 2px 8px;
    font-size: 0.42rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Stat chips inside map */
.hc-map-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 500;
    display: flex;
    gap: 4px;
    pointer-events: none;
}
.hc-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(6,10,18,0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139,92,246,0.12);
    pointer-events: auto;
}
.hc-chip-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    color: var(--th-text-heading, #f0f1f5);
    line-height: 1;
}
.hc-chip-label {
    font-size: 0.3rem;
    color: rgba(180,195,215,0.5);
    font-family: var(--font-mono, monospace);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-top: 2px;
}

/* ── Right actions ── */
.hc-status-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.hc-alert-btn {
    position: relative;
    padding: 2px;
    border-radius: 3px;
    border: 1px solid var(--th-border-strong, rgba(255,255,255,0.08));
    background: var(--em-glass);
    backdrop-filter: blur(8px);
    color: var(--th-text-secondary, #8b8fa3);
    cursor: pointer;
    transition: all var(--em-transition);
    font-size: 0.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-alert-btn svg {
    width: 12px;
    height: 12px;
}

.hc-alert-btn:hover {
    background: var(--th-bg-surface-hover, #20232f);
    color: var(--em-page-accent, #8b5cf6);
}

.hc-share-btn {
    padding: 2px 5px;
    border: 1px solid color-mix(in srgb, var(--em-page-accent) 18%, transparent);
    background: rgba(0, 12, 24, 0.5);
    color: color-mix(in srgb, var(--em-page-accent) 50%, #94a3b8);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono, monospace);
    font-size: 0.4rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
}

.hc-share-btn svg {
    width: 9px;
    height: 9px;
}

.hc-share-btn:hover {
    color: var(--em-page-accent-strong, #c084fc);
    border-color: color-mix(in srgb, var(--em-page-accent) 40%, transparent);
    background: color-mix(in srgb, var(--em-page-accent) 6%, transparent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--em-page-accent) 12%, transparent);
}

/* ============================================
   COMPACT TRUST LINE
   Collapse trust strip into single inline row
   with dot separators instead of large boxes
   ============================================ */
.hc-trust-line {
    position: relative;
    z-index: 9;
    padding: 3px 14px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--em-page-accent) 4%, rgba(8, 10, 15, 0.96)) 0%,
        rgba(8, 10, 15, 0.88) 100%);
    border-bottom: 1px solid var(--th-border, rgba(255,255,255,0.04));
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
    font-family: var(--font-mono, monospace);
    font-size: 0.5rem;
    color: var(--th-text-muted, #50546a);
    line-height: 1.6;
}

.hc-trust-line::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--em-page-accent) 30%, transparent 85%);
    opacity: 0.3;
}

/* Override the default trust strip grid to render inline */
.hc-trust-line .em-trust-grid {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.hc-trust-line .em-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    border-right: none;
    min-width: 0;
    background: none;
}

.hc-trust-line .em-trust-item::after {
    content: '\00B7';
    color: var(--th-text-muted, #50546a);
    opacity: 0.5;
    margin: 0 6px;
    font-size: 0.7rem;
}

.hc-trust-line .em-trust-item:last-child::after {
    display: none;
}

.hc-trust-line .em-trust-label {
    font-size: 0.42rem;
    margin-bottom: 0;
    color: color-mix(in srgb, var(--em-page-accent) 40%, #94a3b8);
}

.hc-trust-line .em-trust-value {
    font-size: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Hide the note section in compact line mode */
.hc-trust-line .em-trust-note {
    display: none;
}

/* ============================================
   COMPACT HUD GAUGES
   Max 1.2rem value font, tight padding
   ============================================ */
.earth-page-hurricane .me-hud {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.earth-page-hurricane .me-hud-gauge-value {
    font-size: 1.2rem !important;
    line-height: 1.1;
}

.earth-page-hurricane .me-hud-gauge {
    padding: 6px 10px 8px !important;
}

.earth-page-hurricane .me-hud-header {
    padding: 3px 12px !important;
}

.earth-page-hurricane .me-hud-gauge-label {
    font-size: 0.45rem !important;
}

.earth-page-hurricane .me-hud-gauge-unit {
    font-size: 0.42rem !important;
}

/* ============================================
   MAP CONTAINER — fill remaining viewport
   ============================================ */
.earth-page-hurricane .em-map-container {
    height: 60vh;
}

/* ============================================
   RESPONSIVE — 768px (tablets)
   ============================================ */
@media (max-width: 768px) {
    .hc-status-bar {
        padding: 3px 10px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .hc-brand-label {
        display: none;
    }

    .hc-season {
        display: none;
    }

    .hc-title {
        font-size: 0.55rem;
    }

    .hc-status-chips {
        gap: 6px;
    }

    .hc-status-right {
        gap: 4px;
    }

    .hc-chip-value {
        font-size: 0.55rem;
    }

    .hc-chip-label {
        font-size: 0.32rem;
    }

    .earth-page-hurricane .me-hud-gauge-value {
        font-size: 1rem !important;
    }

    .earth-page-hurricane .me-hud-gauge {
        padding: 4px 6px 6px !important;
    }

    .earth-page-hurricane .me-hud-header {
        padding: 2px 10px !important;
    }

    .earth-page-hurricane .em-map-container {
        height: 50vh;
    }

    .hc-trust-line {
        padding: 2px 10px;
        font-size: 0.45rem;
    }

    .hc-trust-line .em-trust-label {
        font-size: 0.36rem;
    }

    .hc-trust-line .em-trust-value {
        font-size: 0.45rem;
    }
}

/* ============================================
   RESPONSIVE — 480px (small phones)
   ============================================ */
@media (max-width: 480px) {
    .hc-status-bar {
        padding: 2px 8px;
        gap: 3px;
    }

    .hc-status-left,
    .hc-status-chips,
    .hc-status-right {
        width: 100%;
    }

    .hc-status-right {
        justify-content: flex-end;
    }

    .hc-logo {
        width: 22px;
        height: 22px;
    }

    .hc-divider {
        height: 10px;
    }

    .hc-title {
        font-size: 0.5rem;
        letter-spacing: 0.08em;
    }

    .hc-chip-value {
        font-size: 0.5rem;
    }

    .hc-chip-label {
        font-size: 0.28rem;
    }

    .hc-share-btn span {
        display: none;
    }

    .earth-page-hurricane .me-hud-gauge-value {
        font-size: 0.9rem !important;
    }

    .earth-page-hurricane .me-hud-gauge {
        padding: 3px 4px 5px !important;
    }

    .earth-page-hurricane .em-map-container {
        height: 50vh;
    }

    .hc-trust-line {
        padding: 2px 8px;
        font-size: 0.4rem;
    }

    .hc-trust-line .em-trust-item::after {
        margin: 0 4px;
    }
}

/* ============================================
   RESPONSIVE — 375px (iPhone SE etc)
   ============================================ */
@media (max-width: 375px) {
    .hc-status-bar {
        padding: 2px 6px;
        gap: 2px;
    }

    .hc-title {
        font-size: 0.45rem;
        letter-spacing: 0.06em;
    }

    .hc-status-chips {
        gap: 4px;
    }

    .hc-chip {
        padding: 1px 3px;
    }

    .hc-chip-value {
        font-size: 0.45rem;
    }

    .hc-alert-btn svg,
    .hc-share-btn svg {
        width: 10px;
        height: 10px;
    }
}

/* Table overflow fix for mobile */
.em-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   LARGE SCREENS (1440px+)
   ============================================ */
@media (min-width: 1440px) {
    .hc-status-bar {
        padding: 5px 24px;
    }

    .hc-title {
        font-size: 0.65rem;
    }

    .hc-brand-label {
        font-size: 0.62rem;
    }

    .hc-chip-value {
        font-size: 0.7rem;
    }

    .earth-page-hurricane .em-map-container {
        height: 65vh;
    }
}
