/* ============================================================
   MatchSchedule — styles.css
   World Cup 2026
   ============================================================ */

@font-face {
    font-family: 'MosesText';
    src: url('../assets/fonts/MosesText_Inter-VF.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* ── Design tokens ────────────────────────────────────────── */
:root {
    --primary-red:   #E41D35;
    --primary-blue:  #526BDB;
    --text-dark:     #03122B;
    --text-light:    #666666;
    --bg-light:      #F5F5F5;
    --bg-page:       #EEF2FB;
    --border-gray:   #E4E8F0;
    --navy:          #00182F;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: 'MosesText', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    color: var(--text-dark);
    direction: rtl;
    min-height: 100vh;
    max-width: 1240px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   HEADER  (Teams-style)
   ═══════════════════════════════════════════════════════════ */

.page-header {
    background-color: var(--bg-page);
    position: relative;
    user-select: none;
}

.header-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    height: 95px;
    border-radius: 8px 8px 0 0;
    background-color: var(--navy);
    background-image: url('../assets/images/Teams_bg.png?v=c2059735');
    background-size: cover;
    background-position: center;
    /* allow trophy to overflow below */
    clip-path: inset(0 0 -200px 0);
    overflow: visible;
}

/* Decorative tab — top half (blue) peeking from right edge */
.header-inner::before {
    content: '';
    position: absolute;
    right: -53px;
    top: 0;
    width: 97px;
    height: 47.5px;
    background: #218AF3;
    border-radius: 10000px 0 0 0;
    pointer-events: none;
    z-index: 2;
}

/* Decorative tab — bottom half (red) */
.header-inner::after {
    content: '';
    position: absolute;
    right: -53px;
    bottom: 0;
    width: 97px;
    height: 47.5px;
    background: #324DFD;
    border-radius: 10000px 0 0 0;
    pointer-events: none;
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* RTL: flex-start = physical right */
    height: 100%;
    padding: 0 50px;
}

.header-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.header-trophy {
    position: absolute;
    bottom: -45px;
    left: 20px;
    height: 88px;
    width: auto;
    object-fit: contain;
    z-index: 10;
}

/* ═══════════════════════════════════════════════════════════
   VIEW SWITCHER
   ═══════════════════════════════════════════════════════════ */

.view-switcher {
    background: var(--bg-page);
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* RTL: start = right — buttons cluster to the right */
    gap: 30px;
    border-radius: 0 0 8px 8px;
}

.view-btn {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'MosesText', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 28px;
    padding: 2px 0;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.view-btn--active {
    font-weight: 700;
}

.view-btn:hover:not(.view-btn--active) {
    opacity: 0.6;
}

.view-btn__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.view-btn__label--mobile {
    display: none;
}

.view-btn__icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════
   VIEW CONTAINERS
   ═══════════════════════════════════════════════════════════ */

.schedule-view {
    display: block;
}

.schedule-view--hidden {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   INTERACTIVE CALENDAR VIEW  (adapted from InteractiveCalendar)
   ═══════════════════════════════════════════════════════════ */

/* ── Date-filter strip — calendar style ────────────────── */

#date-filters {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin: 12px 20px 0;
    overflow: hidden;
}

.date-filters__title {
    background-color: var(--text-dark);
    color: #fff;
    text-align: center;
    font-family: 'MosesText', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 5px 0;
    line-height: 1.3;
    margin-bottom:3px;
}

#date-filters .filter-content {
    display: flex;
    flex-direction: row;
    gap: 7px;
    padding: 0;
}

/* Month group — spans its proportional share of cells */
.date-month-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.date-month-group:last-child {
    border-left: none;
}

.date-month-label {
    background-color: var(--text-dark);
    color: #fff;
    text-align: center;
    font-family: 'MosesText', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.date-month-cells {
    display: flex;
    flex-direction: row;
}

/* Individual date cell */
.date-month-cells .filter-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
    border: none;
    border-right: 1px solid var(--border-gray);
    border-radius: 0;
    background-color: #fff;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
    font-weight: 400;
}

.date-month-cells .filter-link:last-child {
    border-right: none;
}

.date-month-cells .filter-link:hover:not(.active) {
    background-color: var(--bg-page);
}

.filter-link__day {
    display: block;
    font-family: 'MosesText', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.filter-link__dow {
    display: block;
    font-family: 'MosesText', sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    opacity: 0.8;
}

.date-month-cells .filter-link.active {
    background-color: var(--text-dark);
    color: #fff;
    border-right-color: transparent;
}

.date-month-cells .filter-link.active .filter-link__dow {
    opacity: 1;
}

.date-month-cells .filter-link.current-date {
    box-shadow: inset 0 0 0 2px #FFA500;
}

.date-month-cells .filter-link.related {
    background-color: rgba(228, 29, 53, 0.08);
}

/* 3-column main layout */
#main-schedule {
    max-width: 1240px;
    margin: 12px 20px 0;
    display: grid;
    grid-template-columns: 185px 1fr 185px;
    gap: 12px;
}

/* Sidebar filter panels */
.filter-panel {
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Dark full-width header (used by country-filters) */
.filter-panel__title--dark {
    background-color: #03122B;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    padding: 8px 6px;
    border-radius: 0;
    border-bottom: none;
}

#country-filters {
    border-radius: 0;
}

#group-filters,
#country-filters {
    height: 100%;
    max-height: calc(100vh - 320px);
    display: flex;
    flex-direction: column;
}

#group-filters .filter-content,
#country-filters .filter-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    direction: ltr; /* scrollbar on the right despite RTL page */
}

