/*
 * Station statistics popup (opened by clicking a marker on the map).
 * Same colours as the Analysis tab. Dash loads every .css in assets/ automatically.
 */

/* The panel itself: fixed on the right, below the header (top and height are set in header.css) */
#station-info {
    position: fixed;
    right: 0;
    left: auto;
    width: 480px;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
    background: #FFFFFF;
    box-shadow: -8px 0 24px rgba(0, 31, 61, 0.18);
    z-index: 2000;
    animation: st-slide-in 0.2s ease-out;
}
@keyframes st-slide-in {
    from { transform: translateX(24px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    #station-info { animation: none; }
}

.st-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #003366;
}

.st-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.st-heading {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.st-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
}
.st-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.st-chip {
    padding: 3px 10px;
    border-radius: 999px;
    background: #E6EEF6;
    font-size: 13px;
    font-weight: 500;
}
.st-meta {
    font-size: 13px;
    color: #4A6480;
}

.st-close {
    flex: none;
    width: 40px;
    height: 40px;
    border: 1px solid #CBD5DE;
    border-radius: 8px;
    background: #FFFFFF;
    color: #003366;
    font-size: 16px;
    cursor: pointer;
}
.st-close:hover { background: #F3F6F8; }
.st-close:focus-visible { outline: 2px solid #1F5FA8; outline-offset: 2px; }

.st-notice {
    padding: 10px 12px;
    border-radius: 8px;
    background: #FFF4DB;
    color: #6E4300;
    font-size: 13px;
}

.st-section-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

/* latest values */
.st-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.st-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #E3E9EE;
    border-radius: 10px;
}
.st-tile-label { font-size: 13px; color: #4A6480; }
.st-tile-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.st-tile-unit { font-size: 12px; color: #4A6480; }

/* 24-hour charts, one per pollutant */
.st-charts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.st-chart {
    padding: 10px 8px 4px;
    border: 1px solid #E3E9EE;
    border-radius: 10px;
}
.st-chart-title {
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 420px) {
    .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}