/* Control panels, inputs, station list, footer and toast */

.control-panel {
  display: grid;
  gap: 12px;
}

.panel-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-heading h2 { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.card-heading p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.tiny-label {
  padding: 5px 7px;
  border: 1px solid rgba(70, 214, 206, .2);
  border-radius: 7px;
  background: rgba(70, 214, 206, .07);
  color: #95e4de;
  font-size: 9px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.scenario-grid { display: grid; gap: 8px; }

.scenario-button {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 61px;
  padding: 10px 12px;
  border: 1px solid rgba(160, 190, 220, .11);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.scenario-button:hover { border-color: rgba(70, 214, 206, .34); background: rgba(70, 214, 206, .06); }
.scenario-button:active { transform: scale(.985); }
.scenario-button.active { border-color: rgba(255, 107, 89, .5); background: linear-gradient(100deg, rgba(255, 107, 89, .13), rgba(255, 107, 89, .025)); }

.scenario-glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(69, 193, 199, .11);
  color: var(--teal);
  font-size: 17px;
}

.scenario-button.active .scenario-glyph { background: rgba(255, 107, 89, .14); color: var(--accent); }
.scenario-name { color: #eaf1f3; font-size: 12px; font-weight: 700; }
.scenario-place { margin-top: 3px; color: var(--muted); font-size: 10px; }
.scenario-magnitude { color: #eec9c2; font-size: 13px; font-variant-numeric: tabular-nums; }

.custom-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.custom-tip::before { content: "⌖"; color: var(--green); font-size: 14px; }

.control-stack { display: grid; gap: 17px; }

.range-row { display: grid; gap: 9px; }

.range-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.range-top label { color: #d8e1e6; font-size: 11px; }
.range-value { color: var(--teal); font-size: 12px; font-variant-numeric: tabular-nums; }

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal) 0%, rgba(70, 214, 206, .25) 0%);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(126, 164, 183, .25);
}

input[type="range"]::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--teal); }

input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #0c2635;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(70, 214, 206, .7), 0 2px 10px rgba(0,0,0,.3);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #0c2635;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(70, 214, 206, .7), 0 2px 10px rgba(0,0,0,.3);
}

.range-note { color: var(--muted-2); font-size: 9px; line-height: 1.45; }

.divider { height: 1px; margin: 17px 0; background: var(--line); }

.toggle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(160, 190, 220, .1);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
  color: #c9d5db;
  font-size: 10px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 29px;
  height: 17px;
}

.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #233444;
  transition: background .2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #8ca0ae;
  transition: transform .2s ease, background .2s ease;
}

.switch input:checked + .switch-track { background: rgba(70, 214, 206, .55); }
.switch input:checked + .switch-track::after { transform: translateX(12px); background: #e8fffb; }

.transport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.play-button, .step-button, .reset-button {
  min-height: 46px;
  border-radius: 13px;
  transition: transform .2s ease, filter .2s ease, background .2s ease;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  background: linear-gradient(135deg, #ff765f, #e54852);
  color: #fff8f5;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(229, 72, 82, .2);
}

.play-button:hover { filter: brightness(1.1); }
.play-button:active, .step-button:active, .reset-button:active { transform: scale(.96); }

.step-button, .reset-button {
  width: 46px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.045);
  color: #d9e3e8;
  font-size: 15px;
}

.reset-button { color: var(--muted); }

.playback-speed {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 12px 10px;
  border: 1px solid rgba(160, 190, 220, .1);
  border-radius: 12px;
  background: rgba(255,255,255,.022);
}

.timeline { display: grid; gap: 7px; margin-top: 13px; }
.timeline-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }

.station-list {
  display: grid;
  gap: 7px;
  max-height: 438px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-color: rgba(70, 214, 206, .35) transparent;
}

.station-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid rgba(160, 190, 220, .1);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
}

.station-name { color: #dce5e9; font-size: 11px; font-weight: 650; }
.station-region { margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.station-height { color: #eff5f4; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.station-height small { margin-left: 2px; color: var(--muted); font-size: 9px; }
.station-status { min-width: 42px; padding: 4px 5px; border-radius: 6px; text-align: center; font-size: 8px; white-space: nowrap; }
.station-status.low { background: rgba(70, 214, 206, .1); color: #92ded9; }
.station-status.watch { background: rgba(242, 216, 77, .12); color: #f5da6b; }
.station-status.high { background: rgba(255, 117, 47, .14); color: #ff9a6e; }
.station-status.critical { background: rgba(225, 41, 96, .18); color: #ff7f9d; }
.station-status.extreme { background: rgba(128, 33, 220, .24); color: #d89dff; }
.station-eta { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.info-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 107, 89, .19);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(255, 107, 89, .08), rgba(255, 107, 89, .025));
}

.info-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 107, 89, .15);
  color: #ff9b87;
  font-size: 15px;
}

.info-strip strong { display: block; margin-bottom: 4px; color: #f5d8d2; font-size: 11px; }
.info-strip p { color: var(--muted); font-size: 9px; line-height: 1.6; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 16px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.65;
}

.footer strong { color: var(--muted); font-weight: 650; }
.footer a { color: var(--muted); text-underline-offset: 2px; }
.footer a:hover { color: #d8f3ef; }

.toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(320px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid rgba(70, 214, 206, .3);
  border-radius: 12px;
  background: rgba(8, 25, 35, .92);
  color: #d8f3ef;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
