/* ============================================
   LEAGUE PAGE STYLES
   ============================================ */

/* Sidebar England section */
.sidebar-flag {
  margin-right: 6px;
  font-size: 14px;
}

.sidebar-show-more {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-show-more:hover { color: var(--text-primary); }

/* League header */
.league-header {
  padding: 16px 20px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.league-header-main {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
}

.league-logo {
  width: 96px;
  height: 96px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.league-logo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.league-info { min-width: 0; }

.league-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.league-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.league-pin-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
}

.league-season {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

.league-progress {
  max-width: 400px;
}

.league-progress-track {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin-bottom: 6px;
}

.league-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: white;
  border-radius: 2px;
}

.league-progress-start {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
}

.league-progress-trophy {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.league-progress-dates {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.league-info-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-self: flex-start;
}

/* Main tabs - league version (more items) */
.league-tabs {
  padding: 0 20px;
}

/* League section header (e.g., "Scheduled", "The latest news") */
.league-section-header {
  padding: 20px 20px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Round header (country + league name with standings link) */
.league-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.league-round-standings {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: underline;
  font-weight: 500;
}

.league-round-standings:hover { color: var(--text-primary); }

/* Round title (Round 1, Round 38...) */
.league-round-title {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

/* Dòng trận ở trang giải/đội: từ 02/10/2026 dùng chung .match-block của trang chủ
   (style.css) — khối .league-match cũ đã bỏ. Ô ngày phía trên giờ: .match-status-date. */
.league-matches {
  display: flex;
  flex-direction: column;
}

/* Show more button */
.league-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.1s ease;
}

.league-show-more:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* News cards row */
.league-news-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px 12px;
}

.news-card {
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

.news-card:hover { transform: translateY(-2px); }

.news-card-image {
  width: 100%;
  height: 120px;
}

.news-card-body {
  padding: 10px 12px 12px;
}

.news-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-source {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.league-view-more-news {
  display: block;
  text-align: center;
  padding: 10px 20px 20px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}

.league-view-more-news:hover { color: var(--accent-red); }

/* Standings preview (inside SUMMARY tab) */
.league-standings-preview {
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

/* League standings table - full width */
.standings-league-table {
  width: 100%;
}

.standings-league-table td,
.standings-league-table th {
  padding: 8px 6px;
}

.standings-league-table .team-col {
  padding-left: 12px;
  min-width: 180px;
}

/* Chia bề ngang cho các cột SỐ.
   Bảng dùng bố cục tự động: phần dôi ra dồn hết vào cột nhiều chữ nhất, tức cột TEAM. Trước
   đây không thấy vì bên phải còn cột quảng cáo 250px; bỏ cột đó đi thì tên đội nằm lọt thỏm
   bên trái còn giữa bảng là một khoảng trắng dài. Đặt phần trăm cho cột số để phần thừa
   trải đều, cột TEAM lấy phần còn lại. */
.standings-league-table th:not(.team-col) {
  width: 7%;
}

.standings-league-table .standings-team {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.standings-league-table .standings-team:hover .standings-team-name {
  color: var(--accent-red);
}

.standings-league-table .team-logo {
  width: 20px;
  height: 20px;
  font-size: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Zone indicators (position badges) */
.standings-league-table .standings-rank {
  position: relative;
  padding-left: 16px;
  font-weight: 700;
}

.standings-league-table tbody tr {
  position: relative;
}

.standings-league-table tbody tr::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: transparent;
}

.standings-league-table tr.zone-champions td:first-child::before,
.standings-league-table tr.zone-champions::before {
  background: #2196F3;
}

.standings-league-table tr.zone-europa::before {
  background: #FF9800;
}

.standings-league-table tr.zone-conference::before {
  background: #4CAF50;
}

.standings-league-table tr.zone-relegation::before {
  background: var(--accent-red);
}

/* Rank number colored background based on zone */
.standings-league-table tr.zone-champions .standings-rank {
  background: rgba(33, 150, 243, 0.1);
  border-left: 3px solid #2196F3;
  padding-left: 13px;
}

.standings-league-table tr.zone-europa .standings-rank {
  background: rgba(255, 152, 0, 0.1);
  border-left: 3px solid #FF9800;
  padding-left: 13px;
}

.standings-league-table tr.zone-conference .standings-rank {
  background: rgba(76, 175, 80, 0.1);
  border-left: 3px solid #4CAF50;
  padding-left: 13px;
}

.standings-league-table tr.zone-relegation .standings-rank {
  background: rgba(230, 57, 70, 0.1);
  border-left: 3px solid var(--accent-red);
  padding-left: 13px;
}

/* Remove default ::before since we're using border-left on rank cell */
.standings-league-table tbody tr::before {
  display: none;
}

/* Legend colors */
.standings-legend-color.promotion { background: #2196F3; }
.standings-legend-color.europa { background: #FF9800; }
.standings-legend-color.conference { background: #4CAF50; }
.standings-legend-color.relegation { background: var(--accent-red); }

/* Archive table */
.archive-table {
  width: 100%;
  border-collapse: collapse;
  padding: 0 20px;
}

.archive-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.archive-table td {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-row);
}

.archive-winner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.archive-winner .team-logo {
  width: 22px;
  height: 22px;
  font-size: 9px;
  border-radius: 3px;
}

/* Placeholder for un-built tabs */
.tab-placeholder {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Footer columns */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 32px 24px 24px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  padding: 4px 0;
}

.footer-col a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 24px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-links {
  display: flex;
  gap: 20px;
  font-size: 12px;
}

.footer-brand-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-brand-links a:hover { color: var(--text-primary); }

/* ============ STANDINGS SUB-PANES ============ */

.stpane.hidden { display: none; }

/* Round/threshold selector (5,10,15,20 or 0.5,1.5,2.5...) */
.standings-round-selector {
  display: flex;
  gap: 6px;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.standings-round {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.standings-round.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* HT/FT highlight cell */
.standings-htft-table .htft-hi {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  color: var(--text-primary);
  border-radius: 3px;
}

.standings-htft-table th,
.standings-htft-table td {
  padding: 8px 4px;
  font-size: 11px;
  text-align: center;
}

.standings-htft-table th.team-col,
.standings-htft-table td.team-col {
  padding-left: 12px;
  text-align: left;
}

/* Scorers filters (Team/Nationality/Position dropdowns) */
.scorers-filters {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.scorers-filter {
  flex: 1;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b5bdcc' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Scorers player cell */
.scorer-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.scorer-flag {
  font-size: 14px;
}

.scorers-table td.team-col {
  padding-left: 12px;
}

/* Archive: mùa bấm được, mùa đang đá có nhãn */
.archive-season-link { color: var(--text-primary); text-decoration: none; }
.archive-season-link:hover { color: var(--accent-red); }
.archive-inprogress {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-yellow); background: rgba(251, 191, 36, 0.12); border-radius: 8px; padding: 2px 7px; margin-right: 8px;
}
