/*
 * schedule-v2.css
 * Page-specific styles for the rebuilt /schedule/index.cfm league schedule
 * page. Builds on core.css's tokens/utilities; namespaced with a
 * "c-schedule" prefix. Also styles the standings table markup that is
 * still generated server-side (see _inc/api/schedule.cfc) and injected
 * as raw HTML - those classnames (.standings-table, .details) are kept
 * as-is so this file just needs to give them a vanilla look.
 */

.c-schedule-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--c-space-3);
    margin-bottom: var(--c-space-4);
}

.c-schedule-header--parallax {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 140px;
    margin: 0;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.c-schedule-header--parallax::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.c-schedule-header--parallax .c-schedule-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--c-space-3);
    width: 100%;
    padding-top: var(--c-space-3);
    padding-bottom: var(--c-space-3);
}

.c-schedule-header--parallax .c-heading {
    color: #fff;
    margin: 0;
}

.c-schedule-header__controls {
    display: flex;
    align-items: center;
    gap: var(--c-space-3);
    flex-wrap: wrap;
}

/* Below the point where the heading + selects + icons no longer fit on
   one line, drop the selects/icons to their own full-width row instead
   of overflowing past the viewport edge */
@media only screen and (max-width: 900px) {
    .c-schedule-header__controls {
        flex-basis: 100%;
        justify-content: space-between;
    }

    .c-schedule-filter-form--compact {
        flex: 1 1 auto;
    }

    .c-field--compact {
        flex: 1 1 140px;
        min-width: 0;
    }
}

.c-schedule-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--c-space-4);
    margin-bottom: var(--c-space-5);
}

.c-schedule-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--c-space-3);
}

.c-schedule-filter-field {
    display: flex;
    flex-direction: column;
    gap: var(--c-space-2);
    min-width: 200px;
}

/* Compact variant used inside the parallax header: no stacked labels,
   selects sit inline to the left of the print/share icon buttons */
.c-schedule-filter-form--compact {
    display: flex;
    align-items: center;
    gap: var(--c-space-2);
    flex-wrap: wrap;
}

.c-field--compact {
    width: auto;
    padding: 8px 10px;
    font-size: 13px;
}

.c-schedule-icon-links {
    display: flex;
    align-items: center;
    gap: var(--c-space-2);
    flex-wrap: nowrap;
}

.c-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background-color var(--c-transition), border-color var(--c-transition);
}

.c-btn-icon svg {
    width: 18px;
    height: 18px;
}

.c-btn-icon:hover,
.c-btn-icon:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    color: #fff;
}

.c-schedule-section {
    margin-bottom: var(--c-space-5);
    background: #fff;
    padding: var(--c-space-4);
}

/* -------------------------------------------------------------------- */
/* Games table                                                           */
/* -------------------------------------------------------------------- */
.c-schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.c-schedule-table th {
    text-align: left;
    padding: var(--c-space-2) var(--c-space-3);
    background: var(--c-color-bg-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--c-color-text-muted);
}

.c-schedule-table td {
    padding: var(--c-space-3);
    border-bottom: 1px solid var(--c-color-border);
    vertical-align: top;
}

.c-schedule-table__day-row td {
    background: var(--c-color-bg-alt);
    font-family: var(--c-font-family-heading);
    font-size: 18px;
    border-bottom: 2px solid var(--c-color-border);
}

.c-schedule-table__byes td {
    background: var(--c-color-bg-alt);
    font-size: 13px;
    color: var(--c-color-text-muted);
}

.c-schedule-table__field {
    text-align: center;
    white-space: nowrap;
}

.c-schedule-table tbody tr:not(.c-schedule-table__day-row):not(.c-schedule-table__byes):hover td {
    background-color: #f4f4f4;
}

/* -------------------------------------------------------------------- */
/* Standings (markup rendered server-side, injected as raw HTML)         */
/* -------------------------------------------------------------------- */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--c-space-3);
}

.standings-table th,
.standings-table td {
    padding: var(--c-space-2) var(--c-space-3);
    border-bottom: 1px solid var(--c-color-border);
}

.standings-table th {
    background: var(--c-color-bg-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--c-color-text-muted);
    text-align: center;
}

.standings-table tbody tr:hover td {
    background-color: #f4f4f4;
}

.details {
    font-size: 13px;
    color: var(--c-color-text-muted);
}

/* -------------------------------------------------------------------- */
/* Standings tabs (Overall / Division), emitted by showStandingsByLeague  */
/* -------------------------------------------------------------------- */
#standings-tabs {
    display: flex;
    gap: var(--c-space-2);
    list-style: none;
    margin: 0 0 var(--c-space-3);
    padding: 0;
    border-bottom: 1px solid var(--c-color-border);
}

#standings-tabs .nav-link {
    display: inline-block;
    padding: 8px 14px;
    color: var(--c-color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

#standings-tabs .nav-link.active {
    color: var(--c-color-primary);
    border-bottom-color: var(--c-color-primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* playoff round / exhibition tag on a game (schedule.js, daily.js, home.js) */
.c-game-type {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}
