/* H2H hero header — form pill tooltips & kickoff countdown */

.page-wrapper {
  position: relative;
}

/* ── Form strip ── */
.match-hero-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
  min-height: 2.65rem;
}

.match-hero-form-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.match-hero-form-pills {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.match-hero-form-direction {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #9AA6B3;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}

.match-hero-form .h2h-form-pill {
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.match-hero-form .h2h-form-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

/* ── Floating tooltip (prediction-page match card design) ── */
.h2h-form-tooltip-root {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 10050;
}

.h2h-floating-tooltip {
  position: fixed;
  width: 280px;
  max-width: calc(100vw - 16px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
  will-change: opacity, transform;
}

.h2h-floating-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.h2h-floating-tooltip .tooltip-content {
  visibility: visible;
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  background-color: #2a2a2a;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid #444;
  color: #eee;
  pointer-events: auto;
}

.h2h-floating-tooltip-arrow {
  position: absolute;
  top: -8px;
  width: 0;
  height: 0;
  margin-left: -8px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #2a2a2a transparent;
  filter: drop-shadow(0 -1px 0 #444);
  pointer-events: none;
}

.h2h-floating-tooltip .tooltip-header {
  background: #1a1a1a;
  padding: 10px 15px;
  border-bottom: 1px solid #333;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.h2h-floating-tooltip .tooltip-league {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.h2h-floating-tooltip .tooltip-date {
  font-size: 11px;
  color: #888;
  background: #333;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #444;
  flex-shrink: 0;
}

.h2h-floating-tooltip .tooltip-round {
  padding: 8px 15px 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

.h2h-floating-tooltip .tooltip-match {
  padding: 15px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h2h-floating-tooltip .tooltip-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-align: center;
}

.h2h-floating-tooltip .tooltip-team img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 6px;
}

.h2h-floating-tooltip .tooltip-team span {
  font-size: 10px;
  line-height: 1.2;
  color: #fff;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h2h-floating-tooltip .tooltip-score {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: #1a1a1a;
  padding: 4px 12px;
  border-radius: 8px;
  min-width: 60px;
  text-align: center;
  letter-spacing: 1px;
  border: 1px solid #333;
}

.h2h-floating-tooltip .tooltip-result {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  border-top: 1px solid #333;
  border-radius: 0 0 8px 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Kickoff countdown ── */
.match-hero-kickoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 84px;
  min-height: 6.25rem;
  flex-shrink: 0;
}

.match-hero-kickoff-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: #9AA6B3;
  line-height: 1;
  display: none;
}

.match-hero-countdown {
  position: relative;
  width: 84px;
  height: 84px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.match-hero-kickoff.is-countdown-active .match-hero-countdown,
.match-hero-kickoff.is-live .match-hero-countdown,
.match-hero-kickoff.is-finished .match-hero-countdown,
.match-hero-kickoff.is-terminal .match-hero-countdown {
  display: flex;
}

.match-hero-kickoff.is-countdown-active:not(.is-live):not(.is-finished):not(.is-terminal) .match-hero-kickoff-label,
.match-hero-kickoff.is-finished .match-hero-kickoff-label,
.match-hero-kickoff.is-terminal .match-hero-kickoff-label {
  display: block;
}

.match-hero-countdown-svg {
  position: absolute;
  inset: 0;
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
}

.match-hero-countdown-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
}

.match-hero-countdown-arc {
  fill: none;
  stroke-linecap: round;
}

.match-hero-countdown-arc--hours {
  stroke: #2d6a4f;
  transition: stroke-dashoffset 0.9s linear, stroke 0.25s ease;
}

.match-hero-countdown-arc--minutes {
  stroke: #52b788;
  transition: stroke-dashoffset 0.6s linear;
}

.match-hero-countdown-arc--seconds {
  stroke: #95d5b2;
  transition: stroke-dashoffset 0.35s linear;
}

.match-hero-countdown-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  pointer-events: none;
  max-width: 52px;
}

.match-hero-countdown-main {
  font-size: 13px;
  font-weight: 700;
  color: #E3EAF0;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.match-hero-countdown-secs {
  font-size: 10px;
  font-weight: 500;
  color: #9AA6B3;
  margin-top: 2px;
}

.match-hero-kickoff-time {
  display: none;
  text-align: center;
}

.match-hero-kickoff.is-far-away .match-hero-kickoff-time {
  display: block;
}

.match-hero-kickoff.is-far-away .match-hero-countdown,
.match-hero-kickoff.is-far-away .match-hero-kickoff-label {
  display: none;
}

.match-hero-kickoff.is-live .match-hero-countdown-arc--hours {
  stroke: #6ee7a0;
}

.match-hero-kickoff.is-live .match-hero-countdown-main {
  color: #6ee7a0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.match-hero-kickoff.is-live .match-hero-countdown-secs {
  display: none;
}

.match-hero-kickoff.is-finished .match-hero-countdown-arc--hours,
.match-hero-kickoff.is-terminal .match-hero-countdown-arc--hours {
  stroke: #94a3b8;
}

.match-hero-kickoff.is-finished .match-hero-countdown-main,
.match-hero-kickoff.is-terminal .match-hero-countdown-main {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.match-hero-kickoff.is-finished .match-hero-countdown-secs {
  display: block;
  color: #e2e8f0;
  font-weight: 600;
}

.match-hero-kickoff.is-terminal .match-hero-countdown-secs {
  display: none;
}

@media (max-width: 768px) {
  .match-hero-form-direction {
    font-size: 7px;
  }

  .match-hero-kickoff {
    width: 76px;
    min-height: 5.75rem;
  }

  .match-hero-countdown,
  .match-hero-countdown-svg {
    width: 76px;
    height: 76px;
  }

  .match-hero-countdown-main {
    font-size: 12px;
  }

  .match-hero-kickoff-label {
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .h2h-floating-tooltip {
    width: min(280px, calc(100vw - 16px));
  }

  .match-hero-kickoff {
    width: 68px;
    min-height: 5.25rem;
  }

  .match-hero-countdown,
  .match-hero-countdown-svg {
    width: 68px;
    height: 68px;
  }

  .match-hero-countdown-main {
    font-size: 11px;
  }

  .match-hero-countdown-secs {
    font-size: 9px;
  }
}

/* Light mode: countdown text was dark-theme #E3EAF0 on mint hero — unreadable. */
[data-theme="light"] .match-hero-kickoff-label {
  color: #64748b;
}

[data-theme="light"] .match-hero-countdown-track {
  stroke: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .match-hero-countdown-main {
  color: #1f2937;
}

[data-theme="light"] .match-hero-countdown-secs {
  color: #64748b;
}

[data-theme="light"] .match-hero-kickoff.is-live .match-hero-countdown-main {
  color: #166534;
}

[data-theme="light"] .match-hero-kickoff.is-finished .match-hero-countdown-main,
[data-theme="light"] .match-hero-kickoff.is-terminal .match-hero-countdown-main {
  color: #334155;
}

[data-theme="light"] .match-hero-kickoff.is-finished .match-hero-countdown-secs {
  color: #475569;
}
