/* ════════════════════════════════════════════════════════════
   NEXT SUB section — primary focus during play. Replaces the
   old .strip-combined left/right halves and the separate Swap /
   Next-Sub button row. Driven by:
     - js/timer.js updateStickyBar (writes the countdown number)
     - gameday.html updateNextSubUrgency (sets urgency tier classes)
     - js/subs.js renderSubNowStrip (writes the pair rows)
     - js/subs.js showLastSub (populates the collapsible dropdown)
   ════════════════════════════════════════════════════════════ */
.next-sub-section {
  background: rgba(255,92,26,0.05);
  border-top: 1px solid rgba(255,92,26,0.12);
  border-bottom: 1px solid rgba(255,92,26,0.12);
  padding: 8px 14px;
  margin: 4px 0;
  transition: background 0.3s, border-color 0.3s;
}
.next-sub-section.urgent {
  background: rgba(239,68,68,0.07);
  border-top-color: rgba(239,68,68,0.2);
  border-bottom-color: rgba(239,68,68,0.2);
}

/* Countdown row — label + big number on the left, status pill on
   the right. The number is the largest type on the screen. */
.next-sub-section .ns-countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.next-sub-section .ns-cd-left {
  display: flex; flex-direction: column;
  align-items: flex-start;
}
.next-sub-section .ns-cd-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2px;
  transition: color 0.3s;
}
.next-sub-section .ns-cd-label.soon   { color: var(--amber); }
.next-sub-section .ns-cd-label.urgent { color: var(--red); }
.next-sub-section .ns-cd-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--orange);
  transition: color 0.3s;
}
.next-sub-section .ns-cd-num.soon   { color: var(--amber); }
.next-sub-section .ns-cd-num.urgent {
  color: var(--red);
  animation: ns-pulse 0.7s infinite;
}
@keyframes ns-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.next-sub-section .ns-cd-status {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--orange);
}
.next-sub-section .ns-cd-status.soon   { color: var(--amber); }
.next-sub-section .ns-cd-status.urgent { color: var(--red); }

/* Sub pair rows. Red badge ▼ for off, green badge ▲ for on, with
   an arrow between. Coach can remove a pair via the round ✕ on
   the right (or restore via ↩ if previously excluded). */
.ns-pairs {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.ns-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
}
.ns-pair.excluded { opacity: 0.45; }
.ns-pair-off,
.ns-pair-on {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
/* Both off and on sides left-align — coach reads the swap as a
   left-to-right sentence: "Drew off → Jordan on". */
.ns-pair-on { justify-content: flex-start; }
.ns-pair-arrow {
  font-size: 14px;
  font-weight: 900;
  color: var(--muted);
  flex-shrink: 0;
}
.ns-pair-badge {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}
.ns-badge-off {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--red);
}
.ns-badge-on {
  background: rgba(61,191,108,0.12);
  border: 1px solid rgba(61,191,108,0.25);
  color: var(--green);
}
.ns-pair-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ns-name-off { color: var(--red); }
.ns-name-on  { color: var(--green); }
.ns-pair-sub {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.ns-pair-x {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--muted);
  color: #000;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.ns-pair-x.restore {
  background: var(--green);
  color: #000;
}

/* Button row — Sub Now is twice as wide and visually dominant. */
.next-sub-section .ns-buttons {
  display: flex;
  gap: 6px;
}
.next-sub-section .ns-btn {
  border: none;
  border-radius: 9px;
  padding: 11px 0;
  cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.3s, background 0.15s;
}
.next-sub-section .ns-btn-now {
  flex: 2;
  background: var(--orange);
  color: var(--white);
  font-size: 15px;
  box-shadow: 0 2px 12px rgba(255,92,26,0.25);
}
.next-sub-section.urgent .ns-btn-now {
  box-shadow: 0 0 20px rgba(255,92,26,0.5);
}
.next-sub-section .ns-btn-now:active { background: var(--orange-light); }
.next-sub-section .ns-btn-swap {
  flex: 1;
  background: rgba(255,92,26,0.1);
  border: 1px solid rgba(255,92,26,0.25);
  color: var(--orange);
  font-size: 11px;
}
.next-sub-section .ns-btn-swap:active { background: rgba(255,92,26,0.18); }

/* Collapsible Last Sub dropdown. Header row is a button so the
   whole strip is tappable. Body shows the past pairs at 70%
   opacity to read as history.
   Selectors are unscoped because #nsLastSub was lifted out of
   .next-sub-section in the layout reorder — it now sits as a
   sibling pinned to the bottom of the sticky bar. The previous
   .next-sub-section .ns-lastsub* selectors silently broke and
   the lastsub rendered as unstyled white text. */
.ns-lastsub { margin: 0 12px; }
.ns-lastsub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.ns-lastsub-header:active { background: rgba(255,255,255,0.05); }
.ns-lastsub-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ns-lastsub-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.ns-lastsub-text {
  font-size: 10px;
  color: var(--sub);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ns-lastsub-chev {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.ns-lastsub-body {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 6px 8px;
  display: flex; flex-direction: column;
  gap: 3px;
  margin-top: -1px;
}
/* Past pairs — smaller and muted to read as history. Unscoped
   for the same reason as .ns-lastsub above; .ns-pair-past lives
   inside #nsLastSubBody which is no longer nested in .next-sub-
   section after the layout reorder. */
.ns-pair-past {
  padding: 4px 8px;
  border-radius: 7px;
}
.ns-pair-past .ns-pair-badge {
  width: 18px; height: 18px;
}
.ns-pair-past .ns-pair-name {
  font-size: 13px;
}
.ns-pair-past .ns-name-off { color: rgba(239,68,68,0.7); }
.ns-pair-past .ns-name-on  { color: rgba(61,191,108,0.7); }
.ns-pair-past .ns-pair-x { display: none; }
