/* ============================================
   DATA RELEASE ALERT BAR - COMPACT VERSION
   Styled to match existing wethr.net dashboard
   ============================================ */

/* Main container */
.data-release-bar {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Hide empty containers */
[id^="data-release-container-"]:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Header/title - centered above items */
.data-release-bar-header {
    text-align: center;
    margin-bottom: 8px;
}

.data-release-bar-header .bar-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Countdown items container - single row, equal width */
.release-countdowns {
    display: flex;
    gap: 8px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

/* Individual countdown item - equal width, centered content */
.countdown-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #262626;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px 12px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Label */
.countdown-item .item-label {
    display: flex;
    align-items: center;
}

.countdown-item .item-label .label-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #666;
}

/* Countdown time - fixed width to prevent jumping */
.countdown-item .countdown-time {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-variant-numeric: tabular-nums;
    min-width: 58px;
    text-align: center;
}

/* Scheduled time - more readable */
.countdown-item .scheduled-time {
    font-size: 0.7rem;
    color: #888;
    white-space: nowrap;
}

/* ============================================
   DATA TYPE COLORS
   Matching chart colors for high values
   ============================================ */

/* CLI - Blue (matches CLI High on chart) */
.countdown-item[data-type="cli"] .item-label .label-text {
    color: #3449ff !important;
}

/* DSM - Lime green (matches DSM High on chart) */
.countdown-item[data-type="dsm"] .item-label .label-text {
    color: #d1ff03 !important;
}

/* Hourly/METAR - Gold (matches Hourly+SPECI on chart) */
.countdown-item[data-type="metar"] .item-label .label-text {
    color: #FFD700 !important;
}

/* 6-HR - Dark green (matches 6-Hour High on chart) */
.countdown-item[data-type="6hr"] .item-label .label-text {
    color: #2e7d32 !important;
}

/* 24-HR - Purple (matches 24-Hour High on chart) */
.countdown-item[data-type="24hr"] .item-label .label-text {
    color: #7b1fa2 !important;
}

/* ============================================
   URGENCY STATES
   ============================================ */

.countdown-item.urgency-awareness {
    background: #2a2a20;
    border-color: #4a4a30;
}
.countdown-item.urgency-awareness .countdown-time {
    color: #d1a000;
}

.countdown-item.urgency-attention {
    background: #2d2520;
    border-color: #5a4030;
}
.countdown-item.urgency-attention .countdown-time {
    color: #ff9800;
}

.countdown-item.urgency-urgent {
    background: #2d2020;
    border-color: #6a3030;
    animation: pulse-urgent 1.5s ease-in-out infinite;
}
.countdown-item.urgency-urgent .countdown-time {
    color: #f44336;
}

.countdown-item.just-released {
    background: #1d2d1d;
    border-color: #2d5a2d;
}
.countdown-item.just-released .countdown-time {
    color: #4caf50;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse-urgent {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
    }
}

/* ============================================
   STATES
   ============================================ */

.countdown-item.loading .countdown-time {
    color: #555;
}

.countdown-item.unavailable {
    opacity: 0.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .release-countdowns {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .countdown-item {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
        max-width: calc(50% - 4px);
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    .data-release-bar {
        padding: 10px;
    }
    
    .release-countdowns {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }
    
    .countdown-item {
        flex: none;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        justify-content: space-between;
        padding: 10px 15px;
        box-sizing: border-box;
    }
    
    .countdown-item .countdown-time {
        font-size: 1.1rem;
    }
    
    .countdown-item .scheduled-time {
        font-size: 0.75rem;
    }
}

/* ============================================
   LAYOUT SPACING FIXES
   Standardizes spacing between dashboard elements
   ============================================ */

/* Standardize gap between all major sections */
.station {
    gap: 10px !important;
}

/* Data release bar spacing */
.data-release-bar {
    margin-bottom: 10px;
}

/* Main temperature chart container */
.forecast-box.chart-container {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Summary boxes row */
.summary-boxes,
[class*="summary-box"]:not(.nws-forecast-chart-container) {
    margin-bottom: 10px;
}

/* Model forecast chart */
[id^="model-forecast-chart-"] {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Model max temps container (Model Details table) */
.model-max-temps-container,
[id^="model-max-temps-"] {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Recent observations spacing */
.recent-observations-container {
    margin-top: 10px !important;
    margin-bottom: 10px;
}

/* Station flex row (recent obs + kalshi) */
.station-flex {
    margin-top: 10px;
    gap: 10px !important;
}

/* Kalshi section */
.kalshi-section {
    margin-top: 0;
}

/* NWS forecast wrapper (contains both today/tomorrow charts) */
.forecast-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* NWS forecast chart containers */
.nws-forecast-chart-container {
    margin: 0 !important;
}

/* Map container spacing */
.map-wrapper,
[id^="asos-map"] {
    margin-top: 10px !important;
    margin-bottom: 10px;
}

/* Remove any extra padding inside chart containers */
.chart-container {
    padding: 0;
}

/* Forecast box base - consistent margins */
.forecast-box {
    margin-bottom: 10px;
}

/* Temperature Models chart section */
[id^="model-forecast-chart-"].forecast-box {
    margin-top: 10px;
}

/* ============================================
   INFO TOOLTIP SYSTEM (Click-based)
   ============================================ */

.info-icon-btn {
    color: #777;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.info-icon-btn:hover {
    color: #fff;
}

.info-tooltip-popup {
    position: absolute;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.info-tooltip-content {
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 14px;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-tooltip-text {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.5;
    flex: 1;
}

.info-tooltip-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.info-tooltip-close:hover {
    color: #fff;
}

/* ============================================
   MODEL TABLE SETTINGS DROPDOWN
   ============================================ */

.model-table-settings-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) rgba(0,0,0,0.1);
}

.model-table-settings-content::-webkit-scrollbar {
    width: 6px;
}

.model-table-settings-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.model-table-settings-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.model-table-settings-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.model-table-settings-content label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 0.85rem;
    color: #ccc;
    border-bottom: 1px solid #3a3a3a;
}

.model-table-settings-content label:last-child {
    border-bottom: none;
}

.model-table-settings-content label:hover {
    background-color: rgba(255,255,255,0.05);
}

.model-table-settings-content input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #FC5B3F;
}
