/* ==========================================================
   BETMARKET.GR × WORLD CUP 2026 BRACKET PREDICTOR
   ========================================================== */

/* ---------- Bracket-specific Design Tokens ---------------- */
/* Brand colors, gray scale, --color-primary etc. come from style.css */
:root {
  /* Only var not in style.css */
  --color-brand-yellow-orange: #FFA54D;

  /* Bracket-specific tokens */
  --bp-bg-main:       var(--color-gray-100);   /* #F7F1EB */
  --bp-bg-card:       var(--color-brand-white); /* #ffffff */
  --bp-bg-card-hover: var(--color-gray-100);   /* #F7F1EB */
  --bp-bg-glass:      rgba(0,0,0,0.03);
  --bp-border:        rgba(0,0,0,0.1);
  --bp-border-bright: rgba(241,90,36,0.4);
  --bp-text-primary:  #121212;
  --bp-text-muted:    #666666;
  --bp-gold:          #d4900a;
  --bp-glow:          rgba(241,90,36,0.25);

  /* Override style.css --radius-sm (0.25rem) → 0 for flat bracket design */
  --radius:    0;
  --radius-sm: 0;
  --transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

.main-header-wrapper.sticky-header {
  position: unset;
}

body {
  color:#000
}

body.bracket-predictor-page {
  background: var(--bp-bg-main);
  color: var(--bp-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Force light-mode vars — prevent dark-theme bleed from style.css */
.bracket-predictor-page {
  --color-bg-primary:   var(--color-brand-white);
  --color-text-primary: var(--bp-text-primary);
}

/* ---------- HERO SECTION ---------------------------------- */
.bp-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(160deg, #fff8f4 0%, #fff3ec 50%, #fff8f4 100%);
  border-bottom: 1px solid var(--bp-border);
}

/* Hero image — full width, no gaps */
.bp-hero-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Powered-by badge στο hero με εικόνα */
.bp-hero .bp-powered-row {
  padding: 12px 20px;
}

.bp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(241,90,36,0.15);
  border: 1px solid rgba(241,90,36,0.35);
  border-radius: 30px;
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-brand-orange);
  margin-bottom: 24px;
}

.bp-hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--bp-text-primary);
}

.bp-hero h1 span {
  background: linear-gradient(90deg, var(--color-brand-orange), var(--color-brand-yellow-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bp-hero p {
  color: var(--color-gray-600);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 36px;
}

/* ---------- ACTION BUTTONS -------------------------------- */
.bp-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--bp-bg-main);
  border-bottom: 1px solid var(--bp-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.bp-btn-primary {
  background: var(--color-brand-orange);
  color: var(--color-brand-white);
}
.bp-btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 8px 24px var(--bp-glow); }

.bp-btn-secondary {
  background: transparent;
  color: var(--bp-text-primary);
  border: 1px solid var(--bp-border);
}
.bp-btn-secondary:hover { background: var(--bp-bg-glass); border-color: rgba(0,0,0,0.25); }

.bp-btn-outline {
  background: transparent;
  color: var(--color-brand-orange);
  border: 1px solid rgba(241,90,36,0.4);
}
.bp-btn-outline:hover { background: rgba(241,90,36,0.1); }

.bp-btn-icon { font-size: 1rem; }

/* ---------- PROGRESS STEPPER ------------------------------ */
.bp-stepper {
  background: var(--color-brand-white);
  border-bottom: 1px solid var(--bp-border);
  border-top: 1px solid var(--bp-border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bp-stepper-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 0;
}
.bp-stepper-inner::-webkit-scrollbar { display: none; }

.bp-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bp-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  border: 1.5px solid var(--bp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bp-text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.bp-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bp-text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

.bp-step.active .bp-step-dot {
  background: var(--color-brand-orange);
  border-color: var(--color-brand-orange);
  color: var(--color-brand-white);
  box-shadow: 0 0 0 4px var(--bp-glow);
}
.bp-step.active .bp-step-label { color: var(--color-brand-orange); }

.bp-step.done .bp-step-dot {
  background: rgba(241,90,36,0.2);
  border-color: var(--color-brand-orange);
  color: var(--color-brand-orange);
}
.bp-step.done .bp-step-label { color: var(--color-brand-orange); }

.bp-step-connector {
  width: 28px;
  height: 2px;
  background: var(--bp-border);
  flex-shrink: 0;
  margin: 0 4px;
  border-radius: 2px;
  transition: var(--transition);
}
.bp-step-connector.done { background: var(--color-brand-orange); opacity: 0.5; }

/* ---------- MAIN CONTAINER -------------------------------- */
.bp-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* ---------- SECTION HEADER -------------------------------- */
.bp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.bp-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  color:var(--color-text-secondary)
}

.bp-section-title .tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(241,90,36,0.15);
  color: var(--color-brand-orange);
  padding: 4px 10px;
  border-radius: 4px;
}

.bp-progress-bar-wrap {
  background: var(--bp-border);
  border-radius: 4px;
  height: 4px;
  width: 180px;
  overflow: hidden;
}
.bp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-brand-orange), var(--color-brand-yellow-orange));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ---------- GROUP STAGE GRID ------------------------------ */
.bp-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ---------- GROUP CARD ------------------------------------ */
.bp-group-card {
  background: var(--color-brand-white);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.bp-group-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.12); }

