:root{
  --topbar-h: 60px; /* matches .topbar height */
  --bg:#ffffff; --text:#0f172a; --muted:#5b6b8c;
  --blue:#1565d8; --blue-600:#1a73e8; --blue-50:#e6eef9;
  --chip-bg:#eef2ff; --card:#fff; --border:#e6e8ee;
  --shadow: 0 6px 24px rgba(16,42,67,.08); --radius:16px;
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans",sans-serif;color:var(--text);background:var(--bg)}

/* Avoid horizontal page shift on narrow screens */
html, body { max-width: 100%; overflow-x: hidden; }


a{color:var(--blue);text-decoration:none} a:hover{text-decoration:underline}
.sr-only{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.container{max-width:1200px;margin:0 auto;padding:0 16px}
.skip-link{position:absolute;left:-9999px;top:-9999px}.skip-link:focus{left:8px;top:8px;background:#fff;padding:8px 12px;border-radius:8px;z-index:10000}




/* ===== Top bar ===== */
.topbar{
  position:sticky;top:0;
  z-index:3000;
  background:#0b3a82;color:#fff;border-bottom:1px solid rgba(255,255,255,.1)
}
.topbar__inner{display:flex;align-items:center;gap:10px;height:60px;overflow:visible}
.brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700;white-space:nowrap}
.brand__accent{color:#8cc1ff}
.hamburger{display:inline-flex;flex-direction:column;gap:4px;background:transparent;border:0;cursor:pointer}
.hamburger span{width:22px;height:2px;background:#fff;border-radius:2px}


/* Inline header search */
.topbar__right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;
  min-width:0; /* allow children to shrink */
}

.topsearch-inline{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex: 1 1 auto;              /* take available space, don't push layout wider */
  max-width:100%;
}
.topsearch-inline input{
  flex: 1 1 auto;              /* grow/shrink with available space */
  width: 100%;
  min-width: 0;                 /* critical in flex items */
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:14px;
  background:#fff;
}

/* Small icon button for search toggle */
.iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff; color:#0b3a82;
  cursor:pointer;
}
.iconbtn svg{ fill: currentColor; opacity:.9 }
.iconbtn:hover svg{ opacity:1 }

/* Collapsible container (you already style .topsearch-inline input & button) */
.topsearch-inline[hidden]{ display:none !important; }



/* (kept for future use) Featured chips scroller */
.leagues-scroller{margin-left:auto;max-width:48vw;overflow-x:auto;overflow-y:visible;white-space:nowrap;padding:4px 0;position:relative;z-index:10}
.desktop-nav{display:flex;gap:8px}
.desktop-nav .chip{flex:0 0 auto}

/* Chips */
.chip{display:inline-flex;align-items:center;gap:8px;background:var(--chip-bg);padding:6px 10px;border-radius:999px;font-size:14px;color:#2b3a55;border:1px solid #e5e7ff}
.chip--light{background:#fff;color:#0b3a82;border-color:#dbeafe}
.chip--league{padding:5px 9px;font-size:13px}
.chip--league img{width:28px;height:28px;border-radius:50%;border:1px solid var(--border);background:#fff}
@media (max-width:640px){

  .topbar__right{ min-width:0; }     /* reinforce shrinkage */

  /* Mobile: show search as a centered modal above the page */
  .topsearch-inline{
    position: fixed;
    left: 50%;
    top: calc(var(--topbar-h) + 8px);   /* directly under the header */
    transform: translateX(-50%);        /* horizontal centering only */
    width: min(92vw, 560px);
    max-width: 92vw;
    background: #fff;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 4600;                       /* above language menu & header */
    gap: 8px;
  }
  .topsearch-inline input{
    width: auto;          /* let flex sizing work */
    font-size: 16px;      /* readable; avoids iOS zoom */
  }
  .topsearch-inline .btn{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .chip--league{padding:4px 8px;font-size:12px}
  .chip--league img{width:24px;height:24px}
}
.chip__text{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Language switcher (anchored under flag) */
.lang-switcher{position:relative;margin-left:8px;z-index:4000}
.lang-btn img{display:inline-block;vertical-align:middle;border:1px solid var(--border);border-radius:3px;background:#fff}
.lang-menu{
  position:absolute;right:0;top:110%;
  background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;min-width:160px;
  z-index:4001;
}
.lang-menu[hidden]{display:none !important;}
.lang-menu a{display:flex;align-items:center;gap:8px;padding:8px 10px;color:#1f2a44;text-decoration:none;border-bottom:1px solid var(--border)}
.lang-menu a:last-child{border-bottom:0}
.lang-menu a.is-active{background:var(--blue-50);font-weight:700}
.lang-menu.is-open, #langMenu.is-open{display:block !important}

.timezone-pill{margin-left:8px;display:inline-flex;align-items:center;gap:8px;color:#dbeafe;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);padding:6px 10px;border-radius:999px;white-space:nowrap}
.timezone-pill svg{fill:#dbeafe}

/* Backdrop for sidebar */
.backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:2500}

/* ===== Sidebar ===== */
.sidebar{position:fixed;left:0;top:60px;bottom:0;width:85%;max-width:420px;background:#fff;transform:translateX(-110%);transition:transform .25s ease,box-shadow .25s ease;z-index:3500;overflow:auto;box-shadow:none}
.sidebar[aria-hidden="false"]{transform:none;box-shadow:var(--shadow)}
.sidebar__header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--border);background:#fff;position:sticky;top:0;z-index:1}
.sidebar__close{font-size:20px;border:0;background:transparent;cursor:pointer}

/* Featured inside sidebar */
.sidebar__featured{padding:12px 16px;border-bottom:1px solid var(--border);background:#fafbff}
.sidebar__featured h3{margin:0 0 8px;font-size:15px;color:#1f2a44}
.sidebar__featured .feat-list{display:flex;flex-wrap:wrap;gap:8px}
.sidebar__featured .chip{background:#fff;border-color:#dbeafe}

.sidebar__filter{padding:10px 16px;border-bottom:1px solid var(--border);background:#fafbff}
.sidebar__filter input{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;font-size:14px}

.sidebar__nav{padding:12px 16px}

/* H2 style inside sidebar for both sections */
.sidebar__title{margin:12px 16px 6px;font-size:18px;font-weight:700;color:#1f2a44}

/* Clear button inside the search input */
.sidebar__filter{position:relative}
.clear-input{
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  border:0; background:transparent; cursor:pointer;
  font-size:20px; line-height:1; color:#8aa2d9; padding:0;
  display:none;
}
.clear-input.is-visible{display:block}


/* Small section labels in sidebar */
.sidebar__section-title{
  margin: 10px 16px 4px;
  font-size: 13px;
  font-weight: 700;
  color:#1f2a44;
}

/* Filter input with embedded clear button */
.sidebar__filter{position:relative; padding:10px 16px; border-bottom:1px solid var(--border); background:#fafbff}
.sidebar__filter input{
  width:100%;
  padding:10px 40px 10px 12px; /* right padding for the X */
  border:1px solid var(--border);
  border-radius:10px;
  font-size:14px;
  background:#fff;
}
.input-clear{
  position:absolute;
  top:50%;
  right:12px;              /* move further inside the field */
  transform:translateY(-50%);
  width:28px; height:28px;
  display:none;            /* shown by JS when there’s text */
  border:0; background:transparent; cursor:pointer;
  border-radius:6px;
}

.input-clear svg{fill:#4a67a8; opacity:.85}
.input-clear:hover svg{opacity:1}
.input-clear.is-visible{display:block}


.country-block{border:1px solid var(--border);border-radius:12px;margin:10px 0;background:#fff}
.country-block__header{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:#fff;border:0;border-bottom:1px dashed var(--border);cursor:pointer}
.country-block__list{list-style:none;margin:0;padding:8px 12px;display:grid;grid-template-columns:1fr;gap:6px}
/* Make the HTML `hidden` attribute actually hide the list,
   even though we set display:grid above */
.country-block__list[hidden]{ display:none !important; }
.country-block__list a{color:var(--blue)}
.country-block .caret{margin-left:auto;color:#8aa2d9}

/* ===== Subnav (date) ===== */
.subnav{position:sticky;top:60px;background:#f7f9ff;border-bottom:1px solid var(--border);z-index:2000}
.subnav__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0}
.pill-group{display:flex;gap:8px;flex-wrap:wrap}
.pill{
  display:inline-flex;               /* fixes the vertical centering */
  align-items:center; justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border);
  color:#1f2a44;
  line-height:1.1;                   /* trims the headroom above text */
}
.pill.is-active{background:#e6eef9;border-color:#cfe0ff}
.date-picker{display:flex;gap:8px;align-items:center}
.btn{background:var(--blue);border:1px solid #0a4fb3;color:#fff;border-radius:10px;padding:8px 12px;cursor:pointer}
.btn:hover{background:var(--blue-600)}
.btn--ghost{background:#fff;color:#0b3a82;border:1px solid var(--border)}
.btn--ghost:hover{background:#eef3ff}

/* ===== Main / one-per-row list ===== */
.main{padding:24px 0}
.page-title{font-size:28px;margin:6px 0 4px}
.page-lede{color:#5b6b8c;margin:0 0 18px}
.events-list{display:flex;flex-direction:column;gap:12px}

/* Row card */
.rowcard{display:grid;grid-template-columns:220px 1fr auto;align-items:center;gap:16px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:10px 14px}
.rowcard{ --badge:56px; --vs:36px; }
@media (max-width:800px){ .rowcard{grid-template-columns:1fr;gap:10px} }

.rowcard__meta{display:flex;align-items:center;gap:8px;color:#2b3a55}
.rowcard__logo{border-radius:6px;border:1px solid var(--border);background:#fff}
.rowcard__comp{font-weight:600}
.rowcard__time{margin-left:auto;color:#0b3a82;font-weight:700}
@media (max-width:800px){ .rowcard__time{margin-left:0} }

.rowcard__teams{
  display:grid; grid-template-columns:1fr 60px 1fr; align-items:start;
  gap:18px; color:inherit; text-decoration:none;
}
.rowcard__team{text-align:center}
.rowcard__team img{
  display:block; margin:0 auto 6px;
  width:var(--badge); height:var(--badge); object-fit:contain;
  border-radius:12px; border:1px solid var(--border); background:#fff;
}
.rowcard__name{font-weight:700}
.rowcard__vs{
  display:flex; align-items:center; justify-content:center;
  align-self:start;                                /* anchor to row top */
  margin-top: calc((var(--badge) - var(--vs)) / 2);/* center vs vs badge */
  color:#a3b5dc; font-weight:900;
}


.rowcard__cta{display:flex;justify-content:flex-end}
@media (max-width:800px){ .rowcard__cta{justify-content:flex-start} }

/* ===== Footer ===== */
.footer{margin-top:32px;background:#0b3a82;color:#dbeafe;padding:18px 0}
.footer__inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.footer__nav a{color:#dbeafe;margin-right:12px}
.copy{font-size:14px;color:#c7dbff;text-align:center;flex:1}
.footer__left{min-width:220px}
.footer__right{min-width:220px;text-align:right}
.footer .timezone-pill{
  color:#dbeafe;background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.2)
}

/* Mobile layout: Row 1 → Today | Next 7 Days, Row 2 → Tomorrow | Calendar */
@media (max-width: 640px){

  /* small gap above AND a bit below the subnav */
  .subnav{
    position: sticky;
    top: var(--topbar-h);
    z-index: 2000;
    margin-top: 0px;
    margin-bottom: 0; /* ⬅️ no outside gap; space will be INSIDE instead */
  }

  /* parent becomes a 2-col grid */
  .subnav__inner{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    padding: 8px 0 12px; /* ⬅️ extra bottom padding INSIDE the subnav */
  }

  /* let pills become direct grid items (no JS reordering = no jitter) */
  .pill-group{
    display: contents;
  }

  /* Today (first pill) → row 1, col 1 */
  .pill-group .pill:nth-child(1){
    grid-column: 1;
    grid-row: 1;
  }

  /* Tomorrow (second pill) → row 1, col 2 */
  .pill-group .pill:nth-child(2){
    grid-column: 2;  /* ⬅️ move to top-right */
    grid-row: 1;
  }

  /* Next 7 Days (third pill) → row 2, col 1 */
  .pill-group .pill:nth-child(3){
    grid-column: 1;  /* ⬅️ bottom-left */
    grid-row: 2;
  }
  /* Calendar → row 2, col 2 (to the right of Tomorrow) */
  .date-picker{
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }
  .date-picker input{
    width: 100%;
    min-height: 38px;
  }

  /* pill styling (unchanged) */
  .pill{
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 15px;
    border-radius: 14px;
    line-height: 1.1;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
  .pill.is-active{
    background:#eaf1ff;
    border-color:#cfe0ff;
    box-shadow:0 1px 0 rgba(16,42,67,.04), 0 0 0 2px rgba(26,115,232,.06) inset;
  }
}





/* Mobile footer layout: stack items, keep timezone pill inside footer */
@media (max-width: 640px){
  .footer__inner{
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:10px;
  }
  .footer__left,
  .footer__right{
    min-width:0;
    text-align:center;
  }
  .footer__nav a{ margin:0 8px; }
  .footer .timezone-pill{ margin-top:4px; }


  .container{ padding:0 20px; }         /* was 16px */
  .subnav .container{ padding:5px 20px; } /* keep date picker comfy too */
}


/* VS icon */
.rowcard__vs{
  display:flex; align-items:center; justify-content:center;
}
.rowcard__vs-icon{
  display:block; width:var(--vs); height:var(--vs);
}

/* Channel hero title logo */
.event-title { display:flex; align-items:center; gap:10px; }
.event-title .event-title-logo {
  border-radius:8px; border:1px solid var(--border); background:#fff;
  object-fit:contain;
}


/* Day separators in channel lists */
.day-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1rem;
  
}
.day-sep::before,
.day-sep::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border, #e5e7eb);
}
.day-sep > span {
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}


.crumbs-inline { 
  margin: 6px 0 4px; 
  font-size: 14px; 
  color: #2b3a55; 
  font-weight: 700;          /* bold like event comp name */
}
.crumbs-inline ol { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  flex-wrap: wrap; 
}
.crumbs-inline a { 
  color: inherit; 
  text-decoration: none; 
  font-weight: 700;          /* keep strong */
}
.crumbs-inline a:hover { text-decoration: underline; }
.crumbs-inline .sep { opacity: .45; }

/* small tweak when breadcrumb lives next to the event logo */
.crumbs-inline--event { margin: 0; }

.empty{padding:24px;text-align:center;color:#5b6b8c}
