/* Club Week Schedule — weekly list of upcoming games, all teams */

.cws-week {
    margin: 0 0 24px;
}

.cws-heading {
    margin: 0 0 2px;
    font-size: 1.35rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cws-range {
    margin: 0 0 18px;
    font-size: 0.85rem;
    opacity: 0.65;
}

/* The filter script hides rows, day groups and the town row with the `hidden`
   attribute. Its default `display: none` loses to the `display: grid`/`flex`
   rules below, so it has to be restated here. */
.cws-week [hidden] {
    display: none !important;
}

/* Visitor filter buttons */
.cws-filters,
.cws-towns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.cws-towns {
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 2px solid #ececec;
}

/* Themes like to style `button` on hover with a transform, a heavier font or
   extra padding, which makes a row of pills jump around as the pointer crosses
   it. Everything that could change a button's box is pinned to the same value
   in every state, so only the colours move. */
.cws-filter,
.cws-filter:hover,
.cws-filter:focus,
.cws-filter:active,
.cws-filter.is-active,
.cws-filter[disabled] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-style: solid;
    border-width: 1px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    transform: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.cws-filter {
    border-color: #dcdcdc;
    background: #fff;
    color: inherit;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.cws-filter:hover {
    border-color: #c8102e;
    background: #fff;
    color: #c8102e;
}

.cws-filter:focus-visible {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

.cws-filter.is-active,
.cws-filter.is-active:hover {
    background: #c8102e;
    border-color: #c8102e;
    color: #fff;
}

/* A home town with no game this week: still listed, so the control reads the
   same every week, but nothing to click. */
.cws-filter.is-empty,
.cws-filter.is-empty:hover {
    border-color: #ececec;
    background: #fafafa;
    color: inherit;
    opacity: 0.45;
    cursor: default;
}

.cws-count {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.07);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.cws-filter.is-active .cws-count {
    background: rgba(255, 255, 255, 0.22);
}

.cws-no-match {
    padding: 18px;
    border: 1px dashed #d8d8d8;
    border-radius: 10px;
    text-align: center;
    opacity: 0.75;
}

/* The first day heading sits right under the filters, so it needs less air */
.cws-day-group:first-of-type .cws-day {
    margin-top: 6px;
}

.cws-empty {
    padding: 18px;
    border: 1px dashed #d8d8d8;
    border-radius: 10px;
    text-align: center;
    opacity: 0.75;
}

/* Day heading: a red rule under the weekday */
.cws-day {
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #c8102e;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cws-games {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

/* One game: time | league | teams | arena.
   A fixed-width time and league column keeps the team names aligned down the
   list, which is what makes a 20-game week readable at a glance. */
.cws-game {
    display: grid;
    grid-template-columns: 52px 120px 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    font-size: 0.92rem;
}

.cws-game:nth-child(even) {
    background: #fafafa;
}

.cws-past {
    opacity: 0.5;
}

.cws-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cws-league {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #141414;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cws-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.cws-team.cws-ours {
    font-weight: 700;
    color: #c8102e;
}

.cws-vs {
    font-size: 0.78rem;
    opacity: 0.5;
}

.cws-friendly {
    padding: 1px 6px;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    font-size: 0.68rem;
    opacity: 0.7;
}

.cws-arena {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: right;
}

/* Narrow column or phone: the four-column row is cramped well before a phone
   width (a sidebar or a narrow theme container does it too), so stack early.
   Time and league share the first line, teams and venue get a line each. */
@media (max-width: 782px) {
    .cws-game {
        grid-template-columns: 52px 1fr;
        gap: 2px 10px;
        padding: 10px 12px;
    }

    .cws-league {
        justify-self: start;
    }

    .cws-teams,
    .cws-arena {
        grid-column: 1 / -1;
        text-align: left;
    }

    .cws-arena {
        opacity: 0.6;
    }
}

/* Editor placeholder */
.cws-editor-placeholder {
    padding: 16px;
    border: 1px dashed #c3c3c3;
    border-radius: 8px;
    background: #fbfbfb;
}

.cws-editor-placeholder p {
    margin: 6px 0 0;
}

.cws-editor-note {
    font-size: 0.8rem;
    opacity: 0.6;
}