.bp-group-card.complete {
  border-color: rgba(241,90,36,0.35);
}

/* GROUP HEADER — orange like standings thead */
.bp-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: var(--color-brand-orange);
  border-bottom: none;
}

.bp-group-letter {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-brand-white);
  letter-spacing: 0.5px;
}

.bp-group-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
}

.bp-group-card.complete .bp-group-status { color: rgba(255,255,255,0.9); }

/* ---------- TEAM ROW — betmarket zebra style -------- */
.bp-team-row {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  border-bottom: none;
  user-select: none;
  font-size: 14px;
}
.bp-team-row:last-child { border-bottom: none; }

/* Zebra rows: odd=white, even=cream */
.bp-team-row:nth-child(odd)  { background: var(--color-brand-white); }

/* Selected ranks override zebra */
.bp-team-row.rank-1 { background: rgba(241,90,36,0.12) !important; }
.bp-team-row.rank-2 { background: rgba(241,90,36,0.06) !important; }
.bp-team-row.rank-3 { background: rgba(241,90,36,0.02) !important; }
.bp-team-row.rank-4 > *:not(.bp-team-odds) { opacity: 0.7; }

.bp-team-row:hover { background: rgba(241,90,36,0.08) !important; }

.bp-team-flag {
  width: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG flag image */
.bp-team-svg-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: block;
}

.bp-team-info {
  flex: 1;
  min-width: 0;
}

.bp-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.bp-team-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid var(--bp-border);
  color: var(--bp-text-muted);
  transition: var(--transition);
}

.bp-team-row.rank-1 .bp-team-rank {
  background: var(--color-brand-orange);
  border-color: var(--color-brand-orange);
  color: var(--color-brand-white);
}
.bp-team-row.rank-2 .bp-team-rank {
  background: rgba(241,90,36,0.2);
  border-color: rgba(241,90,36,0.5);
  color: var(--color-brand-orange);
}
.bp-team-row.rank-3 .bp-team-rank {
  background: rgba(255,255,255,0.04);
  border-color: var(--bp-border);
  color: var(--bp-text-muted);
}



/* ---------- THIRD PLACE STAGE ----------------------------- */
.bp-third-place-wrap {
  background: var(--color-brand-white);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.bp-third-place-wrap h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-brand-white);
  background: var(--color-brand-orange);
  padding: 10px 15px;
  margin: 0;
}

.bp-third-place-wrap p {
  font-size: 0.83rem;
  color: var(--bp-text-muted);
  margin: 0;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: var(--color-gray-100);
}

