/* ============================================================
   World Cup 2026 Betting — site stylesheet
   Light mode only · Mobile-first · System fonts
   ============================================================ */

/* ── Reset / base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #005eb8;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

/* ── Layout shell ────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 1rem;
  height: 56px;
  gap: 1rem;
}

/* Brand */
.site-nav__brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  line-height: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}
.site-nav__brand:hover,
.site-nav__brand:focus,
.site-nav__brand:active { text-decoration: none; color: #1a1a1a; outline: none; }

.site-nav__logo {
  max-height: 25vh;
  width: auto;
  display: block;
  margin-top: 10px;
}

/* Hamburger */
.site-nav__toggle {
  display: none;
  background: none;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  padding: 5px 9px;
  cursor: pointer;
  line-height: 1;
  color: #1a1a1a;
  font-size: 1.2rem;
  margin-right: 12px;
}
.site-nav__toggle:focus-visible {
  outline: 2px solid #005eb8;
  outline-offset: 2px;
}

/* Nav body (links) */
.site-nav__body {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.site-nav__links a,
.site-nav__link {
  display: block;
  padding: 0.4rem 0.65rem;
  color: #444;
  font-size: 0.92rem;
  border-radius: 4px;
  white-space: nowrap;
}
.site-nav__links a:hover,
.site-nav__link:hover {
  background: #f4f4f4;
  color: #1a1a1a;
  text-decoration: none;
}
.site-nav__links a.active,
.site-nav__link.active {
  color: #1d4ed8;
  font-weight: 600;
}

/* User section (right side of nav) */
.site-nav__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.site-nav__username {
  font-size: 0.88rem;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Admin dropdown */
.site-nav__dropdown {
  position: relative;
}
.site-nav__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  color: #444;
  font-size: 0.92rem;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.site-nav__dropdown-toggle:hover { background: #f4f4f4; color: #1a1a1a; }
.site-nav__dropdown-toggle::after {
  content: "▾";
  font-size: 0.75rem;
  opacity: 0.6;
}
.site-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  min-width: 170px;
  padding: 0.3rem 0;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.site-nav__dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  font-size: 0.9rem;
}
.site-nav__dropdown-menu a:hover { background: #f4f4f4; text-decoration: none; }
.site-nav__dropdown-menu hr {
  margin: 0.3rem 0;
  border: none;
  border-top: 1px solid #e2e2e2;
}
.site-nav__dropdown.open .site-nav__dropdown-menu { display: block; }

/* Sign-out button styled as a link */
.btn-signout {
  background: none;
  border: none;
  padding: 0.4rem 0.65rem;
  color: #444;
  font-size: 0.92rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-signout:hover { background: #f4f4f4; color: #1a1a1a; }

/* ── Mobile nav ──────────────────────────────────────────── */
@media (max-width: 639px) {
  .site-nav__toggle { display: block; }

  .site-nav__body {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e2e2e2;
    padding: 0.5rem 0 1rem;
  }
  .site-nav__body.open { display: flex; }

  .site-nav__links,
  .site-nav__user {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0 0.75rem;
  }

  .site-nav__links a,
  .site-nav__link,
  .site-nav__dropdown-toggle,
  .btn-signout {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .site-nav__username {
    padding: 0.75rem 0.5rem 0.25rem;
    font-size: 0.85rem;
    max-width: 100%;
  }

  .site-nav__dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    display: block;
  }
  .site-nav__dropdown-menu a {
    border-bottom: 1px solid #f0f0f0;
    padding: 0.65rem 0.5rem;
  }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #e2e2e2;
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: #888;
}

/* ── Page headings ───────────────────────────────────────── */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  color: #111;
  letter-spacing: -0.02em;
}
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bbb;
  margin: 0 0 0.75rem;
}

/* ── Status badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2em 0.6em;
  font-size: 0.75rem;
  line-height: 1.25;
  min-height: 1.5em;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  /* Prevent emoji font swap-in from resizing the badge box */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size-adjust: 0.5;
}
.badge--open       { background: #dcfce7; color: #166534; }
.badge--locked     { background: #fee2e2; color: #991b1b; }
.badge--result     { background: #dbeafe; color: #1e40af; }
.badge--neutral    { background: #f3f4f6; color: #6b7280; }
.badge--rank1      { background: #fef9c3; color: #854d0e; }
.badge--achievement{ background: #fff7ed; color: #c2410c; }
.badge--status     { background: #ede9fe; color: #6d28d9; }

/* ── Achievement item (dashboard panel) ──────────────────── */
.achievement-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fffbf0;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}
.achievement-item__icon  { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.achievement-item__title { font-weight: 700; font-size: 0.92rem; color: #1a1a1a; }
.achievement-item__desc  { font-size: 0.8rem; color: #777; margin-top: 0.05rem; }

/* ── Deadline banner ─────────────────────────────────────── */
.deadline-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: none;
}
.deadline-banner--open   { background: #ecfdf5; color: #065f46; }
.deadline-banner--locked { background: #fef2f2; color: #991b1b; }
.deadline-banner__icon   { font-size: 1rem; flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: #f8f9fb;
  border: none;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  min-height: unset;
}
.card__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  margin: 0 0 0.4rem;
}
.card__value {
  font-size: 2.4rem;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.card__sub {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.3rem;
}

/* ── Stat grid (dashboard) ───────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .card { padding: 1rem; }
  .card__value { font-size: 1.9rem; }
}

/* ── Admin user cards ────────────────────────────────────── */
.user-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.user-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-card__email {
  font-weight: 700;
  font-size: 0.97rem;
  word-break: break-all;
  flex: 1;
}

.user-card__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
}

@media (max-width: 540px) {
  .user-card__fields { grid-template-columns: 1fr; }
}

.user-card__field--bonus {
  grid-column: 1 / -1;
}

.user-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.user-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid #e8eaed;
  padding-top: 0.75rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
thead th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  border-bottom: 1px solid #ebebeb;
  white-space: nowrap;
}
tbody td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid #f4f4f4;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }
.tr--current td { background: #dbeafe; font-weight: 700; border-top: 2px solid #3b82f6; border-bottom: 2px solid #3b82f6; }
.tr--current td:first-child { border-left: 4px solid #3b82f6; }
.tr--current:hover td { background: #bfdbfe; }

/* Mobile card layout for tables */
.table-mobile-cards { display: none; }

@media (max-width: 639px) {
  .table-desktop { display: none; }
  .table-mobile-cards { display: flex; flex-direction: column; gap: 0.5rem; }

  .player-card {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .player-card--current { background: #dbeafe; border-left: 4px solid #3b82f6; font-weight: 700; }
  .player-card__rank {
    font-size: 1.1rem;
    font-weight: 800;
    color: #aaa;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
    /* Align visually with the name baseline */
    padding-top: 0.1rem;
  }
  .player-card__rank--top { color: #111; }
  .player-card__info { flex: 1; min-width: 0; }
  .player-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a1a;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    /* Let long emails wrap mid-word instead of overflowing */
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .player-card__meta {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.15rem;
    line-height: 1.35;
  }
  .player-card__points {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    /* Fixed-width column prevents horizontal shift as digits change */
    min-width: 2.75rem;
    text-align: right;
  }
  .player-card__points-label { font-size: 0.65rem; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; }
}

.table-action-items {
    display: flex;
    gap: 10px;
}

/* Rank medals */
.rank-medal { font-size: 1.1rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #333;
}
.form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
select.form-control {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem;
  cursor: pointer;
}
.form-control:focus {
  outline: none;
  border-color: #005eb8;
  box-shadow: 0 0 0 3px rgba(0,94,184,.15);
}
.form-control[readonly] {
  background: #f7f7f7;
  color: #666;
  cursor: default;
}
.form-control--sm {
  padding: 0.45rem 0.65rem;
  font-size: 0.92rem;
}
.form-hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}
.field-validation-error {
  display: block;
  font-size: 0.82rem;
  color: #c0392b;
  margin-top: 0.25rem;
}
.validation-summary-errors {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.validation-summary-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* Score inputs side by side */
.score-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.5rem;
}
.score-inputs label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.score-inputs__sep {
  font-size: 1.4rem;
  color: #aaa;
  padding-bottom: 0.4rem;
  text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.08s;
  -webkit-appearance: none;
  letter-spacing: 0.01em;
}
.btn:focus-visible {
  outline: 2px solid #005eb8;
  outline-offset: 2px;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(29,78,216,.25);
}
.btn--primary:hover { background: #1e40af; border-color: #1e40af; color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(29,78,216,.35); }

.btn--secondary {
  background: transparent;
  color: #555;
  border-color: #ddd;
}
.btn--secondary:hover { background: #f4f4f4; border-color: #bbb; color: #1a1a1a; text-decoration: none; }

.btn--danger {
  background: #fff;
  color: #c0392b;
  border-color: #e8b4b0;
}
.btn--danger:hover { background: #fdf0ef; text-decoration: none; }

.btn--sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  border-radius: 6px;
  font-weight: 600;
}
.btn--full { width: 100%; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.alert--success { background: #ecfdf5; color: #065f46; }
.alert--danger  { background: #fef2f2; color: #991b1b; }
.alert--info    { background: #eff6ff; color: #1e40af; }
.alert--warning { background: #fffbeb; color: #92400e; }

/* ── Action row (buttons above/below tables) ─────────────── */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

/* ── Utility ─────────────────────────────────────────────── */
.text-muted  { color: #888 !important; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex          { display: flex; }
.align-center    { align-items: center; }
.gap-sm          { gap: 0.5rem; }
.gap-md          { gap: 1rem; }
.fw-bold         { font-weight: 700; }
.fw-semibold     { font-weight: 600; }
/* Responsive visibility helpers */
@media (max-width: 639px)  { .d-sm-none  { display: none !important; } }
@media (min-width: 640px)  { .d-sm-block { display: block !important; } }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 1rem;
}
.back-link:hover { color: #1a1a1a; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #e2e2e2;
  margin: 1.25rem 0;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e2e2;
  margin-bottom: 1.5rem;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn:hover { color: #1a1a1a; }
.tab-btn.active {
  color: #005eb8;
  border-bottom-color: #005eb8;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Match bet rows ──────────────────────────────────────── */
.match-list { display: flex; flex-direction: column; gap: 0; }

.match-row {
  border: none;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: #f8f9fb;
  overflow: hidden;
}
.match-row--has-bet { border-left: 3px solid #1d4ed8; }
.match-row--no-bet  { border-left: 3px solid #e2e2e2; }
.match-row--locked  { border-left: 3px solid #d1d5db; }

.match-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
  cursor: pointer;
  user-select: none;
}
.match-row__header:hover { background: #fafafa; }

.match-row__teams {
  font-weight: 600;
  font-size: 0.97rem;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.match-row__teams-names {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1rem 0.1rem;
  min-width: 0;
}
.match-row__team-name {
  white-space: nowrap;
}
.match-row__teams span.vs {
  font-weight: 400;
  color: #888;
  margin: 0 0.35rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .match-row__teams-names {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
  .match-row__teams span.vs {
    margin: 0;
    font-size: 0.75rem;
  }
}
.match-row__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.match-row__date {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
}
.match-row__chevron {
  font-size: 0.75rem;
  color: #aaa;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.match-row.open .match-row__chevron { transform: rotate(180deg); }

.match-row__body {
  display: none;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid #ebebeb;
  background: #fff;
}
.match-row.open .match-row__body { display: block; }

/* Bet summary line shown in header when collapsed */
.bet-summary {
  font-size: 0.82rem;
  color: #555;
  white-space: nowrap;
}
.bet-summary__winner {
  font-weight: 600;
  color: #005eb8;
}

/* Winner selector — three large tap-friendly buttons */
.winner-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.winner-option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.4rem;
  background: #fff;
  border: 1.5px solid #e2e2e2;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  -webkit-appearance: none;
}
.winner-option:hover { background: #f0f4ff; border-color: #a5b4fc; }
.winner-option.selected {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.winner-option--draw {
  font-size: 0.78rem;
  color: #555;
  align-self: center;
  padding: 0.65rem 0.25rem;
}
.winner-option--draw.selected { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
/* Hidden radio backing each option */
.winner-radio { position: absolute; opacity: 0; width: 0; height: 0; }

/* Post-deadline all-bets table */
.match-card {
  background: #f8f9fb;
  border: none;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.match-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #ebebeb;
}

/* Teams row: flag+name — score — flag+name, all on one line */
.match-card__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.match-card__team {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a1a;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-card__team:last-child {
  text-align: right;
}
.match-card__vs {
  font-size: 0.78rem;
  font-weight: 400;
  color: #ccc;
  flex-shrink: 0;
}

/* Score badge */
.match-card__score {
  font-size: 1.05rem;
  font-weight: 800;
  background: #1d4ed8;
  color: #fff;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Date line below the teams row */
.match-card__date {
  font-size: 0.75rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* My bet row inside match card */
.match-card__my-bet {
  padding: 0.65rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  background: #fff;
}
.match-card__my-bet-label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaa;
  white-space: nowrap;
}

/* ── Results expand/collapse button ─────────────────────── */
.results-expand-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.6rem 1.1rem;
  background: #f8f9fb;
  border: none;
  border-top: 1px solid #ebebeb;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1d4ed8;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.01em;
}
.results-expand-btn:hover { background: #eef2ff; }
.results-expand-chevron { font-size: 0.68rem; transition: transform 0.15s; }

/* ── Leaderboard achievement badges (mobile) ─────────────── */
/* Must live in site.css (loaded in <head>) to apply on first paint and
   avoid FOUC jumps when previously defined in a page-level <style> block. */
.player-card__achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  line-height: 1.5rem;
}
.player-card__achievements:not(:empty) {
  margin-top: 0.35rem;
  /* Reserve enough vertical space for up to 2 rows of badges so that when
     the color-emoji font finishes loading and badges wrap, the card height
     does not grow and push siblings downward. */
  min-height: calc(2 * 1.5rem + 0.3rem);
  align-content: flex-start;
}
.player-card__achievements .badge--achievement {
  height: 1.5rem;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  /* Smooth fade-in once fonts have resolved */
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
/* Hide achievement badges until webfonts (incl. color-emoji) resolve, so the
   reflow caused by emoji-font swap-in is never visible as a "jump".
   We keep the element laid out (visibility hidden) so reserved space is
   correct, then fade opacity once fonts are ready. */
html:not(.fonts-ready) .player-card__achievements .badge--achievement {
  visibility: hidden;
  opacity: 0;
}
html.fonts-ready .player-card__achievements .badge--achievement {
  visibility: visible;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .player-card__achievements .badge--achievement {
    transition: none;
  }
}
.table-mobile-cards .player-card > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding-top: 0.1rem;
}

