/* =============================================================================
   NBS WC Predictor — Frontend Styles
   Scoped to .wcp-predictor-form and .wcp-leaderboard
   CSS custom properties mirror the NBS theme palette from _ps_variables.scss
   ============================================================================= */

:root {
  --wcp-primary:       #00A3E2;
  --wcp-primary-hover: #62b6d6;
  --wcp-dark:          #221D45;
  --wcp-dark-hover:    #58517b;
  --wcp-title:         #2A2451;
  --wcp-accent:        #BFCD20;
  --wcp-accent-hover:  #d1d77f;
  --wcp-body:          #243a4d;
  --wcp-white:         #ffffff;
  --wcp-bg:            #f4f7fb;
  --wcp-border:        #dde3ec;
  --wcp-muted:         #9aacbb;
  --wcp-error:         #fd1616;
  --wcp-success:       #2db37a;
  --wcp-font-main:     'Open Sans', sans-serif;
  --wcp-font-heading:  'Intro Regular Alt', sans-serif;
  --wcp-radius:        6px;
  --wcp-transition:    all 200ms ease-in;
  --wcp-shadow:        0 2px 12px rgba(34,29,69,0.10);
}

/* ---- Predictor page banner (theme cat_banner override) ---- */
.cat_banner--predictor .container {
  padding-top: 56px;
  padding-bottom: 0;
}

.cat_banner--predictor .cat_banner__left {
  padding: 20px 0 36px !important;
  margin-bottom: 0 !important;
}

.cat_banner--predictor .cat_banner__left h1 {
  margin-bottom: 10px;
}

.cat_banner--predictor .cat_banner__left p {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.cat_banner--predictor .cat_banner__round-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px !important;
}

@media (max-width: 850px) {
  .cat_banner--predictor .container {
    padding-top: 40px;
  }

  .cat_banner--predictor .cat_banner__left {
    padding: 16px 0 28px !important;
  }
}

@media (max-width: 600px) {
  .cat_banner--predictor .cat_banner__left p,
  .cat_banner--predictor .cat_banner__round-name {
    font-size: 15px;
  }
}

/* ---- Base resets scoped to plugin containers ---- */
.wcp-predictor-form *,
.wcp-leaderboard * {
  box-sizing: border-box;
}

.wcp-predictor-form,
.wcp-leaderboard {
  font-family: var(--wcp-font-main);
  color: var(--wcp-body);
  line-height: 1.6;
  font-size: 16px;
}

/* ---- Page intro (instructions above form) ---- */
.wcp-page-intro {
  background: var(--wcp-white);
  border-radius: 10px;
  box-shadow: var(--wcp-shadow);
  padding: 24px 28px;
  margin-bottom: 24px;
  border-left: 4px solid var(--wcp-primary);
}

.wcp-page-intro__lead {
  font-size: 17px;
  color: var(--wcp-body);
  margin: 0 0 16px;
  line-height: 1.6;
}

.wcp-page-intro__terms {
  font-size: 15px;
  margin: 0;
  color: var(--wcp-body);
}

.wcp-page-intro__terms a {
  color: var(--wcp-primary);
  font-weight: 600;
  text-decoration: underline;
}

.wcp-page-intro__terms a:hover {
  color: var(--wcp-primary-hover);
}

/* ---- List bullets on predictor pages (disc pseudo, no keylines) ---- */
.full_width .full_width__inner.wcp-page-content ul,
.full_width__inner.wcp-page-content ul,
.wcp-page-content ul,
.wcp-predictor-form ul {
  list-style: none;
  margin: 20px 0;
  padding-left: 0;
}

.full_width .full_width__inner.wcp-page-content ul li,
.full_width__inner.wcp-page-content ul li,
.wcp-page-content ul li,
.wcp-predictor-form ul li {
  position: relative;
  width: 100%;
  list-style: none;
  display: block;
  padding: 5px 0 5px 22px;
  border-bottom: none !important;
}

.full_width .full_width__inner.wcp-page-content ul li:first-child,
.full_width__inner.wcp-page-content ul li:first-child,
.wcp-page-content ul li:first-child,
.wcp-predictor-form ul li:first-child {
  border-top: none !important;
}

.full_width .full_width__inner.wcp-page-content ul li::before,
.full_width__inner.wcp-page-content ul li::before,
.wcp-page-content ul li::before,
.wcp-predictor-form ul li::before {
  content: '' !important;
  display: block !important;
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wcp-primary);
}

