/* ── Emergency Radio Usage page ─────────────────────────────────────
   Self-contained styles (no dependency on mobile.css variables).
   Loaded by index.html; logic in emergency.js. */

/* Floating emergency button on the map */
.em-fab {
  position: absolute;
  left: 12px;
  bottom: 56px;            /* clears the attribution bar */
  z-index: 1000;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: #d62828;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: em-pulse 2s infinite;
}
.em-fab svg { width: 30px; height: 30px; fill: #fff; }
@keyframes em-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214,40,40,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(214,40,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,40,40,0); }
}

/* Screen shell */
#scr-emergency { background: #14171c; }
.em-wrap {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Header banner */
.em-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: #b3201f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.em-hdr .em-shield { width: 26px; height: 26px; fill: #fff; flex: 0 0 auto; }
.em-hdr .em-title { font-size: 18px; font-weight: 800; flex: 1; }
.em-hdr .em-close {
  background: rgba(255,255,255,.18);
  border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 8px;
  font-size: 20px; cursor: pointer; line-height: 1;
}

.em-body { padding: 16px; }
.em-lead {
  font-size: 20px; font-weight: 700; color: #fff;
  margin: 4px 0 6px;
}
.em-sub { font-size: 14px; color: #9aa4af; margin-bottom: 18px; line-height: 1.4; }

/* Big choice / action buttons */
.em-choice {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: #21262e; border: 1px solid #333b45; border-radius: 14px;
  color: #fff; padding: 18px 16px; margin-bottom: 14px; cursor: pointer;
}
.em-choice:active { background: #2a313a; }
.em-choice .em-ic {
  width: 46px; height: 46px; border-radius: 50%;
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.em-ic.blue   { background: #1f6feb; }
.em-ic.red    { background: #d62828; }
.em-ic.green  { background: #2ea043; }
.em-ic.orange { background: #e8730c; }
.em-ic.teal   { background: #1aa6a6; }
.em-ic.rose   { background: #c73573; }
.em-choice .em-ct { flex: 1; }
.em-choice .em-cl { font-size: 17px; font-weight: 700; }
.em-choice .em-cd { font-size: 13px; color: #9aa4af; margin-top: 3px; line-height: 1.35; }
.em-choice .em-arr { color: #6b7480; font-size: 22px; }

/* Step progress */
.em-prog { display: flex; gap: 6px; margin-bottom: 14px; }
.em-prog i { flex: 1; height: 5px; border-radius: 3px; background: #2c333c; }
.em-prog i.on { background: #d62828; }

.em-stepno { font-size: 13px; font-weight: 700; color: #ff6b6b; letter-spacing: .04em; }
.em-steph  { font-size: 22px; font-weight: 800; color: #fff; margin: 4px 0 12px; }
.em-stept  { font-size: 16px; color: #d6dde5; line-height: 1.5; }
.em-stept b { color: #fff; }

/* Radio sketch image */
.em-figure { margin: 14px 0; text-align: center; }
.em-figure img {
  width: 100%; max-width: 520px; height: auto;
  border-radius: 12px; border: 1px solid #2c333c; background: #1c2128;
}

/* Highlight card (recommended repeater / channel) */
.em-card {
  background: #1b2733; border: 1px solid #2b3d52; border-radius: 12px;
  padding: 14px; margin: 14px 0;
}
.em-card.alt { background: #241c12; border-color: #5a4022; }
.em-card .em-cardlbl { font-size: 12px; font-weight: 700; color: #6fb0ff; letter-spacing: .05em; text-transform: uppercase; }
.em-card.alt .em-cardlbl { color: #e8a84e; }
.em-card .em-cardname { font-size: 20px; font-weight: 800; color: #fff; margin: 4px 0 8px; }
.em-card .em-row { display: flex; justify-content: space-between; font-size: 15px; padding: 3px 0; }
.em-card .em-row span:first-child { color: #9aa4af; }
.em-card .em-row span:last-child  { color: #fff; font-weight: 700; }
.em-card .em-note { font-size: 13px; color: #9aa4af; margin-top: 8px; line-height: 1.4; }

/* Repeater pick list (operator + switch step) */
.em-rlist { margin: 12px 0; }
.em-ritem {
  display: flex; align-items: center; gap: 12px;
  background: #21262e; border: 1px solid #333b45; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; width: 100%; text-align: left;
  color: #fff; cursor: pointer;
}
.em-ritem.inrange { border-color: #2ea043; }
.em-ritem .em-rdot { width: 10px; height: 10px; border-radius: 50%; background: #6b7480; flex: 0 0 auto; }
.em-ritem.inrange .em-rdot { background: #2ea043; }
.em-ritem .em-rmain { flex: 1; }
.em-ritem .em-rname { font-weight: 700; font-size: 16px; }
.em-ritem .em-rmeta { font-size: 13px; color: #9aa4af; margin-top: 2px; }
.em-ritem .em-rtag {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: #2ea043; color: #fff;
}
.em-ritem .em-rtag.far { background: #3a424c; color: #c7ced6; }

/* Call script */
.em-script {
  background: #102a16; border: 1px solid #1f6b34; border-radius: 12px;
  padding: 16px; margin: 14px 0; font-size: 19px; line-height: 1.55; color: #eafff0;
}
.em-script b { color: #fff; background: rgba(46,160,67,.25); padding: 0 3px; border-radius: 4px; }

/* Countdown timer */
.em-timer-wrap { text-align: center; margin: 18px 0; }
.em-timer {
  font-size: 52px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.em-timer.warn { color: #ff6b6b; }
.em-timer-lbl { font-size: 14px; color: #9aa4af; margin-bottom: 8px; }

/* Buttons */
.em-btn {
  display: block; width: 100%; border: none; border-radius: 12px;
  padding: 16px; font-size: 17px; font-weight: 700; cursor: pointer; margin-top: 12px;
}
.em-btn.primary { background: #d62828; color: #fff; }
.em-btn.go      { background: #2ea043; color: #fff; }
.em-btn.ghost   { background: #21262e; color: #c7ced6; border: 1px solid #333b45; }
.em-btn:active  { filter: brightness(1.12); }

.em-callout {
  display: flex; gap: 10px; align-items: flex-start;
  background: #1c2128; border-left: 3px solid #e8a84e; border-radius: 8px;
  padding: 12px 14px; margin: 14px 0; font-size: 14px; color: #d6dde5; line-height: 1.45;
}
.em-callout .em-coemoji { font-size: 18px; flex: 0 0 auto; }

/* chevron on tappable repeater tiles (operator list) */
.em-ritem .em-arr { color: #6b7480; font-size: 22px; flex: 0 0 auto; margin-left: 2px; }

/* operator radio selector */
.em-radsel { display: flex; gap: 8px; margin-bottom: 14px; }
.em-radbtn { flex: 1; background: #21262e; border: 1px solid #333b45; color: #c7ced6;
  border-radius: 10px; padding: 11px 4px; font-size: 14px; font-weight: 700; cursor: pointer; }
.em-radbtn.on { background: #1f6feb; border-color: #1f6feb; color: #fff; }

/* channel-slot tag on tiles + big "which channel to dial" block in the card */
.em-chtag { color: #5fd0a0; font-weight: 800; }
.em-chtag.vfo { color: #e8a84e; }
.em-chbig { background: #102a16; border: 1px solid #1f6b34; border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.em-chbig.alt { background: #241c12; border-color: #5a4022; }
.em-chbig-lbl { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7fdca6; }
.em-chbig.alt .em-chbig-lbl { color: #e8a84e; }
.em-chbig-no { font-size: 30px; font-weight: 800; color: #fff; margin: 2px 0; }
.em-chbig-no2 { font-size: 22px; font-weight: 800; color: #fff; margin: 2px 0; }
.em-chbig-sub { font-size: 14px; color: #9aa4af; }