#group-filters .filter-content > *,
#country-filters .filter-content > * {
    direction: rtl; /* restore RTL for the items themselves */
}

/* Filter links (sidebar) */
.filter-link {
    padding: 7px 10px;
    border: none;
    background-color: #fff;
    color: var(--text-dark);
    cursor: pointer;
    font-family: 'MosesText', sans-serif;
    font-size: 0.9em;
    transition: all 0.2s;
    text-align: center;
}

.filter-link.active {
    background-color: #000;
    color: #fff;
    font-weight: 700;
}

.filter-link.related {
    background-color: #e8eaf6;
    border-color: #9fa8da;
    font-weight: 500;
}

/* Hover state — uniform across all sidebar filter buttons */
.filter-link:hover:not(.active) {
    background-color: #F0F0F0;
}

/* Country filter button — flag on the right, name on the left (RTL flex row) */
.filter-link--country {
    display: flex;
    flex-direction: row;      /* RTL: first child = right */
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: right;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-gray);
    border-top: none;
    border-left: none;
    border-right: none;
}

.filter-link--country .filter-link__flag {
    width: 28px;
    height: 19px;
    object-fit: cover;
    border: 0.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 1px;
    flex-shrink: 0;
}

.filter-link--country .filter-link__name {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-link--country.active {
    background-color: var(--navy, #00182F);
    border-color: var(--navy, #00182F);
}

.filter-link--country.active .filter-link__name {
    color: #fff;
}

.filter-link--country.related {
    background-color: #e8eaf6;
    border-color: #9fa8da;
}

/* Calendar list container — no native scroll; wheel-snap is programmatic */
#calendar-container {
    overflow: hidden;
    max-height: calc(100vh - 310px);
    border-radius: 8px;
}

#calendar-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.day-group__header {
    font-size: 26px;
    font-weight: 760;
    color: var(--text-dark);
    line-height: 1.5;
    text-align: center;
    direction: rtl;
    padding: 12px 0 4px;
}

.calendar-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    background: #fff;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════
   LIST VIEW
   ═══════════════════════════════════════════════════════════ */

#view-list {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* List sub-tabs */
.list-tabs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    direction: rtl;
}

.list-tab {
    padding: 7px 20px;
    background: #fff;
    border: 1px solid #A5ACBB;
    cursor: pointer;
    font-family: 'MosesText', sans-serif;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.list-tab--active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
    font-weight: 700;
}

.list-tab:hover:not(.list-tab--active) {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

/* ── Team search bar ─────────────────────────────────────── */
.team-search-bar {
    display: flex;
    padding: 40px 0 12px;
    background: var(--bg-page);
}

.team-search-bar--hidden {
    display: none;
}

.team-search-bar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    direction: rtl;
    width: 610px;
    max-width: 900px;
    height: 50px;
    background: #fff;
    border: 2px solid #689ABF;
    border-radius: 50px;
    padding: 1px 16px;
    gap: 15px;
}

