/* Rugby World Cup Block (legacy / live compatible) */
.rugby-badge-live {
  display:inline-flex; align-items:center; gap:0.25rem;
  background:rgba(244,63,94,0.15); color:#f43f5e;
  border:1px solid rgba(244,63,94,0.3); border-radius:0.375rem;
  padding:0.125rem 0.5rem; font-size:0.625rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.08em;
}
.rugby-badge-live::before {
  content:''; width:0.375rem; height:0.375rem; border-radius:50%;
  background:#f43f5e; animation:pulse-rugby 1.5s ease-in-out infinite;
}
@keyframes pulse-rugby {
  0%,100%{opacity:1; transform:scale(1);}
  50%{opacity:0.5; transform:scale(0.8);}
}

.rugby-section-title {
  font-size:0.75rem; font-weight:600; text-transform:uppercase; letter-spacing:0.06em;
  color:rgba(255,255,255,0.5); margin:1rem 0 0.5rem; padding-bottom:0.375rem;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.rugby-section-title:first-child { margin-top:0; }
.rugby-section-live {
  display:inline-flex; align-items:center; gap:0.25rem;
  font-size:0.625rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
  color:#f43f5e; background:rgba(244,63,94,0.12); border:1px solid rgba(244,63,94,0.2);
  border-radius:0.25rem; padding:0.0625rem 0.375rem; vertical-align:middle;
}
.rugby-section-live::before {
  content:''; width:0.375rem; height:0.375rem; border-radius:50%; background:#f43f5e;
  animation:pulse 1.5s ease-in-out infinite;
}

.rugby-match-grid {
  display:grid; grid-template-columns:1fr; gap:0.75rem;
}
@media(min-width:640px){
  .rugby-match-grid{ grid-template-columns:repeat(2, 1fr); }
}
@media(min-width:1024px){
  .rugby-match-grid{ grid-template-columns:repeat(3, 1fr); }
}

.rugby-match-card {
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08); border-radius:0.75rem;
  padding:0.875rem 1rem; display:flex; flex-direction:column; gap:0.5rem;
  transition:background 0.2s, transform 0.2s, border-color 0.2s;
}
.rugby-match-card:hover {
  background:rgba(255,255,255,0.07); transform:translateY(-1px);
  border-color:rgba(255,255,255,0.12);
}
.rugby-match-card.rugby-live {
  border-color:rgba(244,63,94,0.25);
  background: rgba(209,105,126,0.05);
}
.rugby-match-card.rugby-live:hover {
  border-color:rgba(244,63,94,0.4);
}

.rugby-match-header {
  display:flex; align-items:center; justify-content:space-between; gap:0.5rem;
}
.rugby-match-group {
  font-size:0.625rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  color:rgba(255,255,255,0.4); background:rgba(255,255,255,0.06);
  padding:0.125rem 0.375rem; border-radius:0.25rem;
}
.rugby-match-time {
  font-size:0.75rem; font-weight:500;
  font-variant-numeric:tabular-nums;
}
.rugby-local-time {
  color:#22d3ee; font-weight:700;
}
.rugby-france-time {
  color:rgba(255,255,255,0.45); font-weight:400;
}
.rugby-match-time .rugby-live-indicator {
  color:#f43f5e; font-weight:700; margin-right:0.25rem;
}

.rugby-teams {
  display:flex; align-items:center; justify-content:space-between; gap:0.5rem;
  margin-top:0.25rem;
}
.rugby-team {
  display:flex; align-items:center; gap:0.5rem; flex:1;
}
.rugby-team.home { justify-content:flex-start; }
.rugby-team.away { justify-content:flex-end; flex-direction:row-reverse; }

.rugby-flag {
  width:1.75rem; height:1.25rem; border-radius:0.25rem; object-fit:cover;
  box-shadow:0 2px 4px rgba(0,0,0,0.15);
}
.rugby-team-name {
  font-size:0.875rem; font-weight:600; color:#fff; line-height:1.2;
}
.rugby-team.away .rugby-team-name { text-align:right; }

.rugby-score-wrap {
  display:flex; align-items:center; justify-content:center; gap:0.5rem;
  min-width:4rem;
}
.rugby-score {
  font-size:1.5rem; font-weight:800; color:#fff; font-variant-numeric:tabular-nums;
  line-height:1;
}
.rugby-score-divider {
  font-size:1rem; font-weight:500; color:rgba(255,255,255,0.3);
}
.rugby-score-live {
  color:#f43f5e;
}

/* Winner highlight in recent results */
.rugby-winner {
  color:#4ade80 !important; font-weight:800 !important;
}
.rugby-winner-score {
  font-size:1.75rem; color:#4ade80;
}
.rugby-loser-score {
  font-size:1.25rem; color:rgba(255,255,255,0.6);
}

.rugby-scorers {
  font-size:0.6875rem; color:rgba(255,255,255,0.5); line-height:1.5;
  margin-top:0.25rem;
}
.rugby-scorers .scorer-item {
  display:inline;
}
.rugby-scorers .scorer-item + .scorer-item::before {
  content:', ';
}
.rugby-scorers-home { text-align:left; }
.rugby-scorers-away { text-align:right; }

