/* Passes page. Shared colours and components are in site.css; dark values in dark.css */

/* ---- station bar ---- */
.station-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 2px 2px 12px; }
.station-name { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-name strong { font-weight: 600; }
.station-sub { color: var(--pl-dim); margin-left: 6px; font-size: 0.95rem; }
.station-state { display: flex; align-items: center; gap: 7px; color: var(--pl-dim); font-size: 0.85rem; white-space: nowrap; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fb36d; display: inline-block; }
.station-state.rec { color: var(--rec); }
.station-state.rec .state-dot { background: var(--rec); animation: rec-pulse 1.2s ease-in-out infinite; }

/* ---- next pass / recording card ---- */
.next-card { border: 1px solid var(--pl-line); border-left: 4px solid var(--m23); border-radius: 0;
  background: var(--pl-card); padding: 12px 16px; margin-top: 14px; }
.next-card.sat-m24 { border-left-color: var(--m24); }
.next-card.rec { border-left-color: var(--rec); }
.next-top { display: flex; justify-content: space-between; color: var(--pl-dim); font-size: 0.85rem; }
.next-card.rec .next-label { color: var(--rec); font-weight: 600; }
.next-count { font-size: 1.6rem; font-weight: 600; line-height: 1.25; margin: 2px 0 4px;
  font-variant-numeric: tabular-nums; }
.next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.next-dim { color: var(--pl-dim); }
.next-bar { height: 6px; border-radius: 3px; background: var(--pl-track); margin-top: 10px; overflow: hidden; display: none; }
.next-card.rec .next-bar { display: block; }
.next-bar-fill { height: 100%; width: 0; background: var(--rec); transition: width 0.9s linear; }


/* ---- pass list ---- */
.pass-list { margin-top: 14px; }
.times-note { color: var(--pl-dim); font-size: 0.8rem; padding: 2px 4px 0; text-align: right; }
.no-passes { text-align: center; color: var(--pl-dim); font-style: italic; padding: 24px 0; }
.earlier-toggle { margin-left: auto; border: 0; background: none; color: var(--pl-dim); font-size: 0.85rem;
  padding: 0 2px; cursor: pointer; }
.earlier-toggle:hover { color: inherit; }
.pass-day.folded .pass-row.past:not(.live) { display: none; }
/* collapsible days: today open, the others closed (passes.js) */
.pass-day .day-head { cursor: pointer; user-select: none; align-items: center; }
.pass-day .day-head:hover .day-name { text-decoration: underline; text-underline-offset: 3px; }
.day-chev { width: 12px; font-size: 0.75rem; color: var(--pl-dim); transition: transform 0.15s ease; }
.pass-day.collapsed .day-chev { transform: rotate(-90deg); }
.pass-day.collapsed .pass-row { display: none; }
.pass-day.collapsed .earlier-toggle { display: none; }
.day-sum { color: var(--pl-dim); font-size: 0.82rem; display: none; }
.pass-day.collapsed .day-sum { display: inline; }
.day-sum .sat-dot { margin: 0 2px 0 6px; }

.pass-row { display: grid; align-items: center; gap: 10px; padding: 8px 6px;
  grid-template-columns: 24px 78px minmax(0, 1fr) 190px 22px 104px;
  border-bottom: 1px solid var(--pl-line); cursor: pointer; white-space: nowrap; }
.pass-row:hover { background: var(--pl-hover); }
.pass-row:focus { outline: none; }
.pass-row:focus-visible { box-shadow: inset 0 0 0 2px #4a90e2; }
.pass-row.selected { background: var(--pl-hover); box-shadow: inset 3px 0 0 var(--m23); }
.pass-row.sat-m24.selected { box-shadow: inset 3px 0 0 var(--m24); }
.pass-row.live { background: rgba(229, 72, 77, 0.07); }
.pass-row.past, .pass-row.skipped { color: var(--pl-faint); }
.pass-row.past .elev-bar span, .pass-row.skipped .elev-bar span { opacity: 0.45; }
.pass-row.skipped .t-main { text-decoration: line-through; }

.c-status { text-align: center; }
.st-done { color: #2fb36d; }
.st-done:hover { color: #23955a; }
.st-conflict { color: #e0892b; }
.st-skip { color: var(--pl-faint); }
.st-live.missed { color: #d9534f; opacity: 0.7; }
.st-live.rec { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rec);
  animation: rec-pulse 1.2s ease-in-out infinite; }

.c-sat { font-weight: 600; }
.pass-row.past .sat-dot, .pass-row.skipped .sat-dot { opacity: 0.5; }

.c-time { display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.t-main { font-weight: 600; }
.t-end { font-weight: 400; color: var(--pl-dim); }
.t-dur { font-size: 0.78rem; color: var(--pl-faint); }


.c-dn { text-align: center; color: var(--pl-dim); }
.c-dn .fa-sun { color: #e0a412; }
.pass-row.past .c-dn .fa-sun { color: inherit; }
.c-dir { color: var(--pl-dim); }
.dir-from { font-size: 0.85rem; margin-left: 6px; }

.pass-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--pl-dim); font-size: 0.8rem;
  padding: 12px 4px 4px; }
.pass-legend .elev-bar.mini { width: 26px; flex: none; margin-right: 6px; vertical-align: 1px; }
.legend-tip { margin-left: auto; }

@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- phones ---- */
@media (max-width: 575.98px) {
  .station-name { font-size: 1rem; }
  .next-count { font-size: 1.35rem; }
  .pass-row { grid-template-columns: 18px 50px minmax(0, 1fr) 84px 16px 14px; gap: 7px; padding: 8px 2px;
    font-size: 0.9rem; }
  .sat-prefix, .dir-from { display: none; }
  .sat-dot { margin-right: 5px; width: 8px; height: 8px; }
  .elev-val { width: 26px; }
  .legend-tip { margin-left: 0; }
}
@media (min-width: 576px) { .sat-prefix { display: none; } }
@media (min-width: 992px) {
  .sat-prefix { display: inline; }
  .pass-row { grid-template-columns: 24px 140px minmax(0, 1fr) 220px 22px 104px; }
}

/* ---- live decode panel (assets/js/live.js): dark in both themes, like the map and the graphs ---- */
.live-card { margin: 0 0 16px; border-radius: 12px; background: #0f1828; color: #dbe5ef; padding: 12px 14px 14px;
  border: 1px solid #1f2d42; }
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7785; }
.live-card.is-live .live-dot { background: var(--rec); animation: live-pulse 1.2s ease-in-out infinite; }
.live-title { font-weight: 700; }
.live-state { color: #9fb3c8; font-size: .88rem; }
.live-left { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: #9fb3c8; font-size: .88rem; }
.live-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.live-box { background: #0b1220; border: 1px solid #1f2d42; border-radius: 10px; padding: 8px 10px 10px; min-width: 0; }
.live-cap { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: #9fb3c8; margin-bottom: 6px; }
.live-dim { font-weight: 400; text-transform: none; letter-spacing: 0; color: #6f8399; }
.live-box canvas { display: block; width: 100%; border-radius: 6px; }
#live-fft { height: 130px; }
#live-wf { height: 130px; margin-top: 4px; }
#live-iq { aspect-ratio: 1; height: auto; max-width: 260px; margin: 0 auto; }
#live-hist { height: 56px; }
.live-note { font-size: .74rem; color: #6f8399; margin-top: 6px; text-align: center; }
.live-big { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.live-bar { height: 6px; border-radius: 3px; background: #1f2d42; margin: 6px 0 10px; overflow: hidden; }
.live-bar span { display: block; height: 100%; width: 0; background: #d9464b; transition: width .4s; }
.live-bar span.fair { background: #f2b33d; }
.live-bar span.good { background: #5fd38a; }
.live-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 0 0 10px; font-size: .86rem; }
.live-dl dt { color: #9fb3c8; font-weight: 400; }
.live-dl dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.live-dl dd.good { color: #5fd38a; }
.live-lamp { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3a4a5e; margin-inline-end: 6px; }
.live-lamp.on { background: #5fd38a; box-shadow: 0 0 6px #5fd38a; }
.live-pic { grid-column: 1 / -1; text-align: center; }
.live-pic img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; border-radius: 6px; background: #000; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (max-width: 991.98px) {
  .live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .live-spec { grid-column: 1 / -1; }
  .live-pic { order: 1; }                 /* narrow screens: the picture right after the spectrum */
  .live-const, .live-stats { order: 2; }
}
@media (max-width: 575.98px) {
  .live-grid { grid-template-columns: minmax(0, 1fr); }
}

.next-card.sat-iss { border-left-color: var(--iss); }
.pass-row.sat-iss.selected { box-shadow: inset 3px 0 0 var(--iss); }