.full_width .full_width__inner.wcp-page-content ol,
.full_width__inner.wcp-page-content ol,
.wcp-page-content ol,
.wcp-predictor-form ol {
  list-style: none;
  margin: 20px 0;
  padding-left: 0;
  counter-reset: wcp-list;
}

.full_width .full_width__inner.wcp-page-content ol li,
.full_width__inner.wcp-page-content ol li,
.wcp-page-content ol li,
.wcp-predictor-form ol li {
  position: relative;
  width: 100%;
  list-style: none;
  display: block;
  padding: 5px 0 5px 28px;
  border-bottom: none !important;
  counter-increment: wcp-list;
}

.full_width .full_width__inner.wcp-page-content ol li:first-child,
.full_width__inner.wcp-page-content ol li:first-child,
.wcp-page-content ol li:first-child,
.wcp-predictor-form ol li:first-child {
  border-top: none !important;
}

.full_width .full_width__inner.wcp-page-content ol li::before,
.full_width__inner.wcp-page-content ol li::before,
.wcp-page-content ol li::before,
.wcp-predictor-form ol li::before {
  content: counter(wcp-list) '.' !important;
  display: block !important;
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  font-weight: 700;
  color: var(--wcp-primary);
  text-align: right;
}

.full_width .full_width__inner.wcp-page-content ol li::after,
.full_width__inner.wcp-page-content ol li::after,
.wcp-page-content ol li::after,
.wcp-predictor-form ol li::after {
  content: none !important;
  display: none !important;
}

/* ---- Notices ---- */
.wcp-notice {
  padding: 18px 22px;
  border-radius: var(--wcp-radius);
  font-size: 16px;
  margin: 0;
}

.wcp-notice--info {
  background: var(--wcp-bg);
  border-left: 4px solid var(--wcp-primary);
  color: var(--wcp-body);
}

.wcp-notice--closed {
  background: #fff8f0;
  border-left: 4px solid #f0a030;
  color: #6b4500;
}

/* ---- Alerts (inline form messages) ---- */
.wcp-alert {
  padding: 14px 18px;
  border-radius: var(--wcp-radius);
  margin: 20px 24px 0;
  font-size: 14px;
  font-weight: 600;
}

.wcp-alert--error {
  background: #fff2f2;
  border-left: 4px solid var(--wcp-error);
  color: #8b0000;
}

.wcp-alert--success {
  background: #f0fdf6;
  border-left: 4px solid var(--wcp-success);
  color: #0a4a28;
}

/* ---- Form wrapper — width handled by .container--regular in the theme ---- */
.wcp-predictor-form {
  margin: 0;
}

.wcp-form-inner {
  background: var(--wcp-white);
  border-radius: 10px;
  box-shadow: var(--wcp-shadow);
  overflow: hidden;
}

.wcp-round-block {
  margin-bottom: 32px;
}

.wcp-round-block:last-of-type {
  margin-bottom: 0;
}

.wcp-round-block__header {
  padding: 24px 28px 0;
}

.wcp-round-block__title {
  font-family: var(--wcp-font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--wcp-title);
  margin: 0 0 12px;
}

.wcp-round-block__schedule {
  list-style: disc;
  margin: 0 0 4px;
  padding-left: 1.35em;
  font-size: 16px;
  color: var(--wcp-body);
}

.wcp-round-block__schedule li {
  margin-bottom: 6px;
  padding-left: 0.15em;
  border-bottom: none;
  display: list-item;
}

.wcp-round-block__schedule li::before {
  content: none !important;
  display: none !important;
}

.wcp-round-block__label {
  display: inline-block;
  min-width: 148px;
  font-weight: 700;
  color: var(--wcp-title);
}

.wcp-round-info {
  padding: 16px 24px 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--wcp-body);
}

.wcp-round-info ul {
  margin: 12px 0 16px;
  padding-left: 1.35em;
}

.wcp-round-info ul li::before {
  content: none !important;
  display: none !important;
}

.wcp-round-info p:last-child {
  margin-bottom: 0;
}

