/* The LowDown web map. Same palette as the app (src/theme.ts):
   black, white text, grey muted, one cyan accent. Red and yellow are
   used ONLY for hazard severity. */
:root {
  --bg: #000;
  --surface: #141414;
  --line: #262626;
  --ink: #fff;
  --muted: #b2b2b2;
  --accent: #22d3ee;
  --scraped: #ff4d4d;
  --angled: #ffc533;
  --cleared: #ffffff;
  --unknown: #b2b2b2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Barlow, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand, .cta, .tag, h2, summary {
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand { color: var(--ink); font-weight: 700; font-size: 20px; text-decoration: none; }
.count { color: var(--muted); font-size: 14px; flex: 1; min-width: 0; }
.cta {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.stage { flex: 1; min-height: 0; position: relative; }
#map { position: absolute; inset: 0; }

.preview {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: end center;
  overflow: hidden;
}
#preview-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-copy {
  position: relative;
  text-align: center;
  padding: 20px 24px;
  margin: 16px;
  max-width: 420px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.preview-copy h1 {
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 32px;
  margin: 0 0 6px;
}
.preview-copy p { margin: 0 0 14px; font-size: 16px; }
.preview-copy a { color: var(--accent); }
.small { font-size: 14px !important; margin: 12px 0 0 !important; }
.open {
  font: 700 18px 'Barlow Condensed', Barlow, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
}
.open:disabled { opacity: 0.6; cursor: default; }

.notice {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  max-width: calc(100% - 32px);
}

/* Hazard tag: the app's square tag. Severity has a non-color cue too:
   scraped = heavy border, angled = double border, cleared = thin border.
   Dashed = imported, not driven yet (same meaning as in the app). */
.tag {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--bg);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.sev-scraped { color: var(--scraped); border: 4px solid var(--scraped); }
.sev-angled  { color: var(--angled);  border: 4px double var(--angled); }
.sev-cleared { color: var(--cleared); border: 1.5px solid var(--cleared); }
.sev-unknown { color: var(--unknown); border: 2px solid var(--unknown); }
.unchecked { border-style: dashed; border-width: 2px; }
.group { position: relative; padding: 9px 12px 0 0; }
.badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  border: 1.5px solid var(--bg);
  color: #000;
  font: 700 11px/15px 'Barlow Condensed', sans-serif;
  text-align: center;
}

.panel {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 40px 14px 14px;
}
.panel h2 { margin: 0 0 4px; font-size: 20px; }
.panel p { margin: 0 0 2px; font-size: 15px; }
.muted { color: var(--muted); }
.close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.key {
  position: fixed;
  right: 16px;
  top: 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  max-width: calc(100% - 32px);
}
.key summary { cursor: pointer; font-weight: 700; }
.key ul { list-style: none; padding: 0; margin: 8px 0; }
.key li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.key .tag { width: 26px; height: 26px; font-size: 11px; cursor: default; flex: none; }
.crew { display: flex; gap: 6px; align-items: center; color: var(--muted); }

@media (max-width: 560px) {
  .count { display: none; }
  .key { top: auto; bottom: 16px; right: 16px; }
  .panel { bottom: 64px; }
}
