/* Taipei Cloud Roam: on top of Slop New York's HUD stylesheet (style.css, MIT) — Taipei taxi yellow, Traditional Chinese type,
   and the two on-screen displays (DJI-Fly-style drone view, Betaflight-style FPV goggles view). */

:root {
  --font-sans: 'Inter', 'Noto Sans TC', 'PingFang TC', -apple-system, BlinkMacSystemFont, 'Microsoft JhengHei', sans-serif;
  --font-sign: 'Noto Sans TC', 'Inter', 'PingFang TC', sans-serif;
  --taxi: #f7c21b;
  --osd: #f4f6f2;
  --osd-dim: rgba(244, 246, 242, 0.62);
  --osd-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.35);
  --fpv: #f2f5ea;
}

body { font-family: var(--font-sans); }

.tp-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--taxi);
  color: #17140a;
  font: 900 17px/1 'Noto Sans TC', sans-serif;
}
.tp-badge.loader-bullet { width: 46px; height: 46px; font-size: 22px; }
.loader-credit {
  max-width: 440px;
  margin: 14px auto 0;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.location-place { font-family: var(--font-sign); font-weight: 700; }
.location-district {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
/* Taipei street-name sign: white on blue-green, rounded */
.street-sign.tw-sign {
  background: #0e5a7a;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-family: var(--font-sign);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hud-toast {
  min-height: 0;
  margin-bottom: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.78);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.hud-toast.show { opacity: 1; transform: none; }

/* ------------------------------------------------------------------------------------------------------------------
   On-screen displays
   ------------------------------------------------------------------------------------------------------------------ */
.osd {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: var(--osd);
  text-shadow: var(--osd-shadow);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.osd[hidden] { display: none; }
body.osd-on .hud-top-left,
body.osd-on .hud-bottom-left .location { opacity: 0.0; }

/* DJI-Fly-style: chips on top, a 16:9 frame guide, H / D / speeds at the bottom */
.osd-top {
  position: absolute;
  top: 84px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.osd-chip {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 13px;
  font-weight: 700;
}
.osd-chip#osd-d-mode { background: #f7c21b; color: #14130e; text-shadow: none; }
.osd-frame span {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(255, 255, 255, 0.7);
  border-style: solid;
}
.osd-frame span:nth-child(1) { top: 16%; left: 14%; border-width: 2px 0 0 2px; }
.osd-frame span:nth-child(2) { top: 16%; right: 14%; border-width: 2px 2px 0 0; }
.osd-frame span:nth-child(3) { bottom: 22%; left: 14%; border-width: 0 0 2px 2px; }
.osd-frame span:nth-child(4) { bottom: 22%; right: 14%; border-width: 0 2px 2px 0; }
.osd-gimbal {
  position: absolute;
  top: 50%;
  right: 4.5%;
  width: 4px;
  height: 150px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%);
}
.osd-gimbal span {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f7c21b;
  transform: translate(-50%, -50%);
}
.osd-bottom {
  position: absolute;
  bottom: 150px;
  left: 50%;
  display: flex;
  gap: 26px;
  align-items: baseline;
  transform: translateX(-50%);
  font-size: 13px;
}
.osd-bottom small { margin: 0 3px; color: var(--osd-dim); font-weight: 500; }
.osd-bottom b { font-size: 20px; font-weight: 700; }
.osd-rec { display: flex; gap: 6px; align-items: center; color: var(--osd-dim); }
.osd-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; }
.osd-warn {
  position: absolute;
  top: 128px;
  left: 50%;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(240, 160, 20, 0.92);
  color: #1a1407;
  font: 700 14px/1.2 var(--font-sans);
  text-shadow: none;
  transform: translateX(-50%);
}
.osd-warn[hidden], .fpv-warn[hidden] { display: none; }

/* Betaflight-style OSD in white mono, corners + crosshair + horizon */
.osd-fpv { color: var(--fpv); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.fpv-corner { position: absolute; display: flex; flex-direction: column; gap: 4px; }
.fpv-tl { top: 92px; left: 8%; }
.fpv-tr { top: 92px; right: 8%; text-align: right; }
.fpv-bl { bottom: 150px; left: 8%; }
.fpv-br { bottom: 150px; right: 8%; text-align: right; }
.fpv-center { position: absolute; top: 50%; left: 50%; width: 260px; height: 160px; transform: translate(-50%, -50%); }
.fpv-cross { position: absolute; top: 50%; left: 50%; width: 46px; height: 2px; background: var(--fpv); transform: translate(-50%, -50%); box-shadow: var(--osd-shadow); }
.fpv-cross::after { content: ''; position: absolute; left: 50%; top: -7px; width: 2px; height: 7px; background: var(--fpv); transform: translateX(-50%); }
.fpv-horizon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 0;
  border-top: 2px dashed rgba(242, 245, 234, 0.75);
  transform: translate(-50%, -50%);
}
.fpv-warn {
  position: absolute;
  top: 38%;
  left: 50%;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  transform: translateX(-50%);
  white-space: pre;
}

/* The OSDs make room for the HUD panels */
body.hud-minimized .osd-bottom,
body.hud-minimized .fpv-bl,
body.hud-minimized .fpv-br { bottom: 40px; }

@media (max-width: 720px) {
  .osd-bottom { gap: 12px; bottom: 170px; font-size: 11px; }
  .osd-bottom b { font-size: 15px; }
  .osd-top { top: 70px; }
  .fpv-tl, .fpv-tr { top: 72px; }
}

/* the radar's N marker orbits the centre as the map turns (map.js sets the transform) */
.radar-north { top: 50%; left: 50%; margin: -8.5px 0 0 -8.5px; }