/* ---- Fixtures list ---- */
.wcp-fixtures-list {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Individual fixture card ---- */
.wcp-fixture {
  background: var(--wcp-bg);
  border-radius: var(--wcp-radius);
  padding: 16px 20px;
  border: 1px solid var(--wcp-border);
  transition: var(--wcp-transition);
}

.wcp-fixture--tiebreak {
  border-color: var(--wcp-accent);
  background: #fffdf0;
}

/* ---- Fixture meta (group, venue, kickoff) ---- */
.wcp-fixture__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wcp-badge-group {
  display: inline-block;
  background: var(--wcp-dark);
  color: var(--wcp-white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 3px;
}

.wcp-fixture__venue,
.wcp-fixture__kickoff {
  font-size: 14px;
  color: var(--wcp-muted);
}

/* ---- Team row: Super 6 style [flag+name] [scores] [flag+name] ---- */
.wcp-fixture__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
}

.wcp-fixture__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.wcp-fixture__team--home,
.wcp-fixture__team--away {
  justify-content: center;
}

.wcp-team-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--wcp-title);
  line-height: 1.35;
  word-break: break-word;
  hyphens: auto;
}

/* ---- Hexagon flag ---- */
.wcp-flag-hex {
  width: 52px;
  height: 58px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--wcp-border);
}

.wcp-flag-hex img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Score inputs ---- */
.wcp-fixture__scores {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--wcp-white);
  border: 2px solid var(--wcp-border);
  border-radius: var(--wcp-radius);
  padding: 4px 8px;
}

.wcp-score-input {
  width: 44px;
  height: 40px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--wcp-font-main);
  color: var(--wcp-title);
  border: none;
  background: transparent;
  outline: none;
  -moz-appearance: textfield;
  padding: 0;
}

.wcp-score-input::-webkit-outer-spin-button,
.wcp-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wcp-fixture__scores:focus-within {
  border-color: var(--wcp-primary);
  box-shadow: 0 0 0 3px rgba(0,163,226,0.15);
}

.wcp-score-divider {
  font-size: 18px;
  color: var(--wcp-muted);
  font-weight: 400;
  user-select: none;
  padding: 0 2px;
}

/* Tiebreak input keeps its own border since it sits outside .wcp-fixture__scores */
.wcp-tiebreak__input {
  width: 64px;
  height: 40px;
  border: 2px solid var(--wcp-border);
  border-radius: var(--wcp-radius);
  background: var(--wcp-white);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
}

.wcp-tiebreak__input:focus {
  border-color: var(--wcp-primary);
  box-shadow: 0 0 0 3px rgba(0,163,226,0.15);
  outline: none;
}

/* ---- Tiebreak field ---- */
.wcp-tiebreak {
  margin-top: 14px;
  padding: 12px 16px;
  background: #fffbee;
  border-radius: var(--wcp-radius);
  border: 1px solid #e8d97a;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wcp-tiebreak__label {
  font-size: 15px;
  color: var(--wcp-body);
  flex: 1;
  min-width: 160px;
}

.wcp-tiebreak__icon {
  color: var(--wcp-accent);
  font-size: 16px;
  margin-right: 6px;
}

/* ---- Entrant details section ---- */
.wcp-entrant-details {
  padding: 24px 28px;
  border-top: 1px solid var(--wcp-border);
}

.wcp-section-title {
  font-family: var(--wcp-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--wcp-title);
  margin: 0 0 18px;
}

.wcp-field {
  margin-bottom: 16px;
}

.wcp-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wcp-body);
  margin-bottom: 6px;
}

.wcp-required {
  color: var(--wcp-error);
  margin-left: 2px;
}

.wcp-input {
  width: 100%;
  max-width: 400px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 300;
  font-family: var(--wcp-font-main);
  color: var(--wcp-body);
  border: 1px solid var(--wcp-border);
  border-radius: var(--wcp-radius);
  background: var(--wcp-white);
  outline: none;
  transition: var(--wcp-transition);
  letter-spacing: 0.02em;
}

.wcp-input:focus {
  border-color: var(--wcp-primary);
  box-shadow: 0 0 0 3px rgba(0,163,226,0.15);
}

/* ---- Checkbox ---- */
.wcp-field--checkbox {
  margin-top: 8px;
}

.wcp-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--wcp-body);
}

.wcp-checkbox {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--wcp-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.wcp-checkbox-label a {
  color: var(--wcp-primary);
  text-decoration: underline;
}

.wcp-checkbox-label a:hover {
  color: var(--wcp-primary-hover);
}

.wcp-field-hint {
  font-size: 12px;
  color: var(--wcp-muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

.wcp-privacy-link {
  font-size: 13px;
  margin: 4px 0 0;
  padding-left: 26px;
}

.wcp-privacy-link a {
  color: var(--wcp-primary);
  text-decoration: underline;
}

.wcp-privacy-link a:hover {
  color: var(--wcp-primary-hover);
}

/* ---- Submit area ---- */
.wcp-form-submit {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--wcp-border);
}

/* ---- Returning entrant details bar ---- */
.wcp-entrant-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  margin-top: 24px;
  padding: 0 0 8px;
}

.wcp-entrant-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--wcp-dark);
  color: var(--wcp-white);
  border-radius: 10px;
  box-shadow: 0 -4px 20px rgba(34, 29, 69, 0.18);
  padding: 14px 20px;
}

