/* ============================================================
   LIVE SCORES HUB
   Sidebar nav (desktop) + bottom tab bar (mobile), list-row cards.
   ============================================================ */

.hub-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR (desktop) ---- */
.hub-sidebar {
  width: 248px;
  flex-shrink: 0;
  padding: var(--s5) var(--s4);
  display: flex;
  flex-direction: column;
  border-right: var(--border-soft);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2); }

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--green-400);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--line-100);
  text-transform: uppercase;
}
.brand-text strong, .brand-text em { color: var(--green-400); font-style: normal; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  margin-top: var(--s6);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s3);
  border-radius: var(--r-md);
  color: var(--line-400);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-icon { font-size: 1.05rem; width: 22px; text-align: center; }

.sidebar-link:hover { color: var(--line-100); background: var(--turf-900); }

.sidebar-link.active {
  color: var(--green-400);
  background: rgba(69, 181, 105, 0.12);
}

.sidebar-footer { margin-top: auto; padding-top: var(--s4); }

/* ---- MAIN COLUMN ---- */
.hub-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Mobile-only top bar; hidden on desktop where the sidebar has the brand */
.hub-topbar {
  display: none;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  border-bottom: var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--turf-950);
}

.hub-menu-btn { display: none; }

.icon-btn-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--turf-900);
  border: var(--border-soft);
  color: var(--line-200);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.hub-topbar-actions { margin-left: auto; display: flex; gap: var(--s2); }

.brand-compact .brand-text { font-size: 0.95rem; }
.brand-mark-sm { width: 26px; height: 26px; }

/* ---- DATE TABS ---- */
.hub-tabs-nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
  padding: var(--s5) var(--s5) var(--s4);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--line-400);
  padding: var(--s2) 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.tab-btn:hover { color: var(--line-100); }

.tab-btn.active { color: var(--line-100); font-weight: 700; }

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--green-400);
}

#hub-main {
  flex: 1;
  padding: 0 var(--s5) var(--s6);
}

.hub-loading,
.hub-empty {
  text-align: center;
  padding: var(--s7) var(--s5);
  color: var(--line-400);
  font-family: var(--font-body);
  border: 1px dashed var(--turf-600);
  border-radius: var(--r-lg);
}

.hub-section + .hub-section { margin-top: var(--s6); }

.hub-section-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-400);
  margin-bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.section-title-icon { display: inline-flex; }
.section-title-icon .icon { color: currentColor; }

.hub-section.is-live .hub-section-title { color: var(--green-400); }

/* ---- MATCH LIST ROWS ---- */
.hub-list { display: flex; flex-direction: column; gap: var(--s3); }

.match-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--s4);
  background: var(--turf-900);
  border: var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s4);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.match-row:hover,
.match-row:focus-visible {
  border-color: var(--green-500);
  background: var(--turf-850);
  transform: translateY(-1px);
}

.match-row-fav {
  width: 20px;
  height: 20px;
  color: var(--line-400);
  display: grid;
  place-items: center;
}

.match-row-fav .icon { stroke: currentColor; }

.match-row-teams {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
}

.match-row-team {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}

.match-row-team-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--line-100);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-row-mid {
  text-align: center;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
}

.match-row-time {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--line-100);
}

.match-row-time .clock-icon { color: var(--line-400); display: flex; justify-content: center; margin-bottom: var(--s1); }

.match-row-subtime { font-size: 0.78rem; color: var(--line-400); }

.match-row-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red-500);
  letter-spacing: 0.02em;
}

.match-row-scores {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  align-items: flex-end;
}

.match-row-score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--line-100);
  min-width: 1.4ch;
  text-align: right;
}

.match-row-bell {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-soft);
  background: transparent;
  color: var(--line-400);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.match-row-venue {
  grid-column: 2 / 3;
  font-size: 0.78rem;
  color: var(--line-400);
  margin-top: calc(-1 * var(--s2));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-footnote {
  text-align: center;
  padding: var(--s5);
  color: var(--line-400);
  font-size: 0.8rem;
}

/* ---- BOTTOM NAV (mobile only) ---- */
.hub-bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--turf-900);
  border-top: var(--border-soft);
  padding: var(--s2) var(--s2) calc(var(--s2) + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--line-400);
  font-size: 0.68rem;
  font-weight: 600;
  padding: var(--s1) var(--s2);
  border-radius: var(--r-sm);
}

.bottom-nav-icon { font-size: 1.15rem; }

.bottom-nav-item.active {
  color: var(--green-400);
}
.bottom-nav-item.active .bottom-nav-icon {
  border: 1.5px solid var(--green-400);
  border-radius: var(--r-sm);
  padding: 2px 6px;
}

/* ============================================================
   RESPONSIVE — collapse to mobile shell under 880px
   ============================================================ */
@media (max-width: 880px) {
  .hub-sidebar { display: none; }
  .hub-topbar { display: flex; }
  .hub-menu-btn { display: grid; }

  .hub-tabs-nav { padding: var(--s4) var(--s4) var(--s3); justify-content: space-around; gap: var(--s4); }
  .hub-tabs-nav .tab-btn { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

  #hub-main { padding: 0 var(--s4) var(--s7); }

  .match-row {
    grid-template-columns: 1fr;
    gap: var(--s3);
    text-align: center;
  }
  .match-row-fav, .match-row-bell { display: none; }
  .match-row-teams { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .match-row-team { flex-direction: column; gap: var(--s2); }
  .match-row-team-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: normal;
  }
  .match-row-mid { order: -1; align-self: center; }
  .match-row-scores { flex-direction: row; gap: var(--s4); align-self: center; }
  .match-row-score { font-size: 1.6rem; }
  .match-row-venue { display: none; }

  .hub-bottom-nav { display: flex; }
  .hub-main-col { padding-bottom: 76px; }
}

@media (min-width: 881px) {
  .match-row-mid .clock-icon { display: none; }
}