.rugby-empty {
  text-align:center; padding:1rem; font-size:0.875rem; color:rgba(255,255,255,0.4);
}

.rugby-venue {
  display:flex; align-items:center; gap:0.375rem;
  margin-top:0.375rem; padding-top:0.375rem;
  border-top:1px solid rgba(255,255,255,0.06);
  font-size:0.6875rem; color:rgba(255,255,255,0.45);
}
.rugby-venue i {
  font-size:0.625rem; color:rgba(255,255,255,0.35);
}

/* ── Legacy / Post-Tournament Mode ── */
.rugby-legacy-wrap {
  display:flex; flex-direction:column; gap:1.25rem; align-items:center; padding:0.5rem 0;
}
.rugby-legacy-trophy {
  text-align:center;
}
.rugby-legacy-trophy .trophy-icon {
  font-size:3rem; color:var(--color-success);
  margin-bottom:0.5rem;
}
.rugby-legacy-trophy .winner-name {
  font-size:1.5rem; font-weight:800; color:#4ade80;
}
.rugby-legacy-trophy .winner-flag {
  width:2.5rem; height:1.875rem; border-radius:0.375rem; object-fit:cover;
  box-shadow:0 4px 8px rgba(0,0,0,0.2); margin-bottom:0.375rem;
}
.rugby-legacy-trophy .winner-stars {
  font-size:1.125rem; color:#4ade80; letter-spacing:0.15em;
}
.rugby-legacy-trophy .winner-label {
  font-size:0.75rem; text-transform:uppercase; letter-spacing:0.08em;
  color:rgba(255,255,255,0.45); margin-top:0.25rem;
}

.rugby-countdown {
  text-align:center; width:100%;
}
.rugby-countdown-label {
  font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em;
  color:rgba(255,255,255,0.45); margin-bottom:0.5rem;
}
.rugby-countdown-grid {
  display:flex; justify-content:center; gap:0.75rem;
}
/* Airport split-flap departure board */
.rugby-countdown-host {
  margin-top:0.75rem;
}
.rugby-flap {
  display:inline-flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:0.25rem;
  perspective:600px;
}
.rugby-flap .airport-char {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.5rem;
  height:2rem;
  background:#1a1a1a;
  border:1px solid #333;
  border-radius:0.125rem;
  font-family:'Courier New',Courier,monospace;
  font-size:1rem;
  font-weight:700;
  color:#4ade80;
  text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 4px rgba(0,0,0,0.3);
  transform-style:preserve-3d;
  animation:airportFlip 0.5s ease forwards;
  opacity:0;
}
.rugby-flap .airport-char.space {
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  animation:none;
  opacity:1;
}
.rugby-flap .airport-char.dash {
  color:rgba(255,255,255,0.4);
}
@keyframes airportFlip {
  0%   { transform:rotateX(-90deg); opacity:0; }
  40%  { transform:rotateX(-20deg); opacity:1; }
  60%  { transform:rotateX(10deg); }
  100% { transform:rotateX(0deg); opacity:1; }
}
body.theme-light .rugby-flap .airport-char {
  background:#e5e5e5;
  border-color:#bbb;
  color:#16a34a;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.1);
}
body.theme-light .rugby-flap .airport-char.space {
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
.rugby-countdown-unit {
  display:flex; flex-direction:column; align-items:center;
  background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.08);
  border-radius:0.5rem; padding:0.5rem 0.75rem; min-width:3.5rem;
}
.rugby-countdown-unit .value {
  font-size:1.5rem; font-weight:800; color:#fff; line-height:1;
}
.rugby-countdown-unit .label {
  font-size:0.625rem; text-transform:uppercase; letter-spacing:0.06em;
  color:rgba(255,255,255,0.45); margin-top:0.25rem;
}

.rugby-editions {
  width:100%;
}
.rugby-editions-title {
  font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em;
  color:rgba(255,255,255,0.45); margin-bottom:0.5rem; text-align:center;
}
.rugby-editions-table {
  width:100%; border-collapse:collapse;
  font-size:0.875rem;
}
.rugby-editions-table th,
.rugby-editions-table td {
  padding:0.5rem 0.75rem; text-align:left;
}
.rugby-editions-table th {
  font-size:0.625rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  color:rgba(255,255,255,0.4); border-bottom:1px solid rgba(255,255,255,0.08);
}
.rugby-editions-table td {
  color:rgba(255,255,255,0.7); border-bottom:1px solid rgba(255,255,255,0.05);
}
.rugby-editions-table td.year {
  font-weight:700; color:#fff; width:4rem;
}
.rugby-editions-table tr:hover td {
  background:rgba(255,255,255,0.03);
}

