/* GrayCloud Maps — full-page radar overlay
   Dark frosted-glass UI on top of the radar iframe. The page is a single
   non-scrolling viewport: the iframe fills it and the overlay panels float
   on top with `pointer-events: auto` only on themselves so the user can
   pan/zoom the map between them. */

:root {
  --ink:        #e6ecf3;
  --ink-2:      #aab3bf;
  --ink-3:      #6e7682;
  --panel:      rgba(18, 24, 33, 0.78);
  --panel-edge: rgba(255, 255, 255, 0.06);
  --panel-hi:   rgba(255, 255, 255, 0.10);
  --accent:     #3aa0ff;
  --shadow:     0 8px 32px rgba(0, 0, 0, 0.35);
  --radius:     12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0c1017;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

iframe.map {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ---------- Top overlay ---------- */
.overlay-top {
  position: fixed;
  top: 12px; left: 12px; right: 12px;
  display: flex; align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 10;
}
.overlay-top > * { pointer-events: auto; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 28px; height: 28px; border-radius: 22%; display: block; object-fit: cover; }
.brand-word {
  font-size: 12px; font-weight: 600; line-height: 1.05;
}
.brand-word em { font-style: normal; color: var(--ink-2); font-weight: 500; }

.search-row {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  padding: 4px 6px 4px 4px;
  min-width: 0;
}

.geolocate {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 0; border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}
.geolocate:hover { background: var(--panel-hi); }
.geolocate svg { width: 18px; height: 18px; transform: rotate(5deg); }

.search-form {
  position: relative;
  flex: 1; min-width: 0;
  display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-input {
  flex: 1; min-width: 0;
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit; font-size: 14px;
  padding: 8px 36px 8px 30px;
  outline: none;
}
.search-input::placeholder { color: var(--ink-3); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: transparent;
  border: 0; border-radius: 8px;
  color: var(--ink-2);
  cursor: pointer;
}
.search-clear:hover { background: var(--panel-hi); color: var(--ink); }
.search-clear svg { width: 14px; height: 14px; }

.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 4px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  max-height: 50vh; overflow-y: auto;
  z-index: 20;
}
.search-suggest[hidden] { display: none; }
.search-suggest-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.search-suggest-item[aria-selected="true"],
.search-suggest-item:hover { background: var(--panel-hi); }
.search-suggest-empty,
.search-suggest-error {
  padding: 8px 10px; font-size: 12px; color: var(--ink-3);
}

/* ---------- Bottom overlay ---------- */
.overlay-bottom {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  z-index: 10;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  background: var(--panel-hi);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
}
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 0; color: var(--ink);
  font: inherit; font-size: 13px;
  padding: 6px 24px 6px 10px;
  cursor: pointer; outline: none;
}
.select-wrap::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.scrubber-row {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}
.scrub-label {
  font-size: 11px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.scrubber {
  flex: 1; min-width: 0;
  appearance: none; -webkit-appearance: none;
  height: 4px; background: rgba(255,255,255,0.12);
  border-radius: 999px; outline: none;
}
.scrubber::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  background: var(--ink); border: 2px solid var(--accent);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.scrubber::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--ink); border: 2px solid var(--accent);
  border-radius: 50%; cursor: pointer;
}

.scrub-now {
  flex: 0 0 auto;
  background: var(--panel-hi);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
}
.scrub-now:hover { background: rgba(255,255,255,0.16); }

.scrub-readout {
  flex: 0 0 auto;
  font-size: 12px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 4ch; text-align: right;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .overlay-top { gap: 8px; }
  .brand-word { display: none; }
  .brand { padding: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .overlay-bottom { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .scrubber-row { order: 3; flex-basis: 100%; }
  .scrub-readout { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