.team-search-bar__input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'MosesText', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    background: transparent;
    direction: rtl;
    text-align: right;
}

.team-search-bar__input::placeholder {
    color: #A5ACBB;
    font-family: 'MosesText', sans-serif;
}

/* hide the native clear button on search inputs */
.team-search-bar__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.team-search-bar__icon {
    width: 18px;
    height: 18px;
    color: #A5ACBB;
    flex-shrink: 0;
}

/* ── Date carousel (mobile only) ────────────────────────── */
.date-carousel {
    display: none; /* hidden on desktop */
}

.date-carousel--hidden {
    display: none !important;
}

/* List content wrapper */
.list-content {
    padding: 12px 0;
}

/* Section group header (date / team / stage label) */
.list-section-header {
    background-color: var(--navy);
    background-image: url('../assets/images/Teams_bg.png?v=c2059735');
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    padding: 8px 20px;
    margin: 12px 0 0;
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-section-header__flag {
    height: 22px;
    width: 30px;
    object-fit: cover;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 1px;
    flex-shrink: 0;
}

.list-section-header:first-child {
    margin-top: 4px;
}

/* ── List card (flat row for List View) ─────────────────── */

.list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--border-gray);
    padding: 10px 20px;
    direction: rtl;
    cursor: default;
    gap: 12px;
}

.list-card--clickable {
    cursor: pointer;
}

.list-card--clickable:hover {
    background-color: #f7f8fc;
}

/* Right info column: stage | venue + TV/link */
.list-card__info {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 0 0 auto;
    width: 300px;
    white-space: nowrap;
    overflow: hidden;
    gap:10px;
}

/* Match wrapper: home | score | away */
/* Match wrapper: 3-column grid — away | score | home */
.list-card__match {
    display: grid;
    grid-template-columns: 1fr 250px 1fr;
    align-items: center;
    flex: 1;
    min-width: 0;
    direction: ltr;
}

.list-card__info-stage {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    flex-shrink: 0;
}

.list-card__info-extra {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card__tv {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    white-space: nowrap;
}

.list-card__article-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    white-space: nowrap;
}

/* Home: flag + name, group pushed to the left (close to score).
   Hebrew name reads RTL, so the text's logical end is adjacent to the flag. */
.list-card__home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    width:130px;
}

.list-card__home .list-card__team-name {
    direction: rtl;
    text-align: right;
}

/* Away: name + flag together, right-aligned as a group — flag at right edge (close to score), name adjacent */
.list-card__away {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

/* Remove separate flag cell classes (flags now inside team divs) */
.list-card__home-flag,
.list-card__away-flag {
    display: contents;
}

.list-card__team-name {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card__flag {
    height: 23px;
    width: 31px;
    object-fit: cover;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 1px;
    flex-shrink: 0;
}

.list-card__flag-placeholder {
    height: 23px;
    width: 31px;
    display: inline-block;
    flex-shrink: 0;
}

/* Mobile-only card header (date + venue bar) — hidden on desktop */
.list-card__header {
    display: none;
}

/* Score / time area */
.list-card__score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 90px;
    gap: 2px;
}

.list-card__score,
.list-card__time {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.1;
}

.list-card__time[data-kickoff] {
    color: #E41D35;
}

.list-card__time--soon {
    font-size: 11px;
    color: #E41D35;
    line-height: 1.35;
    font-weight: 500;
    text-align: center;
}

.list-card__overnight {
    font-size: 12px;
    font-weight: 300;
    color: #F43056;
    text-align: center;
}

.list-card__status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    direction: rtl;
}

.list-card__status-text {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-dark);
}

