/**
 * fanorate/match-predictor — predict upcoming fixtures.
 *
 * A left-aligned head (matches match-preview-grid) + a list of fixture cards,
 * each with two score inputs and a per-card save state. All selectors scoped to
 * the section root.
 */

.section-match-predictor {
  padding-block: clamp(40px, 6vw, 72px);
  background: var(--surface-card, #f7f7f8);
}

.section-match-predictor .mp__wrap { margin-inline: auto; }

/* hidden must beat class display (mp__you / mp__guestname use flex) */
.section-match-predictor [hidden] { display: none !important; }

/* ---------- Head ---------- */
.section-match-predictor .mp__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(18px, 3vw, 28px);
}
.section-match-predictor .mp__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary, #e5253d);
}
.section-match-predictor .mp__dot {
  width: 5px; height: 5px; border-radius: 999px; background: currentColor; display: inline-block; flex-shrink: 0;
}
.section-match-predictor .mp__title { color: var(--color-accent, #0a2240); margin: 8px 0 0; }
.section-match-predictor .mp__deck {
  margin: 10px 0 0; max-width: 560px;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.6;
  color: var(--text-secondary, #4a4a52);
}

/* Your points chip */
.section-match-predictor .mp__you {
  justify-self: start; /* never stretch to the grid column / container width */
  text-align: center;
  padding: 10px 18px;
  border-radius: var(--radius-md, 12px);
  background: var(--color-accent, #0a2240);
  color: #fff;
}
.section-match-predictor .mp__you-pts { display: block; font: 800 24px/1 var(--font-ui); }
.section-match-predictor .mp__you label {
  font: 600 9.5px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72);
}

.section-match-predictor .mp__guestname {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.section-match-predictor .mp__guestname-label {
  font: 700 11px/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #4a4a52);
}
.section-match-predictor .mp__name-input {
  padding: 9px 14px;
  /* min-width: 200px; */
  border: 1px solid var(--border-default, #cfcfd6);
  border-radius: 100px;
  background: var(--surface-page, #fff);
  font: var(--body-sm);
  font-family: var(--font-ui);
  color: var(--text-primary, #16161a);
}
.section-match-predictor .mp__name-input:focus {
  outline: none;
  border-color: var(--color-primary, #e5253d);
  box-shadow: 0 0 0 3px rgba(229, 37, 61, 0.15);
}
.section-match-predictor.is-dark .mp__guestname-label { color: rgba(255, 255, 255, 0.7); }

.section-match-predictor .mp__signin {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(42, 168, 224, 0.1);
  border: 1px solid rgba(42, 168, 224, 0.3);
  font: var(--body-sm);
  font-family: var(--font-ui);
  color: var(--text-secondary, #4a4a52);
}

/* ---------- Cards ---------- */
.section-match-predictor .mp__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.section-match-predictor .mp__card {
  position: relative;
  background: var(--surface-page, #fff);
  border: 1px solid var(--border-subtle, #e3e3e8);
  border-radius: var(--radius-md, 12px);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.section-match-predictor .mp__card.is-locked { opacity: 0.72; }
.section-match-predictor .mp__card.is-graded { border-color: var(--color-primary, #e5253d); }

.section-match-predictor .mp__group {
  display: inline-block;
  font: 700 9.5px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary, #4a4a52);
  margin-bottom: 12px;
}

.section-match-predictor .mp__match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.section-match-predictor .mp__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.section-match-predictor .mp__flag { font-size: 30px; line-height: 1; }
.section-match-predictor .mp__name {
  font: 700 12px/1.2 var(--font-ui);
  color: var(--color-accent, #0a2240);
}

.section-match-predictor .mp__score {
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-match-predictor .mp__in {
  width: 44px;
  height: 48px;
  text-align: center;
  font: 800 20px/1 var(--font-ui);
  color: var(--color-accent, #0a2240);
  border: 1.5px solid var(--border-default, #cfcfd6);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-page, #fff);
  -moz-appearance: textfield;
}
.section-match-predictor .mp__in::-webkit-outer-spin-button,
.section-match-predictor .mp__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.section-match-predictor .mp__in:focus {
  outline: none;
  border-color: var(--color-primary, #e5253d);
  box-shadow: 0 0 0 3px rgba(229, 37, 61, 0.15);
}
.section-match-predictor .mp__in:disabled { background: var(--surface-card, #f1f1f4); cursor: not-allowed; }
.section-match-predictor .mp__dash { font: 700 16px/1 var(--font-ui); color: var(--text-secondary, #4a4a52); }

.section-match-predictor .mp__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.section-match-predictor .mp__when {
  font: 600 11px/1.3 var(--font-ui);
  color: var(--text-secondary, #4a4a52);
  flex: 1 1 auto;
  min-width: 120px;
}
.section-match-predictor .mp__save {
  flex: 0 0 auto;
  border: 0;
  background: var(--color-accent, #0a2240);
  color: #fff;
  font: 700 11px/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--dur-base, 0.2s) var(--ease-out, ease);
}
.section-match-predictor .mp__save:hover { background: var(--color-primary, #e5253d); }
.section-match-predictor .mp__save:disabled { opacity: 0.5; cursor: not-allowed; }

.section-match-predictor .mp__state {
  font: 700 11px/1 var(--font-ui);
  flex: 0 0 auto;
}
.section-match-predictor .mp__state.is-ok { color: #1a8f4a; }
.section-match-predictor .mp__state.is-graded { color: var(--color-primary, #e5253d); }
.section-match-predictor .mp__state.is-err { color: var(--color-primary, #e5253d); }
.section-match-predictor .mp__state.is-locked { color: var(--text-secondary, #4a4a52); }

/* ---------- Recent results strip ---------- */
.section-match-predictor .mp__recent { margin-top: 28px; }
.section-match-predictor .mp__subhead {
  margin: 0 0 12px;
  font: 700 12px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary, #4a4a52);
}
.section-match-predictor .mp__card--result { background: var(--surface-card, #f7f7f8); }
.section-match-predictor .mp__result {
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-match-predictor .mp__result b {
  font: 800 22px/1 var(--font-ui);
  color: var(--color-accent, #0a2240);
  font-variant-numeric: tabular-nums;
}
.section-match-predictor .mp__youpick {
  margin-left: auto;
  font: 600 11px/1.3 var(--font-ui);
  color: var(--text-secondary, #4a4a52);
}
.section-match-predictor .mp__youpick b { color: var(--color-accent, #0a2240); }
.section-match-predictor .mp__card--result.is-hit { border-color: rgba(26, 143, 74, 0.45); }
.section-match-predictor .mp__card--result.is-hit .mp__youpick b { color: #1a8f4a; }

.section-match-predictor.is-dark .mp__subhead { color: rgba(255, 255, 255, 0.7); }

/* Dark background → light head text */
.section-match-predictor.is-dark .mp__title { color: #fff; }
.section-match-predictor.is-dark .mp__deck { color: rgba(255, 255, 255, 0.74); }

/* ---------- Single-fixture mode (auto-injected on match previews) ---------- */
.section-match-predictor.is-single { padding-block: clamp(28px, 4vw, 44px); }
.section-match-predictor.is-single .mp__head { grid-template-columns: 1fr; }
.section-match-predictor.is-single .mp__list { grid-template-columns: 1fr; }

/* Single fixture: the one card sits beside the "your points" chip */
.section-match-predictor.is-single .mp__solo {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}
.section-match-predictor.is-single .mp__solo .mp__list,
.section-match-predictor.is-single .mp__solo .mp__recent {
  flex: 1 1 340px;
  margin-top: 0;
}
.section-match-predictor.is-single .mp__solo .mp__you {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 110px;
}

/* ---------- Reveal-on-scroll ---------- */
.section-match-predictor [data-reveal] {
  transition: opacity 0.6s var(--ease-out, ease), transform 0.6s var(--ease-out, ease);
}
.section-match-predictor.is-reveal-armed [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(18px);
}

@media (max-width: 760px) {
  .section-match-predictor .mp__head { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .section-match-predictor.is-reveal-armed [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}