.bp-third-grid {
  display: block; /* vertical list, not grid */
  padding: 8px 0;
}

.bp-third-team {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
}
.bp-third-team:last-child { border-bottom: none; }

/* Zebra on third-place list too */
.bp-third-team:nth-child(odd)  { background: var(--color-brand-white); }
.bp-third-team:nth-child(even) { background: var(--color-gray-100); }

.bp-third-team:hover { background: rgba(241,90,36,0.08) !important; }
.bp-third-team.selected {
  background: rgba(241,90,36,0.12) !important;
}
.bp-third-team.eliminated { opacity: 0.3; pointer-events: none; }

.bp-third-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--bp-border);
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: var(--transition);
}
.bp-third-team.selected .bp-third-check {
  background: var(--color-brand-orange);
  border-color: var(--color-brand-orange);
  color: var(--color-brand-white);
}

.bp-third-count {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 18px;
  color: var(--bp-text-muted);
}
.bp-third-count span { color: var(--color-brand-orange); }

/* ---------- KNOCKOUT BRACKET ------------------------------ */
.bp-bracket-wrap {
  overflow-x: auto;
  padding-bottom: 20px;
  cursor: grab;
}
.bp-bracket-wrap:active { cursor: grabbing; }

.bp-bracket {
  display: flex;
  gap: 0;
  min-width: 1100px;
  align-items: stretch;
  position: relative;
}

/* ---------- ROUND COLUMN ---------------------------------- */
.bp-round-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 170px;
}

.bp-round-label {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  padding: 0 0 16px;
  flex-shrink: 0;
}
.bp-round-label.this-round { color: var(--color-brand-orange); }

.bp-round-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  position: relative;
}

/* ---------- MATCH CARD ------------------------------------ */
.bp-match {
  display: flex;
  flex-direction: column;
  margin: 0 8px;
  position: relative;
}

.bp-match-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bp-bg-card);
  border: 1px solid var(--bp-border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 42px;
}

.bp-match-slot:first-child {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 1px solid var(--bp-border);
}

.bp-match-slot:last-child {
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.bp-match-slot:hover:not(.empty):not(.winner) {
  background: var(--bp-bg-card-hover);
  border-color: rgba(241,90,36,0.3);
  z-index: 1;
}

.bp-match-slot.winner {
  background: rgba(241,90,36,0.12);
  border-color: var(--color-brand-orange);
}
.bp-match-slot.winner:first-child { border-bottom-color: rgba(241,90,36,0.2); }

.bp-match-slot.empty { cursor: default; }

.bp-match-slot-flag { font-size: 1.1rem; flex-shrink: 0; }
.bp-match-slot-name {
  font-size: 0.78rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-match-slot-name.placeholder { color: var(--bp-text-muted); font-weight: 400; font-style: italic; }

.bp-match-slot.winner .bp-win-icon {
  width: 16px;
  height: 16px;
  background: var(--color-brand-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  flex-shrink: 0;
}

.bp-match-divider {
  height: 1px;
  background: var(--bp-border);
  margin: 0 8px;
}

/* ---------- BRACKET CONNECTOR LINES ----------------------- */
.bp-connector {
  position: absolute;
  right: -8px;
  width: 8px;
  border-right: 2px solid var(--bp-border);
  border-top: 2px solid var(--bp-border);
  border-bottom: 2px solid var(--bp-border);
  border-radius: 0 4px 4px 0;
  pointer-events: none;
  transition: border-color 0.3s ease;
}
.bp-connector.done { border-color: rgba(241,90,36,0.4); }

/* ---------- FINAL COLUMN ---------------------------------- */
.bp-final-col {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.bp-trophy-slot {
  text-align: center;
}

.bp-trophy-icon {
  font-size: 3rem;
  display: block;
  filter: grayscale(1) opacity(0.3);
  transition: var(--transition);
  margin-bottom: 12px;
}
.bp-trophy-slot.crowned .bp-trophy-icon {
  filter: none;
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(245,197,24,0.6)); }
  50% { filter: drop-shadow(0 0 20px rgba(245,197,24,0.9)); }
}

.bp-champion-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-brand-orange);
  margin-bottom: 4px;
  min-height: 1.4em;
}