.list-card__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.list-card__status-dot--green { background-color: #00B140; }
.list-card__status-dot--red   { background-color: var(--primary-red); }
.list-card__status-dot--gray  { background-color: #9CA3AF; }

/* ── Match Card ─────────────────────────────────────────── */

.match-card {
    overflow: hidden;
    margin: 0;
    box-shadow: 0px 2px 4.5px rgba(0, 0, 0, 0.25);
    cursor: default;
}

.match-card--clickable {
    cursor: pointer;
}

/* Card header — dark navy, 3 equal columns */
.match-card__header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 5px 0;
    background-color: var(--text-dark);
    min-height: 26px;
    align-items: center;
}

.match-card__header-col {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    font-weight: 400;
    padding: 0 16px;
}

/* col-1 (right in RTL): stage — flush to right edge */
.match-card__header-col--right {
    justify-content: flex-start;
}

/* col-2 (center): date — centered, bold */
.match-card__header-col--center {
    justify-content: center;
}

/* col-3 (left in RTL): venue — flush to left edge */
.match-card__header-col--left {
    justify-content: flex-end;
}

.match-card__date {
    font-size: 16px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

/* Inline separator between group and city */
.match-card__sep {
    display: inline-block;
    width: 1px;
    height: 11px;
    margin: 0 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* TV channel text (left col, header) */
.match-card__tv {
    font-size: 12px;
    font-weight: 400;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live article link (left col, header) */
.match-card__article-link {
    font-size: 12px;
    font-weight: 400;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

/* Card body — white, border on 3 sides */
.match-card__body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 15px 0 10px;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-top: none;
    align-items: center;
}

/* Team columns */
.match-card__team {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 28px;
}

/* col-1 (right in RTL): home — flag at right edge, name to its left */
.match-card__team--home {
    justify-content: flex-start; /* RTL flex-start = right */
    padding-right: 70px;         /* inner gap towards center */
}

/* col-3 (left in RTL): away — name first, flag at left edge */
.match-card__team--away {
    justify-content: flex-end;   /* RTL flex-end = left */
    padding-left: 70px;          /* inner gap towards center */
}

.match-card__flag {
    height: 23px;
    width: 31px;
    object-fit: cover;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 1px;
    flex-shrink: 0;
}

.match-card__flag-placeholder {
    height: 23px;
    width: 31px;
    display: inline-block;
    flex-shrink: 0;
}

.match-card__team-name {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Score / time area */
.match-card__score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.match-card__score,
.match-card__time {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.1;
}

.match-card__time[data-kickoff] {
    color: #E41D35;
}

.match-card__time--soon {
    font-size: 11px;
    color: #E41D35;
    line-height: 1.35;
    font-weight: 500;
}

/* "בין X ל-Y" overnight indicator */
.match-card__overnight {
    font-size: 12px;
    font-weight: 300;
    color: #F43056;
    text-align: center;
}
.overnight-abbr { display: none; }
@media (max-width: 768px) {
    .overnight-full { display: none; }
    .overnight-abbr { display: inline; }
}

/* Status row: text + dot */
.match-card__status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.match-card__status-text {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-dark);
    text-align: center;
}

.match-card__status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.match-card__status-dot--green {
    background-color: #00B140;
}

.match-card__status-dot--red {
    background-color: var(--primary-red);
}

.match-card__status-dot--gray {
    background-color: #9CA3AF;
}

/* Loading / empty states */
.list-loading,
.list-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE  (≤ 768px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    body{
        background: var(--bg-page);
    }

    /* ── Header ── */
    .page-header {
        padding: 0;
    }

    .header-inner {
        height: 78px;
        border-radius: 0;
        overflow: hidden;
        clip-path: none;
    }

    /* Hide desktop tab decorations */
    .header-inner::before,
    .header-inner::after {
        display: none;
    }

    /* Mobile top-half decoration (blue) */
    .header-inner::before {
        display: block;
        content: '';
        position: absolute;
        right: -42px;
        top: 0;
        width: 79px;
        height: 39px;
        border-radius: 10000px 0 0 0;
        background: #218AF3;
        pointer-events: none;
        z-index: 2;
    }

    /* Mobile bottom-half decoration (blue-purple) */
    .header-inner::after {
        display: block;
        content: '';
        position: absolute;
        right: -42px;
        top: 39px;
        width: 79px;
        height: 39px;
        border-radius: 10000px 0 0 0;
        background: #324DFD;
        pointer-events: none;
        z-index: 2;
    }

    .header-content {
        padding: 0 55px;
        justify-content: flex-start;
    }

    /* Hide desktop stripes */
    .header-content::before {
        display: none;
    }

    .header-title {
        font-size: 2.25rem;
    }

    .header-trophy {
        height: 65px;
        bottom: 3px;
        left: 12px;
    }

    /* ── View switcher — mobile: 2 full-width buttons ── */
    .view-switcher {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding: 15px 10px 10px;
        background: var(--bg-page);
        border-radius: 0;
        margin: 0;
    }

    /* Hide the interactive calendar button on mobile */
    .view-btn[data-view="calendar"] {
        display: none;
    }

    .view-btn {
        flex: 1;
        flex-direction: row;
        justify-content: center;
        padding: 15px 10px;
        background: #fff;
        border: 1px solid #3A416F;
        border-radius: 4px;
        font-size: 15px;
        font-weight: 400;
        color: var(--text-dark);
        box-shadow: 0 3px 5px rgba(0,0,0,0.09), 0 2px 3px rgba(0,0,0,0.07);
        opacity: 1;
    }

    .view-btn__label--desktop {
        display: none;
    }

    .view-btn__label--mobile {
        display: inline;
    }

    .view-btn__icon {
        display: none;
    }

    .view-btn--active {
        background: linear-gradient(165deg, #3A416F 0%, #141727 100%);
        border-color: transparent;
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 7px rgba(0,0,0,0.11), 0 2px 4px rgba(0,0,0,0.07);
    }

    .view-btn:hover:not(.view-btn--active) {
        opacity: 1;
        background: #f0f2f8;
    }

    /* ── List view takes full width, no side padding ── */
    #view-list {
        padding: 0 0 40px;
    }

    .list-tabs-bar {
        padding: 0 12px;
        gap: 6px;
    }

    .list-tab {
        flex: 1;
        padding: 5px 10px;
        text-align: center;
        border-color: #526BDB;
        border-radius: 4px;
        color: #526BDB;
        box-shadow: 0 4px 7px -1px rgba(0,0,0,0.11), 0 2px 4px -1px rgba(0,0,0,0.07);
    }

    .list-tab--active {
        background-color: #526BDB;
        border-color: #526BDB;
        color: #fff;
    }

    .list-tab:hover:not(.list-tab--active) {
        border-color: #526BDB;
        color: #526BDB;
    }

    /* ── List card header (date + venue bar) ── */
    .list-card__header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--navy);
        padding: 5px 10px;
        direction: rtl;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .list-card__header-venue {
        font-size: 12px;
        font-weight: 400;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .list-card__header-meta {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        direction: ltr;
    }

    .list-card__header-date {
        font-size: 12px;
        font-weight: 400;
        color: #fff;
        white-space: nowrap;
    }

    .list-card__header-status {
        font-size: 12px;
        font-weight: 600;
        color: #F43056;
        white-space: nowrap;
        border-right: 1px solid #E4E8F0;
        padding-right: 10px;
        margin-right: 10px;
    }

    .list-card__header-channel {
        font-size: 12px;
        font-weight: 600;
        color: #fff;
        white-space: nowrap;
        border-right: 1px solid #E4E8F0;
        padding-right: 10px;
        margin-right: 10px;
    }

    /* ── List card mobile ── */
    .list-card {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .list-card__info {
        display: none;
    }

    .list-card__match {
        padding: 20px 10px;
        box-sizing: border-box;
        grid-template-columns: 130px 95px 130px;
        justify-content: center;
        width: 100%;
    }

    /* On mobile, flip DOM order to show flag|name (away) and name|flag (home) */
    .list-card__away {
        flex-direction: row-reverse;
        justify-content: flex-end;
    }

    .list-card__home {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    .list-card__team-name {
        font-size: 15px;
    }

    .list-card__score-area {
        flex: 0 0 89px;
    }

    .list-card__overnight {
        font-size: 0.8rem;
    }

    .list-section-header {
        background-color: #fff;
        background-image: none;
        color: #000;
        font-size: 18px;
        font-weight: 700;
        padding: 10px 15px;
        margin: 0;
        text-align: center;
        justify-content: center;
        border-bottom: 1px solid var(--border-gray);
    }

    .list-section-header__flag {
        display: none;
    }

    /* ── Date carousel ── */
    .date-carousel {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #A5ACBB;
        margin-top: 10px;
    }

    .date-carousel__month {
        background-color: var(--navy);
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        line-height: 40px;
        text-align: center;
        height: 40px;
    }

    .date-carousel__row {
        display: flex;
        align-items: center;
        background: #fff;
        padding: 0 10px;
    }

    .date-carousel__arrow {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--navy);
    }

    .date-carousel__arrow img {
        width: 30px;
        height: 30px;
    }

    .date-carousel__track {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 20px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 5px;
        direction: rtl;
    }

    .date-carousel__track::-webkit-scrollbar {
        display: none;
    }

    .date-carousel__cell {
        flex-shrink: 0;
        width: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 5px 0;
        cursor: pointer;
        border: none;
        background: #fff;
        color: #000;
        font-family: 'MosesText', sans-serif;
    }

    .date-carousel__cell--active {
        background: var(--navy);
        color: #fff;
    }

    .date-carousel__cell--empty {
        color: #A5ACBB;
        cursor: default;
    }

    .date-carousel__cell-day {
        font-size: 15px;
        font-weight: 700;
        line-height: 16px;
    }

    .date-carousel__cell-dow {
        font-size: 13px;
        font-weight: 400;
        line-height: 16px;
    }

    .date-carousel__footer {
        display: flex;
        justify-content: flex-end; /* RTL: physical left */
        padding: 16px 0 12px;
        padding-inline-end: 10px; /* aligns with the left arrow */
        background: #fff;
        border-top: 1px solid #A5ACBB;
    }

    .date-carousel__today {
        background: none;
        border: none;
        padding: 0;
        font-family: 'MosesText', sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: var(--navy);
        text-decoration: underline;
        cursor: pointer;
    }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE — mobile only
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) and (prefers-color-scheme: dark) {

    body {
        background-color: #1e1e1e;
    }

    /* ── View switcher ── */
    .view-switcher {
        background: #000;
        box-shadow: none;
    }

    .view-btn {
        background: #000;
        border-color: #A5ACBB;
        color: #fff;
    }

    .view-btn--active {
        background: linear-gradient(165deg, #3A416F 0%, #141727 100%);
        border-color: transparent;
        color: #fff;
    }

    .view-btn:hover:not(.view-btn--active) {
        background: #1a1a1a;
        color: #fff;
    }

    /* ── List tabs ── */
    .list-tabs-bar {
        background: #000;
    }

    .list-tab {
        background: #000;
        border-color: #A5ACBB;
        color: #fff;
    }

    .list-tab--active {
        background-color: #526BDB;
        border-color: #526BDB;
        color: #fff;
    }

    /* ── Date carousel ── */
    .date-carousel {
        border-bottom-color: #fff;
    }

    .date-carousel__row {
        background: #000;
    }

    .date-carousel__arrow img {
        filter: brightness(0) invert(1);
        opacity: 0.97;
    }

    .date-carousel__cell {
        background: transparent;
        color: #fff;
    }

    .date-carousel__cell--active {
        background: #D9E6EF;
        color: #000;
    }

    .date-carousel__cell--empty {
        color: #505B73;
    }

    .date-carousel__footer {
        background: #000;
        border-top-color: #505B73;
    }

    .date-carousel__today {
        color: #fff;
    }

    /* ── Team search bar ── */
    .team-search-bar {
        background: #1e1e1e;
    }

    .team-search-bar__inner {
        background: #111;
        border-color: #505B73;
    }

    .team-search-bar__input {
        color: #fff;
    }

    /* ── Section header (by date = white card on dark) ── */
    .list-section-header {
        background-color: #000;
        color: #fff;
        border-bottom: none;
    }

    /* ── List card ── */
    .list-card {
        border-bottom: 1px solid #A5ACBB;
    }

    .list-card__match {
        background: #000;
        border: 1px solid #A5ACBB;
    }

    .list-card__team-name {
        color: #fff;
    }

    .list-card__score,
    .list-card__time {
        color: #fff;
    }

    /* Live status green in dark mode */
    .list-card__status-dot--green {
        background-color: #30D158;
    }

    .list-card__status-text {
        color: #fff;
    }

    /* ── List content background ── */
    .list-content {
        background: #000;
    }

    .list-empty,
    .list-loading {
        color: #A5ACBB;
        background: #000;
    }
}
