.pressbox-schedule {
    --pressbox-surface: var(--wp--preset--color--base, #ffffff);
    --pressbox-text: var(--wp--preset--color--contrast, #172033);
    --pressbox-muted: color-mix(
        in srgb,
        var(--pressbox-text) 68%,
        transparent
    );
    --pressbox-border: color-mix(
        in srgb,
        var(--pressbox-text) 18%,
        transparent
    );
    --pressbox-soft: color-mix(
        in srgb,
        var(--pressbox-text) 5%,
        transparent
    );
    --pressbox-accent: var(
        --wp--preset--color--primary,
        #175ea8
    );
    --pressbox-accent-soft: color-mix(
        in srgb,
        var(--pressbox-accent) 11%,
        var(--pressbox-surface)
    );

    color: var(--pressbox-text);
    display: grid;
    gap: 1.5rem;
    margin-block: 1.5rem;
    width: 100%;
}

.pressbox-schedule *,
.pressbox-schedule *::before,
.pressbox-schedule *::after {
    box-sizing: border-box;
}

.pressbox-schedule__heading,
.pressbox-schedule-day__heading,
.pressbox-event-card__title {
    margin: 0;
}

.pressbox-schedule-toolbar {
    background: var(--pressbox-surface);
    border: 1px solid var(--pressbox-border);
    border-radius: 1rem;
    box-shadow: 0 0.45rem 1.6rem rgba(15, 23, 42, 0.055);
    display: grid;
    overflow: hidden;
}

.pressbox-schedule-tabs {
    background: var(--pressbox-soft);
    border-bottom: 1px solid var(--pressbox-border);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
}

.pressbox-schedule-tab {
    align-items: center;
    color: var(--pressbox-muted);
    display: flex;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.55rem;
    justify-content: center;
    min-height: 3.35rem;
    padding: 0.75rem 1rem;
    position: relative;
    text-align: center;
    text-decoration: none;
}

.pressbox-schedule-tab + .pressbox-schedule-tab {
    border-left: 1px solid var(--pressbox-border);
}

.pressbox-schedule-tab::after {
    background: transparent;
    bottom: 0;
    content: "";
    height: 3px;
    left: 0.8rem;
    position: absolute;
    right: 0.8rem;
}

.pressbox-schedule-tab:hover,
.pressbox-schedule-tab:focus-visible,
.pressbox-schedule-tab.is-active {
    color: var(--pressbox-text);
}

.pressbox-schedule-tab.is-active {
    background: var(--pressbox-surface);
}

.pressbox-schedule-tab.is-active::after {
    background: var(--pressbox-accent);
}

.pressbox-schedule-tab__count {
    align-items: center;
    background: color-mix(
        in srgb,
        var(--pressbox-text) 9%,
        transparent
    );
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    justify-content: center;
    line-height: 1;
    min-height: 1.45rem;
    min-width: 1.45rem;
    padding: 0.2rem 0.42rem;
}

.pressbox-schedule-tab.is-active .pressbox-schedule-tab__count {
    background: var(--pressbox-accent-soft);
    color: var(--pressbox-accent);
}


.pressbox-schedule-filter-panel {
    display: block;
}

.pressbox-schedule-filter-panel__summary {
    display: none;
}

.pressbox-schedule-filter-panel:not([open]) > .pressbox-schedule-filters {
    display: grid;
}

.pressbox-schedule-filter-panel__count {
    align-items: center;
    background: var(--pressbox-accent-soft);
    border-radius: 999px;
    color: var(--pressbox-accent);
    display: inline-flex;
    font-size: 0.72rem;
    justify-content: center;
    line-height: 1;
    min-height: 1.45rem;
    min-width: 1.45rem;
    padding: 0.2rem 0.42rem;
}

.pressbox-schedule-filters {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 1rem;
}

.pressbox-schedule-filters__grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(9rem, 1fr));
}

.pressbox-schedule-filter {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
}