.bp-champion-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
}

/* ---------- NAVIGATE BUTTON ------------------------------- */
.bp-nav-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

/* ---------- SHARE PANEL ----------------------------------- */
.bp-share-panel {
  background: var(--bp-bg-card);
  border: 1px solid var(--bp-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.bp-share-panel h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.bp-share-panel p {
  color: var(--bp-text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.bp-share-url-wrap {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.bp-share-url {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--bp-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--color-brand-white);
  font-size: 0.8rem;
  outline: none;
  min-width: 0;
}

/* ---------- CONFETTI OVERLAY ------------------------------ */
.bp-confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.bp-confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ---------- TOAST ----------------------------------------- */
.bp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-brand-orange);
  color: var(--color-brand-white);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.bp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- STAGE TRANSITIONS ----------------------------- */
.bp-stage { display: none; }
.bp-stage.active { display: block; animation: fadeIn 0.35s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- RESPONSIVE ------------------------------------ */
@media (max-width: 768px) {
  .bp-hero { padding: 40px 16px 32px; }
  .bp-stepper-inner { gap: 0; padding: 12px 0; }
  .bp-step-label { display: none; }
  .bp-step-connector { width: 16px; }
  .bp-groups-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bp-section-header { flex-direction: column; align-items: flex-start; }
  .bp-bracket { min-width: 800px; }
}

@media (max-width: 480px) {
  .bp-groups-grid { grid-template-columns: 1fr; }
  .bp-actions { gap: 8px; }
  .bp-btn { padding: 10px 18px; font-size: 0.83rem; }
}

/* ---------- SCROLLBAR ------------------------------------- */
.bp-bracket-wrap::-webkit-scrollbar { height: 5px; }
.bp-bracket-wrap::-webkit-scrollbar-track { background: var(--bp-border); }
.bp-bracket-wrap::-webkit-scrollbar-thumb { background: var(--color-brand-orange); border-radius: 3px; }

/* ---------- 4-POSITION RANKING ---------------------------- */
.bp-team-row.rank-0 > *:not(.bp-team-odds) { opacity: 0.7; }
.bp-team-row.rank-3 > *:not(.bp-team-odds) { opacity: 0.8; }
.bp-team-row.rank-4 > *:not(.bp-team-odds) { opacity: 0.35; }
.bp-team-row.rank-4 .bp-team-rank { color: var(--bp-text-muted); background: none; border-color: var(--bp-border); }

/* Advance badge on team rows */
.bp-team-row.advances::after {
  content: '→ Φ32';
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-brand-orange);
  background: rgba(241,90,36,0.12);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.bp-team-row.maybe::after {
  content: '→ 3η';
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--bp-gold);
  background: rgba(245,197,24,0.12);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---------- THIRD-PLACE CARDS ----------------------------- */
.bp-third-card { cursor: pointer; }
.bp-third-card .bp-team-row { cursor: default; pointer-events: none; }
.bp-third-card.complete .bp-group-header { background: rgba(241,90,36,0.08); }
.bp-third-card.disabled { opacity: 0.4; pointer-events: none; }

.bp-third-checkbox {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bp-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.bp-third-checkbox.checked { border-color: var(--color-brand-orange); background: rgba(241,90,36,0.15); }

.bp-third-count {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 15px;
  color: var(--bp-text-muted);
  text-align: center;
  background: var(--color-gray-100);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.bp-third-count span { color: var(--color-brand-orange); font-weight: 800; }

/* ---------- KNOCKOUT TABLE -------------------------------- */
.bp-ko-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}

.bp-ko-th {
  padding: 10px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  text-align: center;
  background: var(--bp-bg-card);
  border-bottom: 1px solid var(--bp-border);
}
.bp-ko-th-final { color: var(--color-brand-orange) !important; }

.bp-ko-conn {
  width: 18px;
  border-right: 2px solid var(--bp-border);
  padding: 0;
}

.bp-ko-cell {
  padding: 0;
  height: 36px;
  vertical-align: middle;
  cursor: pointer;
  background: var(--bp-bg-card);
  border-left: 2px solid var(--bp-border);
  transition: var(--transition);
  width: 140px;
  overflow: hidden;
}
.bp-ko-cell:hover:not(.empty) { background: var(--bp-bg-card-hover); }
.bp-ko-cell.empty { cursor: default; }
.bp-ko-cell.winner {
  background: rgba(241,90,36,0.1);
  border-left: 3px solid var(--color-brand-orange);
}
.bp-ko-cell.loser { opacity: 0.35; }

.bp-ko-flag {
  font-size: 1rem;
  margin: 0 5px 0 7px;
  vertical-align: middle;
  flex-shrink: 0;
}
.bp-ko-name {
  font-size: 0.75rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 8px 6px 8px 0;
  display: inline-block;
  max-width: 100px;
  vertical-align: middle;
}
.bp-ko-name.placeholder { color: var(--bp-text-muted); font-style: italic; font-weight: 400; font-size: 0.68rem; }

/* ---------- KNOCKOUTS.CSS — betmarket standings design ------------ */
/* Match the site's standings table: orange header row, white/cream body */
.bracket-predictor-page .table-knockouts-team-cell,
.bracket-predictor-page .table-knockouts-score-cell {
  background: var(--color-brand-white);
  color: var(--bp-text-primary);
  font-size: 14px;
  width: 120px;    /* stable fixed width — never resizes when content changes */
  min-width: 120px;
  max-width: 120px;
}

/* Alternate rows in knockout too — the table already alternates naturally
   via the rowspan structure, so we apply zebra on odd/even rows */
.bracket-predictor-page .table-knockouts tr:nth-child(odd) .table-knockouts-team-cell,
.bracket-predictor-page .table-knockouts tr:nth-child(odd) .table-knockouts-score-cell {
  background: var(--color-brand-white);
}
.bracket-predictor-page .table-knockouts tr:nth-child(even) .table-knockouts-team-cell,
.bracket-predictor-page .table-knockouts tr:nth-child(even) .table-knockouts-score-cell {
  background: var(--color-gray-100);
}

.bracket-predictor-page .table-knockouts-header-cell {
  color: var(--color-brand-white);
  background: var(--color-brand-orange);
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.bracket-predictor-page .orange-back-color {
  background: var(--color-brand-orange) !important;
  color: var(--color-brand-white) !important;
}

.bracket-predictor-page .table-knockouts tr {
  background: transparent;
}

.bracket-predictor-page .table-knockouts-text-team {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  overflow: visible;       /* let odds badge show instead of clipping */
  white-space: nowrap;
}

/* Clickable slot cell + its adjacent score cell */
.bp-ko-slot {
  cursor: pointer;
  transition: background 0.15s ease;
}
/* Score cell always mirrors the team cell color */
.bp-ko-slot + .table-knockouts-score-cell {
  transition: background 0.15s ease;
}
.bp-ko-slot:hover,
.bp-ko-slot:hover + .table-knockouts-score-cell {
  background: rgba(241,90,36,0.1) !important;
}
/* Winner state */
.bp-ko-slot.winner,
.bp-ko-slot.winner + .table-knockouts-score-cell {
  background: rgba(241,90,36,0.18) !important;
}
/* Loser state */
.bp-ko-slot.loser,
.bp-ko-slot.loser + .table-knockouts-score-cell {
  background: rgba(0,0,0,0.03) !important;
  opacity: 0.5;
}

.bp-ko-placeholder {
  color: var(--color-gray-400); /* #B6B6B6 */
  font-style: italic;
  font-size: 0.72rem;
}

/* ==========================================================
   SHARE POPUP MODAL
   ========================================================== */

/* Modal wrapper — hidden by default */
.bp-share-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.bp-share-modal.open { display: flex; }

/* Backdrop */
.bp-share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: bpFadeIn 0.3s ease;
}

/* Modal box */
.bp-share-modal-box {
  position: relative;
  z-index: 1;
  background: var(--color-brand-white);
  border-radius: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 0 36px 36px; /* no top padding — banner fills the top edge */
  text-align: center;
  overflow-x: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.08);
  animation: bpSlideUp 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Confetti canvas layer inside box */
.bp-share-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* All modal content above canvas */
.bp-share-modal-box > *:not(.bp-share-canvas) {
  position: relative;
  z-index: 1;
}

/* Close button */
.bp-share-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--bp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10; /* above sponsor banner */
}
.bp-share-close:hover { background: rgba(0,0,0,0.12); color: var(--bp-text-primary); }

/* ── SPONSOR BANNER (top of share modal) ──────────────────── */
.bp-share-sponsor-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--operator-blue, #0055ff);
  /* Break out horizontally to fill edge-to-edge, flush to top */
  margin: 0 -36px 24px;
  padding: 16px 20px;
  color: var(--color-brand-white);
  text-decoration: none;
  transition: background 0.2s;
}
.bp-share-sponsor-banner:hover {
  background: var(--operator-blue-dark, #0040cc);
}
.bp-share-sponsor-logo {
  display: block;
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1); /* Force white SVG on blue bg */
}
.bp-share-sponsor-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* WC2026 Logo */
.bp-share-logo {
  width: 90px;
  margin: 0 auto 18px;
  animation: bpPopIn 0.5s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.bp-share-logo svg { width: 90px; height: auto; display: block; }

/* Title */
.bp-share-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--bp-text-primary);
  margin-bottom: 18px;
  animation: bpFadeIn 0.4s 0.2s both;
}

/* Champion reveal */
.bp-share-champion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(241,90,36,0.08) 0%, rgba(255,165,77,0.06) 100%);
  border: 1px solid rgba(241,90,36,0.2);
  border-radius: 0;
  animation: bpFadeIn 0.4s 0.3s both;
}
.bp-share-champ-flag {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-share-champ-flag img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(241,90,36,0.3);
  box-shadow: 0 2px 8px rgba(241,90,36,0.2);
}
.bp-share-champ-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-brand-orange);
  letter-spacing: -0.3px;
}
.bp-share-champ-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
}

