/* The site's frame (src/ui/site-shell.js): sections left, the bureau and the
   account in the middle, map state right, tools along the bottom centre.
   Only overrides — main.css stays the map-local one. */

/* ---- the top bar ---------------------------------------------------------- */

.top-status.is-site {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
}
.strategy-shell.has-long-brand .top-status.is-site {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  justify-self: start;
}
.top-nav .observer-launcher { flex: none; }

.top-status.is-site .brand--center {
  justify-self: center;
  gap: 12px;
}
.brand--center .brand-copy { justify-items: center; text-align: center; }
/* The placeholder square before the name: the name is the logo (owner). */
.top-status.is-site .brand-mark { display: none; }
.brand--center .brand-sub { letter-spacing: 0.24em; }
.brand-account { display: flex; align-items: center; }
/* The header lets clicks through to the map (pointer-events: none on the bar,
   auto on its controls). The account chip is a control: it must take them.
   The middle also sits above its neighbours, so a crowded bar never covers it. */
/* Above the desk tabs and side docks, so the account menu opens over them;
   below the windows and dialogs. */
.top-status.is-site .brand--center { position: relative; z-index: 45; }
.top-status.is-site .brand-account { pointer-events: auto; }
.brand-account .account-wrap { margin: 0; }

.top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  justify-self: end;
}
.top-status.is-site .status-strip { flex: none; gap: 0; }
.top-status.is-site .status-strip > span:not(.status-keep) { display: none; }
.top-status.is-site .clock-readout { justify-self: auto; white-space: nowrap; }

/* Terrain / Intel: a small switch, not a dock. */
.top-right .mode-dock {
  position: static;
  transform: none;
  gap: 2px;
  padding: 2px;
  background: rgba(120, 184, 255, 0.05);
  border: 1px solid rgba(120, 184, 255, 0.16);
  border-radius: 6px;
  box-shadow: none;
}
.top-right .mode-button {
  min-width: 0;
  height: 22px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}
.top-right .intel-grid-pick {
  position: static;
  transform: none;
}

/* ---- the dock, bottom centre: Map · Mark · Sim · Share -------------------------- */
/* One glass strip (site-shell.js). Each group is a caption over a row of bare
   glyphs — the map's own glyph language (no plates, a glow on hover, blue when
   on), which the tools speak now too. */
.strategy-shell.is-site .map-action-dock.is-unified {
  left: 50% !important;
  bottom: 12px !important;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 5px 4px 3px;
  background: linear-gradient(180deg, rgba(14, 24, 40, 0.8), rgba(8, 14, 24, 0.84));
  border: 1px solid rgba(90, 150, 220, 0.22);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}
/* What else sits over this strip of map (the front-arrow day scrubber) centres
   on the dock, not on where the glyphs used to be. */
.strategy-shell.is-site { --map-action-center-x: 50% !important; }
.dock-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 6px;
}
.dock-group + .dock-group { border-left: 1px solid rgba(90, 150, 220, 0.16); }
.dock-cap {
  padding-top: 1px;
  color: rgba(150, 180, 214, 0.55);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: default;
  user-select: none;
}
.dock-row { display: flex; align-items: center; gap: 2px; }
/* A glyph's hover flyout clears the caption above its row, not just the glyph. */
.dock-row > * > [class*="-flyout"]:not([class*="-flyout-"]) { margin-bottom: 14px; }
.dock-row .spot-hud-main,
.dock-row .tactical-tools-launcher { width: 36px; height: 36px; }
.dock-row > .observer-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  min-width: 36px;
  padding: 0 6px;
  color: rgba(176, 202, 232, 0.7);
  background: none;
  border: 0;
  border-radius: 8px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
  transition: color 0.16s ease, filter 0.16s ease, transform 0.1s ease;
}
.dock-row > .observer-launcher svg { width: 21px; height: 21px; flex: none; }
.dock-row > .observer-launcher:hover {
  color: #eaf4ff;
  background: none;
  filter: drop-shadow(0 0 7px rgba(61, 139, 255, 0.75));
}
.dock-row > .observer-launcher:active { transform: scale(0.92); }
.dock-row > .observer-launcher.active,
.dock-row > .observer-launcher.is-active,
.dock-row > .observer-launcher.is-live,
.dock-row > .observer-launcher[aria-pressed="true"],
.dock-row > .observer-launcher[aria-expanded="true"] {
  color: #74b4ff;
  background: none;
  filter: drop-shadow(0 0 9px rgba(61, 139, 255, 0.9));
}
.dock-row > .fate-launcher {
  width: auto;
  height: 24px;
  margin: 0 4px;
  padding: 0 9px;
  border-radius: 6px;
  box-shadow: none;
  z-index: auto;
}