.wcp-entrant-bar__details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.wcp-entrant-bar__label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}

.wcp-entrant-bar__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--wcp-white);
}

.wcp-entrant-bar__email {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.wcp-entrant-bar__email::before {
  content: '·';
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.45);
}

.wcp-entrant-bar__change {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--wcp-white);
  border-radius: var(--wcp-radius);
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--wcp-font-main);
  font-weight: 600;
  cursor: pointer;
  transition: var(--wcp-transition);
}

.wcp-entrant-bar__change:hover,
.wcp-entrant-bar__change:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.75);
  outline: none;
}

@media (max-width: 600px) {
  .wcp-entrant-bar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wcp-entrant-bar__change {
    width: 100%;
    text-align: center;
  }
}

/* ---- Buttons — matches .cat_banner .btn (lime NBS style) ---- */
.wcp-btn {
  display: inline-block;
  padding: 16px 28px 14px;
  font-size: 16px;
  line-height: 16px;
  font-family: var(--wcp-font-heading);
  font-weight: 400;
  letter-spacing: 0em;
  border-radius: var(--wcp-radius);
  border: solid 1px transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--wcp-transition);
  position: relative;
}

.wcp-btn--primary {
  background: var(--wcp-accent);
  border-color: var(--wcp-accent);
  color: var(--wcp-title);
}

.wcp-btn--primary:hover,
.wcp-btn--primary:focus-visible {
  background: var(--wcp-accent-hover);
  border-color: var(--wcp-accent-hover);
  color: var(--wcp-title);
}

.wcp-btn:disabled,
.wcp-btn[aria-busy="true"] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---- Scroll lock when modal is open ---- */
body.wcp-modal-open {
  overflow: hidden;
}

/* ---- Modal overlay ---- */
.wcp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 29, 69, 0.72);
  z-index: 9999;
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.wcp-modal {
  background: var(--wcp-white);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(34,29,69,0.25);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wcp-modal__header {
  background: var(--wcp-dark);
  padding: 20px 24px 16px;
  flex-shrink: 0;
}

.wcp-modal__header .wcp-modal__title,
.wcp-modal__header h2.wcp-modal__title {
  font-family: var(--wcp-font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.wcp-modal__subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.wcp-modal__body {
  padding: 20px 24px 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.wcp-modal .wcp-field {
  margin-bottom: 12px;
}

.wcp-modal .wcp-field--checkbox {
  margin-top: 4px;
  margin-bottom: 8px;
}

.wcp-modal .wcp-field label {
  margin-bottom: 4px;
  font-size: 12px;
}

.wcp-modal .wcp-input {
  max-width: none;
  padding: 9px 12px;
  font-size: 14px;
}

.wcp-modal .wcp-field-hint {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.35;
}

.wcp-modal .wcp-checkbox-label {
  font-size: 12px;
  line-height: 1.4;
}

.wcp-modal__footer {
  padding: 14px 24px 18px;
  flex-shrink: 0;
  border-top: 1px solid var(--wcp-border);
  background: var(--wcp-white);
}

.wcp-modal__footer .wcp-btn {
  width: 100%;
  text-align: center;
  padding: 13px 20px 12px;
  font-size: 15px;
}

.wcp-modal__error {
  background: #fff2f2;
  border-left: 4px solid var(--wcp-error);
  color: #8b0000;
  border-radius: var(--wcp-radius);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

/* Shorter viewports (typical laptop screens) — keep modal fully on screen */
@media (max-height: 820px) {
  .wcp-modal-overlay {
    padding: 12px;
  }

  .wcp-modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .wcp-modal__header {
    padding: 16px 20px 12px;
  }

  .wcp-modal__header .wcp-modal__title,
  .wcp-modal__header h2.wcp-modal__title {
    font-size: 18px;
  }

  .wcp-modal__body {
    padding: 16px 20px 0;
  }

  .wcp-modal .wcp-field {
    margin-bottom: 10px;
  }

  .wcp-modal__footer {
    padding: 12px 20px 14px;
  }
}

/* ---- Confirmation panel ---- */
.wcp-confirmation {
  padding: 28px;
}

.wcp-confirmation__content {
  text-align: center;
}

.wcp-confirmation__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--wcp-accent);
  color: var(--wcp-dark);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 16px;
}

.wcp-confirmation__title {
  font-family: var(--wcp-font-heading);
  font-size: 22px;
  color: var(--wcp-title);
  margin: 0 0 12px;
}

.wcp-confirmation__text {
  font-size: 15px;
  color: var(--wcp-body);
  margin: 0 0 24px;
}

.wcp-confirmation__predictions {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.wcp-confirmation__predictions h3 {
  font-family: var(--wcp-font-heading);
  font-size: 15px;
  color: var(--wcp-title);
  margin: 0 0 12px;
}

.wcp-confirmation__next-round {
  background: var(--wcp-bg);
  border-radius: var(--wcp-radius);
  padding: 18px 20px;
  margin: 24px auto;
  max-width: 500px;
  border-left: 4px solid var(--wcp-accent);
  text-align: left;
}

.wcp-confirmation__next-round-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wcp-muted);
  margin: 0 0 6px;
}

.wcp-confirmation__next-round-name {
  font-size: 17px;
  color: var(--wcp-title);
  margin: 0 0 4px;
}

.wcp-confirmation__next-round-date {
  font-size: 14px;
  color: var(--wcp-body);
  margin: 0;
}

.wcp-predictions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wcp-predictions-table th {
  background: var(--wcp-dark);
  color: var(--wcp-white);
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}

.wcp-predictions-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--wcp-border);
}

