/* ==========================================================
   Lake Bistineau Water Level Widget (V2)
   ========================================================== */

/* ---------- Desktop ---------- */

.water-level-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-top: 18px;
}

.stage-legend {
    flex: 1;
    text-align: left;
    font-size: 0.90rem;
    line-height: 1.45;
    font-weight: 600;
}

.stage-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.stage-swatch {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.stage-row.normal {
    color: #16a34a;
}

.stage-row.action {
    color: #ca8a04;
}

.stage-row.minor {
    color: #f97316;
}

.stage-row.moderate {
    color: #ec4899;
}

.stage-row.major {
    color: #dc2626;
}

.stage-row.normal .stage-swatch {
    background: #16a34a;
}

.stage-row.action .stage-swatch {
    background: #facc15;
}

.stage-row.minor .stage-swatch {
    background: #f97316;
}

.stage-row.moderate .stage-swatch {
    background: #ec4899;
}

.stage-row.major .stage-swatch {
    background: #dc2626;
}

#current-level {
    flex: 1;
    text-align: right;
}

.gauge-links {
    display: block;
    margin-top: 14px;
    text-align: center;
}


/* ---------- Mobile ---------- */

@media (max-width: 768px) {

    #water-chart {
        max-height: 260px !important;
    }

    .water-level-info {
        flex-direction: column-reverse;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }

    .stage-legend {
        width: 100%;
        text-align: center;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .stage-row {
        justify-content: center;
    }

    #current-level {
        width: 100%;
        text-align: center;
        font-size: 0.88rem;
        line-height: 1.25;
    }

    #current-level strong {
        font-size: 1rem;
    }

    .gauge-links {
        display: block;
        text-align: center;
        font-size: 0.82rem;
        line-height: 1.4;
        margin-top: 10px;
    }
}
.msl-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.msl-popup-content {
    background: #ffffff;
    max-width: 420px;
    width: 100%;
    border-radius: 12px;
    padding: 22px 26px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    position: relative;
    text-align: left;
}

.msl-popup-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.msl-popup-content p {
    margin: 8px 0;
    line-height: 1.45;
}

.msl-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
