/* Caelum Technologies client portal - shared design system
   Palette: clean daylight chrome, Caelum sky blue, slate ink.
   Type: Space Grotesk display, IBM Plex Mono data.
   Designed and built by 3DroneMapping. */

:root {
  --ink: #f4f6f9;          /* page background */
  --panel: #ffffff;
  --panel-2: #eef2f6;
  --line: #d3dae2;
  --line-soft: #e4e9ee;
  --paper: #ffffff;
  --text: #16202b;
  --muted: #5d6b79;
  --accent: #0f76bb;       /* Caelum Technologies brand blue */
  --accent-soft: #0f76bb1f;
  --on-accent: #ffffff;    /* text on accent fills */
  --teal: #2a9d8f;         /* contour teal */
  --danger: #b4393a;
  --danger-line: #e3b5b5;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
button { font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Top bar (viewers) ---------------------------------- */
.bar {
  height: 52px;
  display: flex;
  align-items: stretch;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.bar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}
.bar .brand img.lockup { display: block; height: 32px; width: auto; }

.bar .ref {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 14px; border-right: 1px solid var(--line);
  min-width: 0;
}
.bar .ref .p { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.bar .ref .r { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .05em; }
.bar .tabs { display: flex; margin-left: auto; }
.bar .tabs a {
  display: flex; align-items: center; gap: 7px;
  padding: 0 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--muted); text-decoration: none;
  border-left: 1px solid var(--line);
}
.bar .tabs a:hover { color: var(--text); background: var(--panel-2); }
.bar .tabs a.on {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  background: var(--panel-2);
}

/* GCP quartered-target mark */
.gcp { width: 20px; height: 20px; flex: none; }

/* ---- Buttons & controls --------------------------------- */
.btn {
  appearance: none; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  padding: 7px 12px;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: var(--muted); }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: .4; cursor: default; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }
.seg .btn + .btn { border-left: 1px solid var(--line); }

input[type="range"] { accent-color: var(--accent); }

/* ---- Floating panels on the map ------------------------- */
.panel {
  position: absolute;
  /* MapLibre appends its canvas AFTER these elements in the DOM, so
     without a stacking order the canvas paints straight over them. */
  z-index: 10;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  box-shadow: 0 4px 18px rgba(22,32,43,.14);
}
.panel h4 {
  margin: 0 0 8px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.row { display: flex; align-items: center; gap: 8px; }
.row + .row { margin-top: 8px; }

/* ---- Coordinate readout --------------------------------- */
.coords {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 10;
  height: 30px;
  display: flex; align-items: center; gap: 22px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap; overflow: hidden;
}
.coords b { color: var(--text); font-weight: 500; }
.coords .tag { color: var(--accent); }

/* ---- Notices -------------------------------------------- */
.notice {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 11;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 9px 14px; font-size: 12.5px; color: var(--muted);
  max-width: min(560px, 92vw);
}
.notice b { color: var(--text); }

/* ---- Build credit --------------------------------------- */
.credit {
  font-size: 11px; color: var(--muted); letter-spacing: .02em;
}
.credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--accent); }
/* viewers: tucked into the bottom-right corner */
.credit.float {
  position: absolute; right: 12px; bottom: 7px; z-index: 12;
  font-size: 10.5px; pointer-events: auto;
}
