/* ========================================
   V4 Prop Bets - by_fixture page styles
   Page-specific layout, loading states, and
   player interaction styles.
   ======================================== */

/* ---- Fixture Header (Design 3 — Phosphor Green) ---- */

.fixture-header {
  text-align: center;
  padding: 20px 24px 16px;
  background: linear-gradient(180deg, rgba(var(--glow-rgb), 0.06) 0%, rgba(var(--glow-rgb), 0) 45%, rgba(255,255,255,0.015) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* Glowing accent line at top */
.fixture-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  opacity: 0.5;
  box-shadow: 0 0 16px rgba(var(--glow-rgb), 0.3), 0 0 32px rgba(var(--glow-rgb), 0.1);
}

/* Top row: league + stat label */
.fixture-header__top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fixture-header__league {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fixture-header__league-dot {
  color: rgba(255,255,255,0.12);
}

.fixture-header__stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--glow);
  text-shadow: 0 0 8px rgba(var(--glow-rgb), 0.4);
}

/* Teams row: vertical cards with logo above name */
.fixture-header__teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.fixture-header__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.fixture-header__team-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}

.fixture-header__team-link:hover {
  opacity: 0.75;
}

.fixture-header__team-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.fixture-header__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.fixture-header__logo--placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

/* Center block: VS + kickoff time */
.fixture-header__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.fixture-header__vs {
  font-size: 20px;
  font-weight: 700;
  color: rgba(var(--glow-rgb), 0.18);
  text-shadow: 0 0 20px rgba(var(--glow-rgb), 0.12);
}

.fixture-header__kickoff {
  font-size: 11px;
  font-weight: 600;
  color: var(--glow-dim);
  text-shadow: 0 0 6px rgba(var(--glow-rgb), 0.25);
}

/* Meta row: date + venue */
.fixture-header__meta {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  margin-top: 14px;
}

.fixture-header__meta-dot {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---- Layout Container ---- */

/* Widen the page container for three-panel grid layout */
.v4-wide-layout {
  max-width: 1840px;
}

.v4-opposition-profile-container {
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
}

/* Tablet responsive: single column layout */
@media (max-width: 1399px) {
  .v4-wide-layout {
    max-width: 1400px;
  }

  .v4-opposition-profile-container {
    max-width: 740px;
    width: 100%;
    margin: 0 auto;
  }

  .v4-filter-bar-tablet {
    max-width: 740px;
    width: 100%;
    margin: 0 auto;
  }

  .fixture-header {
    max-width: 740px;
    margin-inline: auto;
  }
}

/* ---- Clickable Pitch Players ---- */

.v4-clickable-mode .pitch-player {
  cursor: pointer;
}

.v4-clickable-mode .pitch-player:hover .pitch-player__marker {
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.v4-clickable-mode .pitch-player--selected .pitch-player__marker {
  border-color: #22d3ee !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7) !important;
}

.v4-clickable-mode .pitch-player__marker {
  width: 32px;
  height: 32px;
  overflow: hidden;
}

.v4-clickable-mode .pitch-player__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.v4-clickable-mode .pitch-player__name {
  max-width: 80px;
  font-size: 10px;
}

.v4-clickable-mode .pitch-player__position {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

/* ---- Loading Overlay ---- */

.v4-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 8px;
}

/* ---- Soccer Ball Loader ---- */

.soccer-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.soccer-ball {
  width: 60px;
  height: 60px;
  position: relative;
  animation: v4-bounce 1s ease-in-out infinite;
}

.soccer-ball svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(var(--glow-rgb), 0.3));
}

.soccer-ball-inner {
  animation: v4-spin 2s linear infinite;
}

.loading-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--glow);
  border-radius: 50%;
  animation: v4-dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes v4-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(0.95); }
}

@keyframes v4-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes v4-dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ---- Skeleton Loading States ---- */

.skeleton-player,
.skeleton-proximity,
.skeleton-verdict,
.skeleton-odds {
  padding: 20px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Mobile Responsive ---- */

/* Tablet: relax fixed widths */
@media (max-width: 1399px) {
  .v4-opposition-profile-container .column-left,
  .v4-opposition-profile-container .column-right {
    width: 100%;
    min-width: 0;
    max-width: 740px;
  }
}

/* Mobile: compact everything */
@media (max-width: 768px) {
  .fixture-header {
    padding: 14px 16px 12px;
  }

  .fixture-header__teams {
    gap: 16px;
  }

  .fixture-header__logo {
    width: 36px;
    height: 36px;
  }

  .fixture-header__logo--placeholder {
    width: 36px;
    height: 36px;
  }

  .fixture-header__team-name {
    font-size: 12px;
  }

  .fixture-header__vs {
    font-size: 16px;
  }

  .fixture-header__kickoff {
    font-size: 10px;
  }

  .fixture-header__top-row {
    gap: 8px;
    margin-bottom: 12px;
  }

  /* Filter bar: tighter spacing */
  .filter-bar {
    padding: 6px 8px;
    gap: 6px;
  }

  .filter-toggle__btn {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 32px;
  }

  .filter-group__label {
    font-size: 10px;
  }

  .filter-select {
    font-size: 11px;
    min-height: 32px;
  }

  /* Analysis tabs: scrollable horizontally */
  .analysis-tabs-container {
    min-height: auto;
  }

  /* Pitch team toggle: larger tap targets */
  .pitch-team-toggle__btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 44px;
  }
}
