/* ==================================================
   3NG - NATIONAL RATINGS
================================================== */

.national-ratings-page {
    padding: 46px 0 56px;

    border-bottom:
        1px solid var(--border-secondary);

    transition:
        opacity 0.12s ease;
}

.national-ratings-page.is-loading {
    opacity: 0.68;

    pointer-events: none;
}


/* --------------------------------------------------
   HEADING / SEASON
-------------------------------------------------- */

.national-ratings-toolbar {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 28px;

    margin-bottom: 28px;
}

.national-ratings-heading {
    margin-bottom: 0;
}


.national-ratings-season-control {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.national-ratings-season-control label {
    color: var(--text-secondary);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


.national-ratings-season-control select {
    min-width: 130px;

    padding:
        10px 34px
        10px 12px;

    background:
        var(--surface-primary);

    color:
        var(--text-primary);

    border:
        1px solid
        var(--border-primary);

    font: inherit;

    font-size: 0.82rem;
    font-weight: 700;

    cursor: pointer;
}


/* --------------------------------------------------
   RATINGS NAVIGATION
-------------------------------------------------- */

.national-ratings-nav {
    display: flex;

    flex-wrap: wrap;
    align-items: stretch;

    gap: 0 28px;

    margin-bottom: 34px;

    border-bottom:
        1px solid
        var(--border-primary);

    overflow: visible;
}


.national-ratings-nav a {
    position: relative;

    min-height: 54px;

    display: flex;

    align-items: center;

    color:
        var(--text-secondary);

    font-size: 0.78rem;
    font-weight: 800;

    letter-spacing: 0.04em;

    text-transform: uppercase;

    white-space: nowrap;
}


.national-ratings-nav a:hover,
.national-ratings-nav a.is-active {
    color:
        var(--text-primary);
}


.national-ratings-nav a.is-active::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: -1px;
    left: 0;

    height: 3px;

    background:
        var(--3ng-crimson);
}


/* --------------------------------------------------
   RATINGS PANEL
-------------------------------------------------- */

.national-ratings-panel {
    width: 100%;
}


.national-ratings-table-wrap {
    width: fit-content;

    max-width: 100%;

    margin: 0 auto;
}


.national-ratings-panel__title {
    width: 100%;

    padding: 12px 16px;

    background:
        var(--surface-elevated);

    border:
        1px solid
        var(--border-primary);

    border-bottom: 0;

    box-sizing: border-box;
}


.national-ratings-panel__title h3 {
    margin: 0;

    color:
        var(--text-primary);

    font-size: 1.05rem;
    font-weight: 700;

    line-height: 1.3;
}


/* --------------------------------------------------
   RATINGS TABLE
-------------------------------------------------- */

.national-ratings-table-scroll {
    width: auto;

    max-width: 100%;

    overflow-x: auto;
}


.national-ratings-table {
    width: auto;

    min-width: 620px;

    margin: 0;

    border-collapse: collapse;

    font-variant-numeric:
        tabular-nums;
}


.national-ratings-table th,
.national-ratings-table td {
    padding: 14px 18px;

    border-right:
        1px solid
        var(--border-secondary);

    border-bottom:
        1px solid
        var(--border-secondary);

    text-align: right;

    white-space: nowrap;
}


.national-ratings-table th:first-child,
.national-ratings-table td:first-child {
    border-left:
        1px solid
        var(--border-secondary);
}


.national-ratings-table th:last-child,
.national-ratings-table td:last-child {
    border-right:
        1px solid
        var(--border-secondary);
}


/* Alternating rows */

.national-ratings-table
tbody tr:nth-child(odd) td {
    background:
        var(--surface-primary);
}


.national-ratings-table
tbody tr:nth-child(even) td {
    background:
        rgba(0, 0, 0, 0.035);
}


[data-theme="dark"]
.national-ratings-table
tbody tr:nth-child(even) td {
    background:
        rgba(255, 255, 255, 0.035);
}


/* Header */

.national-ratings-table th {
    background:
        var(--surface-elevated);

    color:
        var(--text-secondary);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.05em;

    text-transform: uppercase;

    cursor: pointer;

    user-select: none;
}


.national-ratings-table th:hover,
.national-ratings-table th.is-sorted {
    color:
        var(--text-primary);
}


/* --------------------------------------------------
   DATA
-------------------------------------------------- */

.national-ratings-table td {
    color:
        var(--text-primary);

    font-size: 0.82rem;

    font-weight: 400;
}


/* Rank */

.national-ratings-table
th:nth-child(1),
.national-ratings-table
td:nth-child(1) {
    width: 80px;

    text-align: center;
}


/* Team */

.national-ratings-table
th:nth-child(2),
.national-ratings-table
td:nth-child(2) {
    min-width: 210px;

    text-align: left;
}


.national-ratings-table
td:nth-child(2) {
    font-weight: 700;
}


.national-ratings-table
td:nth-child(2) a {
    color:
        var(--text-primary);

    font-weight: 700;

    text-decoration: none;
}


.national-ratings-table
td:nth-child(2) a:hover {
    text-decoration: underline;
}


/* Conference */

.national-ratings-table
th:nth-child(3),
.national-ratings-table
td:nth-child(3) {
    min-width: 130px;

    text-align: left;
}


/* Rating */

.national-ratings-table
th:nth-child(4),
.national-ratings-table
td:nth-child(4) {
    min-width: 110px;

    text-align: right;
}


/* Row hover */

.national-ratings-table
tbody tr:hover td {
    background:
        var(--surface-elevated);
}


/* --------------------------------------------------
   SORT INDICATOR
-------------------------------------------------- */

.national-ratings-sort-indicator {
    display: inline-block;

    margin-left: 4px;

    color:
        var(--text-secondary);

    font-size: 0.78rem;

    line-height: 1;

    vertical-align: baseline;
}


/* --------------------------------------------------
   EMPTY STATE
-------------------------------------------------- */

.national-ratings-empty-state {
    padding: 28px 20px;

    color:
        var(--text-secondary);

    font-size: 0.88rem;

    text-align: center;

    border:
        1px solid
        var(--border-primary);

    background:
        var(--surface-primary);
}


/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 900px) {

    .national-ratings-nav {
        gap: 0 22px;
    }

}


@media (max-width: 700px) {

    .national-ratings-page {
        padding-top: 32px;
        padding-bottom: 48px;
    }


    .national-ratings-toolbar {
        align-items: stretch;

        flex-direction: column;

        gap: 20px;
    }


    .national-ratings-season-control {
        width:
            min(100%, 220px);
    }


    .national-ratings-nav {
        flex-wrap: nowrap;

        gap: 0 18px;

        overflow-x: auto;
    }


    .national-ratings-nav a {
        min-width: max-content;

        min-height: 48px;

        flex-shrink: 0;

        font-size: 0.72rem;
    }


    .national-ratings-table th,
    .national-ratings-table td {
        padding:
            13px 12px;
    }

}