/* URL row */
.bp-share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  animation: bpFadeIn 0.4s 0.35s both;
}
.bp-share-url-input {
  flex: 1;
  min-width: 0;
  background: var(--color-gray-100);
  border: 1px solid var(--bp-border);
  border-radius: 0;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--bp-text-primary);
  outline: none;
}
.bp-share-url-input:focus { border-color: rgba(241,90,36,0.5); }
.bp-share-copy-btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 0.83rem;
}

/* Social share */
.bp-share-social {
  animation: bpFadeIn 0.4s 0.45s both;
}
.bp-share-social-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  margin-bottom: 10px;
}
.bp-share-social-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  color: var(--color-brand-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bp-social-btn:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }
.bp-social-x   { background: #000000; }
.bp-social-fb  { background: #1877F2; }
.bp-social-wa  { background: #25D366; }
.bp-social-tg  { background: #2AABEE; }

/* Animations */
@keyframes bpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bpSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bpPopIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Responsive popup */
@media (max-width: 480px) {
  .bp-share-modal-box {
    padding: 32px 20px 28px;
    width: calc(100% - 20px);
  }
  .bp-share-title { font-size: 1.15rem; }
  .bp-social-btn { width: 40px; height: 40px; }
  .bp-share-url-row { flex-direction: column; }
  .bp-share-copy-btn { width: 100%; justify-content: center; }
}

/* ==========================================================
   CARD PREVIEWS SECTION (inside share modal)
   ========================================================== */
.bp-card-previews {
  margin-bottom: 20px;
  animation: bpFadeIn 0.4s 0.38s both;
}

.bp-card-previews-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  margin-bottom: 10px;
}

/* Loading state */
.bp-card-previews-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--bp-text-muted);
  font-size: 0.82rem;
}

/* Spinner animation */
.bp-card-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(241,90,36,0.2);
  border-top-color: var(--color-brand-orange);
  border-radius: 50%;
  animation: bp-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes bp-spin {
  to { transform: rotate(360deg); }
}

/* Two-column grid for the 2 cards */
.bp-card-previews-inner {
  display: grid;
  grid-template-columns: 2fr 1fr; /* landscape wider, story narrower */
  gap: 12px;
  align-items: start;
}

/* Single card item */
.bp-card-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-card-item-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  text-align: center;
}