.wcp-predictions-table tr:nth-child(even) td {
  background: var(--wcp-bg);
}

.wcp-pred-score {
  text-align: center;
  font-weight: 700;
  color: var(--wcp-title);
}

.wcp-pred-divider {
  text-align: center;
  color: var(--wcp-muted);
}

.wcp-row--tiebreak td {
  background: #fffbee !important;
}

.wcp-tiebreak-note {
  font-size: 13px;
  color: var(--wcp-body);
  background: #fffbee;
  padding: 8px 12px;
  border-left: 3px solid var(--wcp-accent);
  border-radius: 4px;
  margin: 12px 0 0;
}

/* ---- Status badges (used in admin but also potentially frontend) ---- */
.wcp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wcp-badge--draft      { background: #eee; color: #555; }
.wcp-badge--active     { background: #e8f6ec; color: #1a6630; }
.wcp-badge--closed     { background: #fff0e0; color: #7a4200; }
.wcp-badge--calculated { background: #e6f3fc; color: #0a4f7a; }

/* =============================================================================
   Leaderboard
   ============================================================================= */

.wcp-leaderboard {
  margin: 0 auto;
  max-width: 640px;
}

.wcp-leaderboard__header {
  margin-bottom: 16px;
}

.wcp-leaderboard__title {
  font-family: var(--wcp-font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--wcp-title);
  margin: 0 0 4px;
}

.wcp-leaderboard__subtitle {
  font-size: 13px;
  color: var(--wcp-muted);
  margin: 0;
}

.wcp-leaderboard__card {
  background: var(--wcp-white);
  border-radius: 10px;
  box-shadow: var(--wcp-shadow);
  overflow: hidden;
  margin-bottom: 0;
}

/* Hub / back button — generous clearance so it never sits flush against content above */
.wcp-hub-actions {
  margin-top: 48px;
  padding-top: 16px;
  padding-bottom: 8px;
  text-align: center;
  clear: both;
}

.wcp-leaderboard > .wcp-hub-actions {
  margin-top: 56px;
  padding-top: 20px;
}

.wcp-leaderboard__card + .wcp-hub-actions {
  margin-top: 56px;
}

.wcp-predictor-form > .wcp-hub-actions,
.wcp-round-block + .wcp-hub-actions {
  margin-top: 48px;
  padding-top: 20px;
}

.wcp-predictor-form > .wcp-notice + .wcp-hub-actions {
  margin-top: 32px;
}

.wcp-confirmation__content > .wcp-hub-actions,
.wcp-confirmation__next-round + .wcp-hub-actions {
  margin-top: 40px;
  padding-top: 16px;
}

.wcp-leaderboard__actions,
.wcp-confirmation__actions {
  margin-top: 40px;
  padding-top: 16px;
  text-align: center;
  clear: both;
}

/* ---- Toolbar (toggle, shown to logged-in users only) ---- */
.wcp-leaderboard__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.wcp-leaderboard__view-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--wcp-bg);
  color: var(--wcp-muted);
  border: 1px solid var(--wcp-border);
}

.wcp-leaderboard__view-badge--internal {
  background: var(--wcp-dark);
  color: var(--wcp-accent);
  border-color: var(--wcp-dark);
}

.wcp-leaderboard__toggle {
  font-size: 13px;
  font-weight: 600;
  color: var(--wcp-primary);
  text-decoration: none;
  border: 1px solid var(--wcp-border);
  border-radius: var(--wcp-radius);
  padding: 6px 14px;
  transition: var(--wcp-transition);
  white-space: nowrap;
}

.wcp-leaderboard__toggle:hover {
  background: var(--wcp-dark);
  border-color: var(--wcp-dark);
  color: var(--wcp-white);
}

.wcp-leaderboard__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--wcp-font-main);
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.wcp-leaderboard__table thead tr {
  background: var(--wcp-dark);
}

.wcp-leaderboard__table thead th {
  padding: 14px 16px;
  color: var(--wcp-white);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.03em;
}

.wcp-leaderboard__table tbody tr {
  border-bottom: 1px solid var(--wcp-border);
  transition: background 120ms ease;
}

.wcp-leaderboard__table tbody tr:last-child {
  border-bottom: none;
}

.wcp-leaderboard__table tbody tr:nth-child(even) {
  background: var(--wcp-bg);
}

.wcp-leaderboard__table tbody tr:hover {
  background: #eef6fc;
}

.wcp-leaderboard__table td {
  padding: 12px 16px;
  color: var(--wcp-body);
}

.wcp-leaderboard__row--first {
  background: #fffdf0 !important;
}

.wcp-leaderboard__rank {
  width: 80px;
}

.wcp-leaderboard__points {
  width: 90px;
  text-align: center;
}

.wcp-points-badge {
  display: inline-block;
  min-width: 44px;
  padding: 6px 12px;
  background: var(--wcp-dark);
  color: var(--wcp-white);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--wcp-radius);
  line-height: 1;
}

