/* ========================================
   SAMNET SITE STATISTICS
======================================== */

.statistics-page {
    min-height: 100vh;

    color: #172b43;

    background: #f4f7f8;
}


/* ========================================
   HERO
======================================== */

.statistics-hero {
    padding:
        38px
        0;

    border-bottom:
        1px solid
        #dfe6e9;

    background: #ffffff;
}


.statistics-hero__inner {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;
}


.statistics-kicker {
    display: block;

    margin-bottom: 3px;

    color: #2f8f5b;

    font-size: 0.68rem;
    font-weight: 900;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.statistics-hero h1 {
    margin: 0;

    color: #172b43;

    font-size:
        clamp(
            2rem,
            4vw,
            2.7rem
        );

    font-weight: 800;

    letter-spacing:
        -0.035em;
}


.statistics-hero p {
    max-width: 700px;

    margin:
        8px
        0
        0;

    color: #718096;

    font-size: 0.92rem;
}


.statistics-updated {
    text-align: right;
}


.statistics-updated span {
    display: block;

    color: #8a989f;

    font-size: 0.56rem;
    font-weight: 800;

    text-transform: uppercase;
}


.statistics-updated strong {
    display: block;

    margin-top: 2px;

    color: #52646e;

    font-size: 0.77rem;
}


/* ========================================
   CONTROLS
======================================== */

.statistics-controls-section {
    padding:
        22px
        0
        0;
}


.statistics-controls {
    display: flex;

    padding: 15px;

    align-items: flex-end;

    gap: 18px;

    border:
        1px solid
        #dfe6e9;

    border-radius: 11px;

    background: #ffffff;
}


.statistics-control {
    display: flex;

    min-width: 250px;

    flex-direction: column;

    gap: 5px;
}


.statistics-control > span,
.statistics-period-control > span {
    display: block;

    color: #718096;

    font-size: 0.57rem;
    font-weight: 900;

    letter-spacing: 0.05em;

    text-transform: uppercase;
}


.statistics-control select {
    height: 38px;

    padding:
        0
        10px;

    border:
        1px solid
        #d6e0e3;

    border-radius: 7px;

    color: #172b43;

    background: #ffffff;

    font-size: 0.76rem;
    font-weight: 700;
}


/* ========================================
   PERIOD BUTTONS
======================================== */

.statistics-period-control {
    display: flex;

    flex: 1;

    flex-direction: column;

    gap: 5px;
}


.statistics-period-buttons {
    display: flex;

    gap: 5px;
}


.statistics-period-button {
    min-height: 38px;

    padding:
        0
        13px;

    border:
        1px solid
        #d6e0e3;

    border-radius: 7px;

    color: #60727a;

    background: #ffffff;

    font-size: 0.72rem;
    font-weight: 800;

    cursor: pointer;
}


.statistics-period-button:hover {
    border-color: #2f8f5b;

    color: #2f8f5b;
}


.statistics-period-button.active {
    color: #ffffff;

    border-color: #2f8f5b;

    background: #2f8f5b;
}


/* ========================================
   REFRESH
======================================== */

.statistics-refresh-button {
    min-height: 38px;

    padding:
        0
        15px;

    border: 0;

    border-radius: 7px;

    color: #ffffff;

    background: #2f8f5b;

    font-size: 0.72rem;
    font-weight: 900;

    cursor: pointer;
}


.statistics-refresh-button:disabled {
    opacity: 0.55;

    cursor: wait;
}


/* ========================================
   STATION SUMMARY
======================================== */

.statistics-summary-section {
    padding:
        18px
        0
        0;
}


.statistics-station-summary {
    display: flex;

    padding:
        17px
        19px;

    align-items: center;
    justify-content: space-between;

    gap: 30px;

    border:
        1px solid
        #dfe6e9;

    border-radius: 11px;

    background: #ffffff;
}


.statistics-station-summary > div:first-child > span {
    display: block;

    color: #2f8f5b;

    font-size: 0.65rem;
    font-weight: 900;

    letter-spacing: 0.08em;
}


.statistics-station-summary h2 {
    margin:
        2px
        0
        0;

    color: #172b43;

    font-size: 1.25rem;
    font-weight: 900;
}


.statistics-station-summary p {
    margin:
        3px
        0
        0;

    color: #718096;

    font-size: 0.7rem;
}


.statistics-period-description {
    text-align: right;
}


.statistics-period-description > span {
    display: block;

    color: #8a989f;

    font-size: 0.53rem;
    font-weight: 800;

    text-transform: uppercase;
}


.statistics-period-description strong {
    display: block;

    margin-top: 1px;

    color: #172b43;

    font-size: 0.82rem;
    font-weight: 900;
}


.statistics-period-description small {
    display: block;

    margin-top: 2px;

    color: #8a989f;

    font-size: 0.6rem;
}


/* ========================================
   SECTIONS
======================================== */

.statistics-extremes-section,
.statistics-records-section {
    padding:
        28px
        0
        0;
}


.statistics-section-heading {
    display: flex;

    margin-bottom: 12px;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}


.statistics-section-heading > div > span {
    display: block;

    color: #2f8f5b;

    font-size: 0.59rem;
    font-weight: 900;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


.statistics-section-heading h2 {
    margin:
        2px
        0
        0;

    color: #172b43;

    font-size: 1.35rem;
    font-weight: 900;
}


/* ========================================
   LOADING / ERROR
======================================== */

.statistics-loading,
.statistics-error {
    margin-bottom: 12px;

    padding:
        10px
        12px;

    border-radius: 8px;

    font-size: 0.7rem;
    font-weight: 700;
}


.statistics-loading {
    color: #52646e;

    background: #edf2f4;
}


.statistics-error {
    color: #9c3737;

    border:
        1px solid
        #efc4c4;

    background: #fff0f0;
}


/* ========================================
   STATISTIC CARDS
======================================== */

.statistics-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 12px;
}


.statistics-card {
    min-width: 0;

    padding: 16px;

    border:
        1px solid
        #dfe6e9;

    border-radius: 11px;

    background: #ffffff;

    box-shadow:
        0 5px 16px
        rgba(7,26,38,0.045);
}


.statistics-card__heading {
    margin-bottom: 13px;
}


.statistics-card__heading > span {
    display: block;

    color: #2f8f5b;

    font-size: 0.55rem;
    font-weight: 900;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


.statistics-card__heading > strong {
    display: block;

    margin-top: 2px;

    color: #172b43;

    font-size: 0.9rem;
    font-weight: 900;
}


/* ========================================
   MAX / MIN
======================================== */

.statistics-extreme-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 8px;
}


.statistics-extreme {
    min-width: 0;

    padding:
        10px;

    border-radius: 8px;

    background: #f5f8f9;
}


.statistics-extreme > span {
    display: block;

    color: #7d8c93;

    font-size: 0.57rem;
    font-weight: 800;

    text-transform: uppercase;
}


.statistics-extreme > strong {
    display: flex;

    margin-top: 3px;

    align-items: baseline;

    gap: 3px;

    color: #172b43;

    font-size: 1.45rem;
    font-weight: 900;

    line-height: 1;
}


.statistics-extreme > strong small {
    color: #85939a;

    font-size: 0.62rem;
    font-weight: 700;
}


.statistics-extreme time {
    display: block;

    margin-top: 6px;

    color: #6f8088;

    font-size: 0.62rem;
    font-weight: 700;

    line-height: 1.2;
}


/* ========================================
   RECORDS
======================================== */

.statistics-records-note {
    color: #829097;

    font-size: 0.6rem;
}


.statistics-records-wrapper {
    overflow-x: auto;

    border:
        1px solid
        #dfe6e9;

    border-radius: 11px;

    background: #ffffff;
}


.statistics-records-table {
    width: 100%;

    border-collapse: collapse;
}


.statistics-records-table th {
    padding:
        10px
        13px;

    color: #718096;

    border-bottom:
        1px solid
        #dfe6e9;

    background: #f5f8f9;

    font-size: 0.57rem;
    font-weight: 900;

    text-align: left;

    text-transform: uppercase;
}


.statistics-records-table td {
    padding:
        11px
        13px;

    border-bottom:
        1px solid
        #e9edef;

    color: #5b6c75;

    font-size: 0.72rem;
}


.statistics-records-table tr:last-child td {
    border-bottom: 0;
}


.statistics-records-table td:first-child {
    color: #172b43;

    font-weight: 700;
}


.statistics-records-table td strong {
    color: #172b43;

    font-size: 0.88rem;
    font-weight: 900;
}


.statistics-records-table td small {
    margin-left: 3px;

    color: #8b989e;

    font-size: 0.55rem;
}


/* ========================================
   NOTE
======================================== */

.statistics-note-section {
    padding:
        22px
        0
        48px;
}


.statistics-note {
    padding:
        14px
        16px;

    border-left:
        4px solid
        #2f8f5b;

    border-radius:
        0
        8px
        8px
        0;

    background: #ffffff;
}


.statistics-note strong {
    display: block;

    color: #172b43;

    font-size: 0.72rem;
    font-weight: 900;
}


.statistics-note p {
    margin:
        4px
        0
        0;

    color: #718096;

    font-size: 0.65rem;

    line-height: 1.5;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 950px) {

    .statistics-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .statistics-controls {
        align-items: stretch;

        flex-direction: column;
    }


    .statistics-control {
        min-width: 0;
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 650px) {

    .statistics-hero__inner,
    .statistics-station-summary {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }


    .statistics-updated,
    .statistics-period-description {
        text-align: left;
    }


    .statistics-period-buttons {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .statistics-period-button {
        width: 100%;
    }


    .statistics-grid {
        grid-template-columns: 1fr;
    }


    .statistics-section-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 4px;
    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 420px) {

    .statistics-extreme > strong {
        font-size: 1.25rem;
    }

}