/* Squad page: flat, full-width pitch (no 3D tilt) + 4-per-row substitutes.
   Load AFTER squad-cards.css. */

/* ---------- Flat stage: switch off the perspective tilt ---------- */
.fut-stage { perspective: none !important; transform: none !important; padding: 0 !important; }
.fut-stand { display: none !important; }

.fut-adboard {
  position: static !important;
  transform: none !important;
  width: 100%; max-width: 560px;
  margin: 0 auto 8px !important;
  padding: 6px 12px;
  background: #000; color: #fff;
  border: 1px solid #555; border-bottom: 2px solid var(--red, #e3000f);
  border-radius: 3px;
  text-align: center;
  font-weight: 700; font-size: 13px; letter-spacing: 4px;
}

.fut-persp {
  perspective: none !important;
  transform: none !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 560px;
}

/* ---------- The pitch: portrait 4:5, full width ---------- */
.fut-field {
  position: relative;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 5 !important;
  margin: 0 auto !important;
  transform: none !important;
  transform-style: flat !important;
}
.fut-turf {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 3px;
  background: #2f8a22;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .5);
}
.fut-turf .pitch-svg { display: block; width: 100%; height: 100%; }

/* Players: scale the cards so eleven fit on the flat pitch */
.fut-slot { z-index: 2; }
@media (max-width: 480px) { .fut-slot > * { zoom: .62; } }
@media (min-width: 481px) and (max-width: 760px) { .fut-slot > * { zoom: .8; } }

/* ---------- Substitutes: 4 cards per row ---------- */
.fut-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  justify-items: stretch;
}
.fut-grid > * { min-width: 0; width: 100% !important; max-width: 100%; }
@media (min-width: 761px) { .fut-grid { gap: 14px !important; } }

/* ---------- Year picker (replaces the formation buttons) ---------- */
.year-label { margin: 14px 0 6px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #bdbdbd; }
.year-strip {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 14px; padding: 2px 16px 6px;
  -webkit-overflow-scrolling: touch;
}
.year-strip::-webkit-scrollbar { display: none; }
.year-chip {
  position: relative; flex: none;
  padding: 7px 16px;
  background: linear-gradient(#222, #0d0d0d); color: #ddd;
  border: 1px solid #555; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-weight: 500; font-size: 14px; letter-spacing: .5px;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.year-chip:hover { text-decoration: none; border-color: #ff3341; color: #fff; }
.year-chip.on { background: linear-gradient(#f5202f, #b0000b); border-color: #ff3341; color: #fff; font-weight: 700; }
.year-chip.empty:not(.on) { opacity: .55; }
.year-chip.has:not(.on)::after {             /* small red dot: this year has a squad */
  content: ""; position: absolute; top: 4px; right: 5px;
  width: 6px; height: 6px; background: #ff3341;
}

.squad-empty { text-align: center; padding: 28px 16px; }
.squad-empty b { display: block; font-size: 20px; margin-bottom: 6px; }

/* ---------- Competition tabs (AFCON / World Cup / CHAN / CECAFA) ---------- */
.comp-tabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid #3a3a3a; overflow-x: auto; scrollbar-width: none; }
.comp-tabs::-webkit-scrollbar { display: none; }
.comp-tab {
  flex: none; padding: 9px 20px;
  background: linear-gradient(#222, #0d0d0d); color: #cfcfcf;
  border: 1px solid #3a3a3a; border-bottom: 0; border-radius: 3px 3px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-weight: 500; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none;
}
.comp-tab:hover { text-decoration: none; color: #fff; border-color: #ff3341; }
.comp-tab.on { background: linear-gradient(#f5202f, #b0000b); border-color: #ff3341; color: #fff; font-weight: 700; }
.year-chip.minor:not(.on) { opacity: .55; border-style: dashed; }
.year-chip.toggle { margin-left: 8px; background: transparent; border-style: dashed; color: #bdbdbd; font-size: 13px; }

/* ---------- "Coming up" on the pitch (editions not played yet) ---------- */
.pitch-soon {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.pitch-soon-box {
  width: 100%; padding: 18px 12px;
  background: rgba(0, 0, 0, .68);
  border-top: 2px solid #ff3341; border-bottom: 2px solid #ff3341;
}
.pitch-soon-box b {
  display: block; color: #fff;
  font-size: clamp(30px, 9vw, 52px); font-weight: 700; letter-spacing: 6px; line-height: 1.05; text-transform: uppercase;
  animation: soon-pulse 2.4s ease-in-out infinite;
}
.pitch-soon-box span { display: block; margin-top: 8px; color: #ff3341; font-size: 14px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }
/* a squad is already picked: just a ribbon across the top */
.pitch-soon.is-ribbon { align-items: flex-start; }
.pitch-soon.is-ribbon .pitch-soon-box { width: auto; margin-top: 10px; padding: 4px 18px; border: 1px solid #ff3341; border-radius: 3px; }
.pitch-soon.is-ribbon .pitch-soon-box b { font-size: 14px; letter-spacing: 3px; animation: none; }
@keyframes soon-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .pitch-soon-box b { animation: none; } }

.year-chip.soon:not(.on) { border-color: #ff3341; color: #ff3341; }