.wcp-leaderboard__rounds {
  width: 72px;
  text-align: center;
  color: var(--wcp-body);
  font-size: 13px;
}

.wcp-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  background: var(--wcp-bg);
  color: var(--wcp-muted);
  padding: 0 6px;
}

.wcp-rank-badge--gold   { background: #fffbee; color: #b8860b; }
.wcp-rank-badge--silver { background: #f5f5f5; color: #777; }
.wcp-rank-badge--bronze { background: #fff4ec; color: #a0522d; }

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 600px) {
  .wcp-fixture {
    padding: 14px 10px;
  }

  .wcp-fixture__teams {
    gap: 8px 4px;
  }

  .wcp-fixture__team {
    gap: 5px;
    padding: 0 2px;
  }

  .wcp-team-name {
    font-size: 13px;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .wcp-flag-hex {
    width: 40px;
    height: 46px;
  }

  /* Separate score boxes — no shared wrapper, no dash */
  .wcp-fixture__scores {
    background: transparent;
    border: none;
    padding: 0;
    gap: 5px;
    box-shadow: none;
  }

  .wcp-fixture__scores:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .wcp-score-divider {
    display: none;
  }

  .wcp-score-input {
    width: 30px;
    height: 38px;
    font-size: 17px;
    border: 2px solid var(--wcp-border);
    border-radius: var(--wcp-radius);
    background: var(--wcp-white);
  }

  .wcp-score-input:focus {
    border-color: var(--wcp-primary);
    box-shadow: 0 0 0 2px rgba(0,163,226,0.15);
    outline: none;
  }

  .wcp-page-intro {
    padding: 20px 18px;
  }

  .wcp-round-block__label {
    display: block;
    min-width: 0;
    margin-bottom: 2px;
  }

  .wcp-round-header,
  .wcp-fixtures-list,
  .wcp-entrant-details,
  .wcp-form-submit,
  .wcp-confirmation {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wcp-tiebreak {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .wcp-round-title {
    font-size: 18px;
  }

  .wcp-input {
    max-width: 100%;
  }

  .wcp-leaderboard {
    overflow-x: auto;
  }

  .wcp-leaderboard__table {
    min-width: 400px;
  }

  .wcp-btn {
    width: 100%;
    text-align: center;
  }

  .wcp-modal-overlay {
    padding: 12px;
  }

  .wcp-modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .wcp-modal__header {
    padding: 16px 18px 14px;
  }

  .wcp-modal__body {
    padding: 16px 18px 0;
  }

  .wcp-modal__footer {
    padding: 12px 18px 16px;
  }
}