/* Panels the tools open now rise from the bottom dock instead of hanging
   off the top-right corner. */
.strategy-shell.is-site ~ .sync-panel,
body:has(.strategy-shell.is-site) .sync-panel {
  top: auto;
  right: auto;
  bottom: 80px;
  left: calc(50% - 134px);
  max-height: calc(100vh - 150px);
  overflow: auto;
}
.strategy-shell.is-site .weather-dock {
  top: auto;
  right: auto;
  bottom: 80px;
  left: calc(50% - 126px);
  max-height: calc(100vh - 160px);
  transform-origin: bottom center;
}
.strategy-shell.is-site .fate-popover {
  right: auto;
  left: calc(50% - 165px);
  width: 330px;
  min-width: 0;
  bottom: 80px;
}
/* The draw toolbar already sits above a bottom dock — it keeps its place. */

/* ---- the zone store button ------------------------------------------------------ */

.store-launcher { display: inline-flex; align-items: center; gap: 6px; }
.store-launcher svg { width: 15px; height: 15px; flex: none; }
.observer-icon { width: 14px; height: 14px; flex: none; }
#observer-launcher { display: inline-flex; align-items: center; gap: 6px; }

/* The old hint spoke of a bottom dock that switched map modes. */
.strategy-shell.is-site .map-hint { display: none; }

/* ---- narrower screens --------------------------------------------------------------- */

/* Medium widths: sections show icons only, the clock steps aside. */
@media (max-width: 1366px) {
  .top-nav .observer-launcher { font-size: 0; gap: 0; padding-left: 9px; padding-right: 9px; }
  .top-nav .observer-launcher svg { margin: 0; }
  .brand--center .brand-main { max-width: 34vw; }
}
@media (max-width: 1180px) {
  .top-status.is-site .clock-readout { display: none; }
}

/* Narrower: smaller glyphs; narrow: no captions. */
@media (max-width: 1180px) {
  .dock-group { padding: 0 3px; }
  .dock-row .spot-hud-main,
  .dock-row .tactical-tools-launcher,
  .dock-row > .observer-launcher { width: 32px; min-width: 32px; height: 32px; }
  .dock-row > .swarm-launcher { width: auto; }
}
@media (max-width: 920px) {
  .top-status.is-site { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .top-nav .observer-launcher { font-size: 0; gap: 0; }
  .top-nav .observer-launcher svg { margin: 0; }
  .brand--center .brand-copy { display: none; }
  .top-right .mode-dock { display: none; }
  .dock-cap { display: none; }
  .strategy-shell.is-site .map-action-dock.is-unified { bottom: 8px !important; padding: 3px 2px; }
}

/* The BOIDS switch in the Sim group: off by default on the site. */
.swarm-launcher { display: inline-flex; align-items: center; gap: 6px; }
.swarm-launcher svg { width: 16px; height: 16px; flex: none; }
.swarm-state { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(168, 190, 216, 0.75); }
.swarm-launcher.is-live { color: #eaf4ff; border-color: rgba(122, 229, 130, 0.55); box-shadow: 0 0 12px rgba(122, 229, 130, 0.2); }
.swarm-launcher.is-live .swarm-state { color: #9fe8a5; }
