/* =============================================================
   SCHEDULE PAGE — FIFA World Cup 2026
   ============================================================= */

/* ─── Page ───────────────────────────────────────────────────── */
.sch-page {
  position: relative;
  min-height: 100vh;
  z-index: 1;
  padding-bottom: 80px;
}

/* ─── Header ─────────────────────────────────────────────────── */
.sch-header {
  padding: 28px 0 32px;
  text-align: center;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  margin-bottom: 32px;
}

.sch-logo-link img {
  height: auto;
  width: min(200px, 60vw);
  filter: drop-shadow(0 0 16px rgba(255,215,0,0.4));
  margin: 0 auto 24px;
}

.sch-page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-bright) 50%, var(--gold) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sch-shimmer 4s linear infinite;
  margin-bottom: 10px;
}

@keyframes sch-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.sch-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sch-tz-badge {
  color: var(--gold);
  font-weight: 600;
}

/* ─── Filters bar ────────────────────────────────────────────── */
.sch-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: rgba(12, 12, 13, 0.92);
  border: 1px solid rgba(201, 168, 76, 0.16);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 12px;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sch-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sch-filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 2px;
}

.sch-filter-btn {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 18px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sch-filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.sch-filter-btn--active {
  background: rgba(201, 168, 76, 0.15) !important;
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
}

/* Group buttons */
.sch-group-btn {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  min-width: 32px;
}

.sch-group-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.sch-group-btn--active {
  background: rgba(201, 168, 76, 0.18) !important;
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
}

.sch-group-btn--clear {
  color: var(--error);
  border-color: rgba(255, 71, 87, 0.3);
  font-size: 0.75rem;
  padding: 5px 8px;
}

.sch-group-btn--clear:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(255, 71, 87, 0.1);
}

/* ─── Day header ─────────────────────────────────────────────── */
.sch-day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 28px 0 14px;
  background: linear-gradient(90deg, rgba(201,168,76,0.12), rgba(201,168,76,0.02) 70%, transparent);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
}

.sch-day-header:first-child { margin-top: 0; }

.sch-day-today {
  background: linear-gradient(90deg, rgba(201,168,76,0.22), rgba(201,168,76,0.05) 70%, transparent);
  border-left-color: var(--gold-light);
}

.sch-day-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

.sch-day-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sch-today-tag {
  background: rgba(201, 168, 76, 0.18);
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--gold-light);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-left: auto;
}

/* ─── Match row ──────────────────────────────────────────────── */
.sch-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: rgba(17, 18, 19, 0.7);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: var(--radius);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  animation: sch-fadeUp 0.3s ease both;
}

.sch-match-row:hover {
  background: rgba(201, 168, 76, 0.06);
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-2px);
}

@keyframes sch-fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Win-probability bar (powered by footballdata.io) ───────── */
.sch-prob {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(201, 168, 76, 0.16);
}
.sch-prob-bar {
  display: flex;
  height: 7px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.sch-prob-bar span { display: block; height: 100%; }
.sch-prob-h { background: var(--gold, #C9A84C); }
.sch-prob-d { background: rgba(255, 255, 255, 0.28); }
.sch-prob-a { background: rgba(255, 71, 87, 0.85); }
.sch-prob-labels,
.sch-odds {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
}
.sch-odds {
  margin-top: 4px;
  color: var(--gold-light, #FFD700);
  font-variant-numeric: tabular-nums;
}
.sch-prob-labels span:first-child,
.sch-odds span:first-child { color: var(--gold-light, #FFD700); }
.sch-prob-labels span:last-child,
.sch-odds span:last-child { color: rgba(255, 120, 130, 0.95); }

/* ─── Teams ──────────────────────────────────────────────────── */
.sch-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sch-team-home {
  justify-content: flex-end;
  flex-direction: row-reverse;
  text-align: right;
}

.sch-team-away {
  justify-content: flex-start;
}

.sch-flag {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(201, 168, 76, 0.2);
  background: var(--black-4);
  flex-shrink: 0;
}

.sch-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--off-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* ─── Center column: score / time ────────────────────────────── */
.sch-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 80px;
  text-align: center;
}

.sch-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  line-height: 1;
}

.sch-time {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  line-height: 1;
}

.sch-meta {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ─── Status badges ──────────────────────────────────────────── */
.sch-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.sch-badge-live {
  background: rgba(255, 64, 64, 0.2);
  color: #ff6060;
  border: 1px solid rgba(255, 64, 64, 0.4);
  animation: sch-blink 2s infinite;
}

@keyframes sch-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.sch-badge-done {
  background: rgba(46, 213, 115, 0.1);
  color: #7effa0;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

/* ─── Venue column ───────────────────────────────────────────── */
.sch-venue-col {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ─── Loading / Error / Empty states ────────────────────────── */
.sch-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 80px 0;
  color: var(--text-muted);
}

.sch-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(201, 168, 76, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: sch-spin 0.8s linear infinite;
}

@keyframes sch-spin { to { transform: rotate(360deg); } }

.sch-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 0;
  color: var(--error);
  text-align: center;
}

.sch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.sch-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.sch-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sch-page-btn:hover:not(:disabled) {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--gold);
}

.sch-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sch-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sch-match-row {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
  }

  .sch-venue-col {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  .sch-team-name { max-width: 90px; font-size: 0.8rem; }
  .sch-flag { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
  .sch-team-name { max-width: 72px; font-size: 0.75rem; }

  .sch-filters { flex-direction: column; align-items: flex-start; }

  .sch-filter-group { gap: 4px; }
}