.pressbox-schedule-filter > span {
    color: var(--pressbox-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.pressbox-schedule-filter select,
.pressbox-schedule-filter input[type="date"] {
    appearance: none;
    background-color: var(--pressbox-surface);
    border: 1px solid var(--pressbox-border);
    border-radius: 0.55rem;
    color: var(--pressbox-text);
    font: inherit;
    font-size: 0.88rem;
    height: 2.7rem;
    line-height: 1.2;
    margin: 0;
    max-width: none;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    width: 100%;
}

.pressbox-schedule-filter select {
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        calc(100% - 1rem) 1.08rem,
        calc(100% - 0.72rem) 1.08rem;
    background-repeat: no-repeat;
    background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
    padding-right: 2rem;
}

.pressbox-schedule-filter select:focus,
.pressbox-schedule-filter input[type="date"]:focus {
    border-color: var(--pressbox-accent);
    box-shadow: 0 0 0 2px color-mix(
        in srgb,
        var(--pressbox-accent) 18%,
        transparent
    );
    outline: none;
}

.pressbox-schedule-filters__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pressbox-schedule-filter-button {
    appearance: none;
    background: var(--pressbox-accent);
    border: 1px solid var(--pressbox-accent);
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1;
    margin: 0;
    min-height: 2.5rem;
    padding: 0.65rem 1rem;
}

.pressbox-schedule-filter-button:hover,
.pressbox-schedule-filter-button:focus-visible {
    filter: brightness(0.92);
}

.pressbox-schedule-clear {
    color: var(--pressbox-muted);
    font-size: 0.86rem;
    font-weight: 650;
    text-underline-offset: 0.16em;
}

.pressbox-schedule__summary {
    color: var(--pressbox-muted);
    font-size: 0.88rem;
    margin-top: -0.45rem;
}

.pressbox-schedule__empty {
    background: var(--pressbox-soft);
    border: 1px solid var(--pressbox-border);
    border-radius: 0.85rem;
    margin: 0;
    padding: 1.1rem 1.2rem;
}

.pressbox-schedule__empty p {
    color: var(--pressbox-muted);
    margin: 0.3rem 0 0;
}

.pressbox-schedule-day {
    display: grid;
    gap: 0.75rem;
}

.pressbox-schedule-day__heading {
    border-bottom: 2px solid currentColor;
    font-size: clamp(1.1rem, 2.4vw, 1.35rem);
    padding-bottom: 0.45rem;
}

.pressbox-schedule-day__events {
    display: grid;
    gap: 1rem;
}

.pressbox-event-card {
    background: var(--pressbox-surface);
    border: 1px solid var(--pressbox-border);
    border-radius: 0.85rem;
    overflow: hidden;
}

.pressbox-event-card__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.pressbox-event-card__identity {
    min-width: 0;
}

.pressbox-event-card__eyebrow {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.42rem;
}

.pressbox-event-card__sport,
.pressbox-event-card__venue,
.pressbox-badge {
    align-items: center;
    display: inline-flex;
}

.pressbox-event-card__sport {
    color: var(--pressbox-accent);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.pressbox-event-card__level {
    border-left: 1px solid var(--pressbox-border);
    color: var(--pressbox-muted);
    font-size: 0.8rem;
    font-weight: 650;
    padding-left: 0.65rem;
}

.pressbox-icon {
    fill: none;
    flex: 0 0 auto;
    height: 1rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
    width: 1rem;
}

.pressbox-event-card__title {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.25;
}

.pressbox-event-card__title a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

.pressbox-event-card__meta,
.pressbox-contest-row__secondary,
.pressbox-event-card__badges,
.pressbox-event-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}

.pressbox-event-card__meta {
    color: var(--pressbox-muted);
    font-size: 0.9rem;
    margin-top: 0.55rem;
}

.pressbox-event-card__venue {
    gap: 0.34rem;
}

.pressbox-event-card__venue .pressbox-icon {
    color: var(--pressbox-accent);
}

.pressbox-event-card__source {
    border-left: 1px solid var(--pressbox-border);
    padding-left: 0.75rem;
}

.pressbox-contest-row__secondary span:not(:last-child)::after {
    content: "·";
    margin-left: 0.75rem;
}

.pressbox-event-card__badges {
    justify-content: flex-end;
}

.pressbox-badge {
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
    gap: 0.32rem;
    line-height: 1;
    padding: 0.4rem 0.58rem;
    white-space: nowrap;
}

.pressbox-badge--status {
    background: var(--pressbox-soft);
    border-color: var(--pressbox-border);
}

.pressbox-badge--in-progress {
    background: rgba(13, 148, 136, 0.13);
    border-color: rgba(13, 148, 136, 0.3);
    color: #0f766e;
}

.pressbox-badge--final {
    background: rgba(71, 85, 105, 0.11);
    border-color: rgba(71, 85, 105, 0.25);
    color: #475569;
}

.pressbox-badge--postponed {
    background: rgba(217, 119, 6, 0.13);
    border-color: rgba(217, 119, 6, 0.3);
    color: #92400e;
}

.pressbox-badge--canceled {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.28);
    color: #991b1b;
}

.pressbox-badge--coverage {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.24);
    color: #1d4ed8;
}

