/* Small overrides on top of Bootstrap — everything else (colors, spacing,
   forms, buttons, cards, badges, progress bars, dark/light theme) comes from
   lib/bootstrap.min.css via data-bs-theme. */

/* Bootstrap's default .modal-dialog max-width is 500px — double it for the
   add/edit satellite modals so the TLE fields have room to breathe. */
.modal-dialog-wide {
  max-width: 1000px;
}

.pass-card.active {
  border-color: var(--bs-success);
  box-shadow: 0 0 0 1px var(--bs-success) inset;
}

.pass-card.done {
  opacity: 0.5;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--bs-primary);
}

.countdown.active { color: var(--bs-success); }
.countdown.done { color: var(--bs-secondary-color); }

.pass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem 1rem;
  font-size: 0.88rem;
}

.pass-grid .label {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

#sat-tabs .nav-link {
  cursor: pointer;
}

/* ---------- Pass detail: sky-track polar plot ---------- */

.pass-detail-table {
  font-size: 0.85rem;
}

.pass-detail-table th {
  font-weight: 600;
  color: var(--bs-secondary-color);
  width: 40%;
  white-space: nowrap;
}

.skyplot {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
  touch-action: none;
}

.skyplot-ring {
  fill: none;
  stroke: var(--bs-border-color);
  stroke-width: 1;
}

.skyplot-spoke {
  stroke: var(--bs-border-color);
  stroke-width: 1;
}

.skyplot-compass {
  fill: var(--bs-secondary-color);
  font-size: 11px;
  font-weight: 600;
}

.skyplot-track {
  fill: none;
  stroke: var(--bs-primary);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.skyplot-hit {
  fill: transparent;
  cursor: pointer;
}

.skyplot-marker {
  stroke: var(--bs-body-bg);
  stroke-width: 2;
  pointer-events: none;
}

.skyplot-marker-aos { fill: var(--bs-success); }
.skyplot-marker-los { fill: var(--bs-secondary-color); }
.skyplot-marker-max { fill: var(--bs-warning); }

.skyplot-marker-label {
  fill: var(--bs-body-color);
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.skyplot-cursor {
  fill: var(--bs-primary);
  opacity: 0.5;
  pointer-events: none;
}

.skyplot-caption {
  min-height: 1.2em;
  text-align: center;
}

.skyplot-now {
  fill: var(--bs-danger);
  stroke: var(--bs-body-bg);
  stroke-width: 2;
  pointer-events: none;
}

.skyplot-now-pulse {
  fill: var(--bs-danger);
  opacity: 0.35;
  pointer-events: none;
  animation: skyplot-pulse 1.6s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes skyplot-pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ---------- Pass detail: azimuth/elevation-over-time charts ---------- */

.linecharts {
  display: grid;
  gap: 0.75rem;
}

.linechart-title {
  margin-bottom: 0.15rem;
}

.linechart {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
}

.linechart-grid {
  stroke: var(--bs-border-color);
  stroke-width: 1;
}

.linechart-ytick {
  fill: var(--bs-secondary-color);
  font-size: 9px;
}

.linechart-xtick {
  fill: var(--bs-secondary-color);
  font-size: 9px;
}

.linechart-line {
  fill: none;
  stroke: var(--bs-primary);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.linechart-overlay {
  fill: transparent;
  cursor: crosshair;
}

.linechart-crosshair {
  stroke: var(--bs-secondary-color);
  stroke-width: 1;
  pointer-events: none;
}

.linechart-cursor {
  fill: var(--bs-primary);
  stroke: var(--bs-body-bg);
  stroke-width: 2;
  pointer-events: none;
}

.linechart-now-line {
  stroke: var(--bs-danger);
  stroke-width: 1.5;
  pointer-events: none;
}

.linechart-caption {
  min-height: 1.2em;
  text-align: center;
}

/* ---------- Passes-in-window overview chart ---------- */

.overview-chart {
  cursor: default;
}

.overview-stem-line {
  stroke: var(--bs-primary);
  stroke-width: 2;
}

.overview-hit {
  fill: transparent;
  cursor: pointer;
}

.overview-marker {
  fill: var(--bs-primary);
  stroke: var(--bs-body-bg);
  stroke-width: 1.5;
  pointer-events: none;
}

.overview-stem-hover .overview-stem-line {
  stroke-width: 3;
}

.overview-stem-hover .overview-marker {
  r: 6;
}

.overview-midnight-line {
  stroke: var(--bs-secondary-color);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.6;
}

.overview-midnight-label {
  fill: var(--bs-secondary-color);
  font-size: 9px;
}

.overview-caption {
  min-height: 1.2em;
  text-align: center;
}

.pass-card-flash {
  animation: pass-card-flash-anim 1.5s ease-out;
}

@keyframes pass-card-flash-anim {
  0% { box-shadow: 0 0 0 3px var(--bs-primary); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- Ground-track map (current position) ---------- */

.groundtrack-map {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
}

.groundtrack-ocean {
  fill: var(--bs-tertiary-bg);
}

.groundtrack-land {
  fill: var(--bs-secondary-bg);
  stroke: var(--bs-border-color);
  stroke-width: 0.5;
}

.groundtrack-night {
  fill: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.groundtrack-equator {
  stroke: var(--bs-border-color);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.groundtrack-sun-dot {
  fill: #ffc107;
  stroke: var(--bs-body-bg);
  stroke-width: 1.5;
}

.groundtrack-line {
  fill: none;
  stroke: var(--bs-primary);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.groundtrack-visibility {
  fill: var(--bs-success);
  fill-opacity: 0.12;
  stroke: var(--bs-success);
  stroke-width: 1;
  stroke-opacity: 0.6;
}

.groundtrack-station-dot {
  fill: var(--bs-danger);
  stroke: var(--bs-body-bg);
  stroke-width: 1.5;
}

.groundtrack-sat-dot {
  fill: var(--bs-success);
  stroke: var(--bs-body-bg);
  stroke-width: 1.5;
}

.groundtrack-sat-label {
  fill: var(--bs-body-color);
  font-size: 9px;
  font-weight: 700;
}

.groundtrack-caption {
  text-align: center;
}