/* Theme light overrides */
body.theme-light .rugby-venue {
  color:rgba(0,0,0,0.45); border-top-color:rgba(0,0,0,0.06);
}
body.theme-light .rugby-venue i {
  color:rgba(0,0,0,0.35);
}
body.theme-light .rugby-match-card {
  background:rgba(0,0,0,0.03); border-color:rgba(0,0,0,0.06);
}
body.theme-light .rugby-match-card:hover {
  background:rgba(0,0,0,0.05); border-color:rgba(0,0,0,0.1);
}
body.theme-light .rugby-match-card.rugby-live {
  border-color:rgba(244,63,94,0.2);
  background: rgba(209,105,126,0.04);
}
body.theme-light .rugby-section-live { color:#be123c; background:rgba(244,63,94,0.08); border-color:rgba(244,63,94,0.15); }
body.theme-light .rugby-section-title {
  color:rgba(0,0,0,0.45); border-bottom-color:rgba(0,0,0,0.08);
}
body.theme-light .rugby-team-name { color:#0f172a; }
body.theme-light .rugby-match-time { color:rgba(0,0,0,0.5); }
body.theme-light .rugby-local-time { color:#0284c7; }
body.theme-light .rugby-france-time { color:rgba(0,0,0,0.4); }
body.theme-light .rugby-match-group { color:rgba(0,0,0,0.4); background:rgba(0,0,0,0.04); }
body.theme-light .rugby-score { color:#0f172a; }
body.theme-light .rugby-score-divider { color:rgba(0,0,0,0.25); }
body.theme-light .rugby-scorers { color:rgba(0,0,0,0.5); }
body.theme-light .rugby-empty { color:rgba(0,0,0,0.4); }
body.theme-light .rugby-winner { color:#16a34a !important; }
body.theme-light .rugby-winner-score { color:#16a34a; }
body.theme-light .rugby-loser-score { color:rgba(0,0,0,0.5); }
body.theme-light .rugby-badge-live {
  background:rgba(244,63,94,0.1); color:#be123c; border-color:rgba(244,63,94,0.25);
}

/* Theme light overrides for legacy */
body.theme-light .rugby-legacy-trophy .winner-name { color:#16a34a; }
body.theme-light .rugby-legacy-trophy .trophy-icon { color:#16a34a; text-shadow:none; }
body.theme-light .rugby-legacy-trophy .winner-stars { color:#16a34a; }
body.theme-light .rugby-legacy-trophy .winner-label { color:rgba(0,0,0,0.45); }
body.theme-light .rugby-countdown-label { color:rgba(0,0,0,0.45); }
body.theme-light .rugby-countdown-unit { background:rgba(0,0,0,0.03); border-color:rgba(0,0,0,0.06); }
body.theme-light .rugby-countdown-unit .value { color:#0f172a; }
body.theme-light .rugby-countdown-unit .label { color:rgba(0,0,0,0.4); }
body.theme-light .rugby-editions-title { color:rgba(0,0,0,0.45); }
body.theme-light .rugby-editions-table th { color:rgba(0,0,0,0.4); border-bottom-color:rgba(0,0,0,0.08); }
body.theme-light .rugby-editions-table td { color:rgba(0,0,0,0.6); border-bottom-color:rgba(0,0,0,0.06); }
body.theme-light .rugby-editions-table td.year { color:#0f172a; }
body.theme-light .rugby-editions-table tr:hover td { background:rgba(0,0,0,0.02); }


/* Past winners list (aggregated) */
.wc-past-winners-list {
  width:100%;
}
.wc-winners-list {
  display:grid; grid-template-columns:1fr; gap:0.5rem;
}
@media(min-width: 1024px) {
  .wc-winners-list { grid-template-columns: repeat(2, 1fr); }
}
.wc-winner-row {
  display:flex; align-items:center; gap:0.5rem;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:0.5rem;
  padding:0.5rem 0.75rem;
  font-size:0.875rem;
  transition:background 0.2s;
}
.wc-winner-row:hover {
  background:rgba(255,255,255,0.06);
}
.wc-winner-row .wc-winner-flag-img {
  width:1.5rem; height:1.125rem; border-radius:0.25rem; object-fit:cover;
  box-shadow:0 2px 4px rgba(0,0,0,0.15);
  flex-shrink:0;
}
.wc-winner-row .wc-winner-row-name {
  font-weight:600; color:#fff;
}
.wc-winner-row .wc-winner-row-stars {
  color:#fbbf24; font-weight:700; letter-spacing:0.05em;
  margin-left:0.25rem;
}
.wc-winner-row .wc-winner-row-years {
  color:rgba(255,255,255,0.45); font-size:0.75rem;
  margin-left:auto; font-variant-numeric:tabular-nums;
}
body.theme-light .wc-winner-row {
  background:rgba(0,0,0,0.02); border-color:rgba(0,0,0,0.06);
}
body.theme-light .wc-winner-row:hover {
  background:rgba(0,0,0,0.04);
}
body.theme-light .wc-winner-row .wc-winner-row-name { color:#0f172a; }
body.theme-light .wc-winner-row .wc-winner-row-stars { color:#d97706; }
body.theme-light .wc-winner-row .wc-winner-row-years { color:rgba(0,0,0,0.45); }