.pressbox-badge--coverage-covering {
    background: rgba(250, 204, 21, 0.22);
    border-color: rgba(202, 138, 4, 0.38);
    color: #854d0e;
}

.pressbox-badge--coverage-published {
    background: rgba(22, 163, 74, 0.11);
    border-color: rgba(22, 163, 74, 0.26);
    color: #166534;
}

.pressbox-badge--coverage-no-coverage {
    background: rgba(71, 85, 105, 0.08);
    border-color: rgba(71, 85, 105, 0.2);
    color: #475569;
}

.pressbox-event-card__contests {
    border-top: 1px solid var(--pressbox-border);
}

.pressbox-contest-row {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 2.8fr) auto;
    padding: 0.8rem 1rem;
}

.pressbox-contest-row + .pressbox-contest-row {
    border-top: 1px solid var(--pressbox-border);
}

.pressbox-contest-row__time {
    font-size: 0.9rem;
    font-weight: 650;
}

.pressbox-contest-row__matchup {
    min-width: 0;
}

.pressbox-contest-row__secondary {
    color: var(--pressbox-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.pressbox-contest-row__secondary a {
    color: inherit;
}

.pressbox-contest-row__result {
    font-size: 1rem;
    font-weight: 750;
    min-width: 3rem;
    text-align: right;
    white-space: nowrap;
}

.pressbox-event-card__time {
    border-top: 1px solid var(--pressbox-border);
    margin: 0;
    padding: 0.8rem 1rem;
}

.pressbox-event-card__footer {
    align-items: center;
    background: var(--pressbox-soft);
    border-top: 1px solid var(--pressbox-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.8rem 1rem;
}

.pressbox-link-button,
.pressbox-event-card__details {
    color: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    text-underline-offset: 0.15em;
}

.pressbox-link-button {
    border: 1px solid var(--pressbox-border);
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
    text-decoration: none;
}

.pressbox-link-button:hover,
.pressbox-link-button:focus-visible {
    background: var(--pressbox-surface);
}

@media (max-width: 1050px) {
    .pressbox-schedule-filters__grid {
        grid-template-columns: repeat(3, minmax(9rem, 1fr));
    }
}

@media (max-width: 780px) {
    .pressbox-schedule-filters__grid {
        grid-template-columns: repeat(2, minmax(9rem, 1fr));
    }
}

@media (max-width: 700px) {
    .pressbox-event-card__header,
    .pressbox-event-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pressbox-event-card__badges {
        justify-content: flex-start;
    }

    .pressbox-contest-row {
        align-items: start;
        grid-template-columns: 1fr auto;
    }

    .pressbox-contest-row__time {
        grid-column: 1 / -1;
    }

    .pressbox-event-card__details {
        align-self: flex-start;
    }
}

@media (max-width: 560px) {

    .pressbox-schedule-filter-panel__summary {
        align-items: center;
        cursor: pointer;
        display: flex;
        font-size: 0.9rem;
        font-weight: 750;
        gap: 0.55rem;
        justify-content: space-between;
        list-style: none;
        min-height: 3rem;
        padding: 0.7rem 1rem;
    }

    .pressbox-schedule-filter-panel__summary::-webkit-details-marker {
        display: none;
    }

    .pressbox-schedule-filter-panel__summary::after {
        border-bottom: 2px solid currentColor;
        border-right: 2px solid currentColor;
        content: "";
        height: 0.5rem;
        margin-left: auto;
        transform: rotate(45deg) translateY(-0.15rem);
        transition: transform 160ms ease;
        width: 0.5rem;
    }

    .pressbox-schedule-filter-panel[open]
        > .pressbox-schedule-filter-panel__summary {
        border-bottom: 1px solid var(--pressbox-border);
    }

    .pressbox-schedule-filter-panel[open]
        > .pressbox-schedule-filter-panel__summary::after {
        transform: rotate(225deg) translate(-0.1rem, -0.05rem);
    }

    .pressbox-schedule-filter-panel:not([open])
        > .pressbox-schedule-filters {
        display: none;
    }
    .pressbox-schedule-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .pressbox-schedule-tab {
        flex: 1 0 auto;
        min-width: 9.5rem;
    }

    .pressbox-schedule-filters__grid {
        grid-template-columns: 1fr;
    }

    .pressbox-schedule-filter-button {
        width: 100%;
    }

    .pressbox-schedule-clear {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 440px) {
    .pressbox-event-card__header,
    .pressbox-event-card__footer,
    .pressbox-contest-row {
        padding-inline: 0.8rem;
    }

    .pressbox-event-card__level {
        border-left: 0;
        padding-left: 0;
        width: 100%;
    }

    .pressbox-contest-row {
        grid-template-columns: 1fr;
    }

    .pressbox-contest-row__result {
        text-align: left;
    }
}

/* v0.18.3: align the Schedule page with the PressBox public page system. */
.pressbox-schedule {
    margin-block: 0;
    padding-top: clamp(28px, 5vw, 70px);
}

.pressbox-schedule-hero {
    display: grid;
    gap: 13px;
    max-width: 850px;
    margin-bottom: clamp(18px, 3vw, 34px);
}

.pressbox-schedule-hero__eyebrow {
    margin: 0;
    color: #1f6fc5;
    font-size: 0.77rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pressbox-schedule-hero__title {
    margin: 0;
    color: #102234;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.pressbox-schedule-hero__description {
    max-width: 720px;
    margin: 0;
    color: #536579;
    font-size: clamp(1rem, 1.7vw, 1.18rem);
    line-height: 1.65;
}

/* Keep time, matchup, and result columns balanced at the 1180px page width. */
.pressbox-contest-row {
    grid-template-columns: minmax(7.5rem, 0.7fr) minmax(0, 2.4fr) minmax(4.5rem, 0.5fr);
    gap: clamp(0.9rem, 2vw, 1.5rem);
}

.pressbox-contest-row__time {
    justify-self: center;
    text-align: center;
}

.pressbox-contest-row__result {
    justify-self: end;
    min-width: 4.5rem;
}

.pressbox-contest-row.has-score .pressbox-contest-row__matchup {
    grid-column: 2 / 4;
    justify-self: center;
    width: min(100%, 640px);
}

.pressbox-contest-scoreboard {
    display: grid;
    gap: 0.24rem;
    width: 100%;
}

.pressbox-contest-scoreboard__team {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(2.5rem, auto);
    gap: 1.25rem;
    align-items: baseline;
}

.pressbox-contest-scoreboard__name {
    min-width: 0;
    text-align: left;
}

.pressbox-contest-scoreboard__value {
    min-width: 2.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pressbox-contest-scoreboard__team.is-winner {
    font-weight: 800;
}

.pressbox-contest-row.has-score .pressbox-contest-row__secondary {
    justify-content: flex-start;
}

@media (max-width: 700px) {
    .pressbox-contest-row,
    .pressbox-contest-row.has-score {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pressbox-contest-row__time {
        grid-column: 1 / -1;
        justify-self: start;
        text-align: left;
    }

    .pressbox-contest-row.has-score .pressbox-contest-row__matchup {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
    }
}

@media (max-width: 440px) {
    .pressbox-contest-scoreboard__team {
        grid-template-columns: minmax(0, 1fr) 2.5rem;
        gap: 0.75rem;
    }
}

@media (max-width: 440px) {
    .pressbox-contest-row,
    .pressbox-contest-row.has-score {
        grid-template-columns: 1fr;
    }

    .pressbox-contest-row__result {
        justify-self: start;
        text-align: left;
    }
}

/* v0.20.1: reserve the page-introduction rail for the presenting sponsor. */
.pressbox-schedule-hero {
    width: 100%;
    max-width: none;
}

.pressbox-schedule-hero.has-sponsor {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    gap: clamp(28px, 5vw, 60px);
    align-items: center;
}

.pressbox-schedule-hero__content {
    display: grid;
    gap: 13px;
    min-width: 0;
    max-width: 820px;
}

.pressbox-schedule-hero__sponsor,
.pressbox-schedule-standalone-sponsor {
    min-width: 0;
}

@media (max-width: 820px) {
    .pressbox-schedule-hero.has-sponsor {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pressbox-schedule-hero__sponsor {
        width: min(100%, 420px);
    }
}