/* Canvas previews — scaled to fit */
.bp-card-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: #f0f0f0; /* placeholder bg while loading */
  aspect-ratio: 1200 / 630;
}

.bp-card-canvas--story {
  aspect-ratio: 1080 / 1920;
}

/* Download button under each card */
.bp-card-dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--bp-text-primary);
  color: var(--color-brand-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.bp-card-dl-btn:hover {
  background: var(--color-brand-orange);
  transform: translateY(-1px);
}

/* Mobile: stack vertically */
@media (max-width: 480px) {
  .bp-card-previews-inner {
    grid-template-columns: 1fr;
  }
  .bp-card-item--story {
    max-width: 75%;
    margin: 0 auto;
  }
}


/* ============================================================
   STOIXIMAN SPONSORSHIP — powered-by, odds, sticky bar
   Brand color: #0055ff
   ============================================================ */

/* ---------- CSS VARS (Stoiximan) -------------------------- */
:root {
  --operator-odd-back:   rgb(247, 249, 252);
  --operator-odd-border: rgb(226, 232, 248);
  --operator-blue:       #0055ff;
  --operator-blue-dark:  #0040cc;
  --operator-blue-glow:  rgba(0,85,255,0.25);
  --operator-blue-light: rgba(0,85,255,0.1);
}

/* ---------- POWERED BY (hero) ----------------------------- */
.bp-powered-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.bp-powered-label {
  font-size: 12px;
  color: var(--bp-text-muted);
  letter-spacing: 0.05em;
}

.bp-powered-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--operator-blue-light);
  border: 1px solid rgba(0,85,255,0.35);
  border-radius: 20px;
  padding: 5px 14px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.bp-powered-badge:hover {
  background: rgba(0,85,255,0.18);
  box-shadow: 0 0 0 3px var(--operator-blue-glow);
}

