/* ===========================================================================
   TBS San Juan - Public games shortcode
   ========================================================================== */

.tbs-games-page {
    --tbs-games-surface: #101014;
    --tbs-games-surface-elevated: #17171c;
    --tbs-games-border: rgba(255, 255, 255, 0.1);
    --tbs-games-border-strong: rgba(212, 175, 55, 0.28);
    --tbs-games-text: #f7f4ed;
    --tbs-games-muted: rgba(255, 255, 255, 0.66);
    --tbs-games-gold: var(--accent-gold, #d4af37);
    --tbs-games-red: var(--primary-red, #e6192b);

    background:
        radial-gradient(circle at 50% 0, rgba(230, 25, 43, 0.11), transparent 32rem),
        linear-gradient(180deg, #050506 0, #0b0b0d 100%);
    color: var(--tbs-games-text);
    padding-bottom: 72px;
}

.tbs-games-page *,
.tbs-games-page *::before,
.tbs-games-page *::after {
    box-sizing: border-box;
}

.tbs-games-page__hero {
    padding: 68px 20px 32px;
    text-align: center;
}

.tbs-games-page__eyebrow {
    color: var(--tbs-games-gold);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tbs-games-page__title {
    margin: 8px 0 0;
    color: var(--tbs-games-text);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.95;
    text-transform: uppercase;
}

.tbs-games-page__content {
    padding: 0 20px;
}

.tbs-games-page__article {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.tbs-games-page .goat-shortcode {
    --goat-surface: transparent;
    --goat-surface-alt: transparent;
    --goat-text: var(--tbs-games-text);
    --goat-muted: var(--tbs-games-muted);
    --goat-border: var(--tbs-games-border);
    --goat-accent: var(--tbs-games-red);
    --goat-accent-contrast: #ffffff;
    --goat-highlight: var(--tbs-games-gold);

    color: var(--tbs-games-text);
}

.tbs-games-page .goat-shortcode .goat-module {
    margin: 0;
    color: inherit;
}

.tbs-games-page .goat-shortcode .goat-schedule-list {
    overflow: hidden;
    border: 1px solid var(--tbs-games-border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item {
    grid-template-columns: minmax(140px, 0.8fr) minmax(0, 2fr) minmax(135px, 0.75fr);
    gap: 24px;
    min-width: 0;
    padding: 18px 22px;
    border-bottom-color: var(--tbs-games-border);
    transition: background-color 160ms ease;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item:last-child {
    border-bottom: 0;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item--linked {
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

@media (hover: hover) {
    .tbs-games-page .goat-shortcode .goat-schedule-list__item--linked:hover {
        background: rgba(255, 255, 255, 0.035);
        box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.24);
    }
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item--linked:focus-visible {
    outline: 2px solid var(--tbs-games-gold);
    outline-offset: -3px;
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.42);
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item time {
    gap: 4px;
    color: var(--tbs-games-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item time strong {
    color: var(--tbs-games-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__teams {
    gap: 16px;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__teams span {
    min-width: 0;
    overflow-wrap: break-word;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__team {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__team--home {
    justify-content: flex-end;
    text-align: right;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__team--away {
    justify-content: flex-start;
    text-align: left;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__team-name {
    min-width: 0;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__logo {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__teams strong {
    color: var(--tbs-games-gold);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item > div:last-child {
    justify-items: end;
    gap: 7px;
    text-align: right;
}

.tbs-games-page .goat-shortcode .goat-status {
    border: 1px solid rgba(230, 25, 43, 0.55);
    border-radius: 999px;
    background: rgba(230, 25, 43, 0.14);
    color: #ffffff;
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.1;
    padding: 6px 10px;
    text-transform: uppercase;
}

.tbs-games-page .goat-shortcode .goat-schedule-list__item small {
    color: var(--tbs-games-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.tbs-games-page .goat-shortcode .goat-module__empty {
    margin: 0;
    border-color: var(--tbs-games-border-strong);
    border-radius: 8px;
    background: var(--tbs-games-surface);
    color: var(--tbs-games-muted);
}

.tbs-games-page .goat-shortcode :focus-visible {
    outline: 2px solid var(--tbs-games-gold);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .tbs-games-page {
        padding-bottom: 48px;
    }

    .tbs-games-page__hero {
        padding: 48px 16px 24px;
    }

    .tbs-games-page__content {
        padding: 0 14px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px 12px;
        padding: 16px;
        border: 1px solid var(--tbs-games-border);
        border-radius: 8px;
        background: linear-gradient(145deg, var(--tbs-games-surface-elevated), var(--tbs-games-surface));
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__item + .goat-schedule-list__item {
        margin-top: 12px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__item time {
        align-self: start;
        font-size: 0.76rem;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__teams {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) minmax(54px, max-content) minmax(0, 1fr);
        gap: 10px;
        font-size: 0.94rem;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__team {
        gap: 7px;
        min-width: 0;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__team-name {
        min-width: 0;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__logo {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__teams strong {
        font-size: 1.32rem;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__item > div:last-child {
        grid-column: 1 / -1;
        width: 100%;
        align-self: start;
        justify-items: center;
        gap: 8px;
        text-align: center;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__item small {
        width: 100%;
        margin-inline: auto;
        padding-inline: 8px;
        color: var(--tbs-games-muted);
        text-align: center;
        white-space: normal;
        overflow-wrap: break-word;
    }
}

@media (max-width: 390px) {
    .tbs-games-page .goat-shortcode .goat-schedule-list__item {
        padding: 14px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__teams {
        grid-template-columns: minmax(0, 1fr) minmax(48px, max-content) minmax(0, 1fr);
        gap: 8px;
        font-size: 0.86rem;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__team {
        gap: 5px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__logo {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .tbs-games-page .goat-shortcode .goat-schedule-list__teams strong {
        font-size: 1.18rem;
    }
}

.tbs-games-page .goat-pagination {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.tbs-games-page .goat-pagination__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbs-games-page .goat-pagination__link,
.tbs-games-page .goat-pagination__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--tbs-games-border);
    border-radius: 6px;
    color: var(--tbs-games-text);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tbs-games-page .goat-pagination__link:hover {
    border-color: rgba(212, 175, 55, 0.58);
    background: rgba(212, 175, 55, 0.1);
    color: var(--tbs-games-gold);
}

.tbs-games-page .goat-pagination__link:focus-visible {
    outline: 2px solid var(--tbs-games-gold);
    outline-offset: 3px;
}

.tbs-games-page .goat-pagination__current {
    border-color: rgba(212, 175, 55, 0.66);
    background: rgba(212, 175, 55, 0.16);
    color: var(--tbs-games-gold);
}

.tbs-games-page .goat-pagination__link--prev,
.tbs-games-page .goat-pagination__link--next {
    color: var(--tbs-games-gold);
    font-size: 1.35rem;
}

.tbs-games-page .goat-pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 40px;
    color: var(--tbs-games-muted);
    font-size: 1.15rem;
    line-height: 1;
}

.tbs-games-page .goat-games-filter {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid var(--tbs-games-border);
    border-radius: 8px;
    background: var(--tbs-games-surface);
}

.tbs-games-page .goat-games-filter__field {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 6px;
    max-width: 440px;
}

.tbs-games-page .goat-games-filter__label {
    color: var(--tbs-games-text);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tbs-games-page .goat-games-filter__select,
.tbs-games-page .goat-games-filter__submit,
.tbs-games-page .goat-games-filter__clear {
    min-height: 40px;
    border-radius: 6px;
    font: inherit;
}

.tbs-games-page .goat-games-filter__select {
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--tbs-games-border);
    background: var(--tbs-games-surface-elevated);
    color: var(--tbs-games-text);
}

.tbs-games-page .goat-games-filter__submit {
    padding: 0 16px;
    border: 1px solid rgba(212, 175, 55, 0.64);
    background: rgba(212, 175, 55, 0.14);
    color: var(--tbs-games-gold);
    font-family: var(--font-heading, Oswald, sans-serif);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tbs-games-page .goat-games-filter__clear {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: var(--tbs-games-muted);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tbs-games-page .goat-games-filter__select:focus-visible,
.tbs-games-page .goat-games-filter__submit:focus-visible,
.tbs-games-page .goat-games-filter__clear:focus-visible {
    outline: 2px solid var(--tbs-games-gold);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .tbs-games-page .goat-games-filter__submit:hover {
        border-color: var(--tbs-games-gold);
        background: rgba(212, 175, 55, 0.22);
        color: var(--tbs-games-text);
    }

    .tbs-games-page .goat-games-filter__clear:hover {
        color: var(--tbs-games-gold);
    }
}

@media (max-width: 560px) {
    .tbs-games-page .goat-games-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .tbs-games-page .goat-games-filter__field {
        max-width: none;
    }

    .tbs-games-page .goat-games-filter__submit,
    .tbs-games-page .goat-games-filter__clear {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 390px) {
    .tbs-games-page .goat-pagination__list {
        gap: 6px;
    }
}