.bp-powered-dot {
  width: 6px;
  height: 6px;
  background: var(--operator-blue);
  border-radius: 50%;
  animation: bp-stx-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes bp-stx-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.bp-powered-logo {
  font-size: 15px;
  font-weight: 900;
  color: var(--operator-blue);
  letter-spacing: -0.5px;
  line-height: 1;
}

/* ---------- ODDS BADGE (team rows) ------------------------ */
.bp-team-odds {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--operator-odd-back);
  border: 1px solid var(--operator-odd-border);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--operator-blue);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  line-height: 1.4;
  /* Always last flex item — after any ::after pseudo-element */
  order: 1;
  /* Fixed width so all odds badges are same size */
  width: 50px;
  text-align: center;
}
.bp-team-odds:hover {
  background: var(--operator-blue);
  color: var(--color-brand-white);
  border-color: var(--operator-blue);
  transform: scale(1.06);
  box-shadow: 0 2px 10px var(--operator-blue-glow);
}

/* ── ELIMINATED / DIM ROWS ─────────────────────────────────
   .bp-team-row--dim  : full elimination (non-qualifying 4th in completed group, excess thirds)
   .bp-team-row.rank-0: unranked team (group not yet complete)
   ─────────────────────────────────────────────────────────── */

/* Eliminated: subtle crossed-out look + muted bg */
.bp-team-row--dim {
  pointer-events: none;
  background: rgba(0,0,0,0.015) !important;
}
/* Grayscale flag for eliminated */
.bp-team-row--dim .bp-team-svg-flag {
  filter: grayscale(1) opacity(0.35);
}
/* Strikethrough team name */
.bp-team-row--dim .bp-team-name {
  text-decoration: line-through;
  opacity: 0.35;
  color: var(--bp-text-muted);
}
/* Dim rank bubble */
.bp-team-row--dim .bp-team-rank {
  opacity: 0.25;
}
/* Odds badge stays full opacity and clickable */
.bp-team-row--dim .bp-team-odds {
  opacity: 1;
  pointer-events: auto;
}

/* Knockout variant — compact for table cells */
.bp-team-odds--ko {
  font-size: 10px;
  padding: 2px 5px;
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 4px;
  flex-shrink: 0;   /* never let the odds badge get squeezed out */
  width: auto;      /* override the fixed 50px from base class */
}

/* ---------- STICKY STOIXIMAN BAR -------------------------- */
.bp-stoiximan-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-brand-white);
  border-top: 2px solid var(--operator-blue);
  z-index: 9990;
  box-shadow: 0 -4px 24px rgba(0,85,255,0.12);
  padding: 10px 20px;
}

.bp-stoiximan-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bp-stoiximan-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bp-stoiximan-bar-logo {
  font-size: 18px;
  font-weight: 900;
  color: var(--operator-blue);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.bp-stoiximan-bar-text {
  font-size: 13px;
  color: var(--color-brand-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-stoiximan-bar-btn {
  display: inline-flex;
  align-items: center;
  background: var(--operator-blue);
  color: var(--color-brand-white);
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px var(--operator-blue-glow);
}
.bp-stoiximan-bar-btn:hover {
  background: var(--operator-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--operator-blue-glow);
}

/* Push toast above sticky bar */
.bp-toast { bottom: 72px; }

/* Push main content up so sticky bar doesn't overlap last element */
.bp-main { padding-bottom: 100px; }

/* Mobile: collapse bar text */
@media (max-width: 600px) {
  .bp-stoiximan-bar-text { display: none; }
  .bp-stoiximan-bar-logo { font-size: 16px; }
  .bp-stoiximan-bar-btn  { padding: 9px 16px; font-size: 13px; }
}

/* ---------- EXPERT PICK BUTTON ----------------------------- */
.bp-btn-expert {
  background: var(--operator-blue);
  color: var(--color-brand-white);
  border: none;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(245,166,35,0.35);
  position: relative;
  overflow: hidden;
}
.bp-btn-expert::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.bp-btn-expert:hover {
  background: linear-gradient(135deg, #ffb733 0%, #f59800 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245,166,35,0.5);
}
.bp-btn-expert:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(245,166,35,0.35);
}

/* ---------- READ-ONLY (SHARED LINK) BANNER ---------------- */
.bp-readonly-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9995;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  border-top: 2px solid rgba(255,255,255,0.1);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.4);
}

.bp-readonly-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  flex-shrink: 0;
}

.bp-readonly-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F15A24 0%, #ff8c42 100%);
  color: var(--color-brand-white);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 11px 24px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(241,90,36,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  animation: bp-ro-pulse 2.5s ease-in-out infinite;
}
.bp-readonly-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 28px rgba(241,90,36,0.6);
  animation: none;
}
@keyframes bp-ro-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(241,90,36,0.45); }
  50%       { box-shadow: 0 4px 28px rgba(241,90,36,0.75); }
}

/* Read-only: subtle cursor change on non-interactive elements */
body.bp-readonly .bp-team-row,
body.bp-readonly .bp-group-card {
  cursor: default;
}

@media (max-width: 480px) {
  .bp-readonly-banner { justify-content: center; }
  .bp-readonly-text   { display: none; }
}
