/**
 * SatView — floating-window chrome (tool-windows.js)
 * Minimize/maximize/close cluster, edge/corner resize handles,
 * and the minimize dock (bottom-left of the map, after the Leaflet scale).
 */

/* ── [— □ ×] control cluster ─────────────────────────────────── */
.sv-win-ctrls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;          /* the cluster itself never shrinks or clips */
  margin-left: 8px;
}
.sv-win-ctrls__btn { padding: 5px; }

/* Titles yield before controls do: a long title ellipsizes instead of
   pushing the [— □ ×] cluster out of the window. */
.cat-header h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Headers must be allowed to wrap when the window gets narrow — otherwise
   their fixed-height single row clips the rightmost controls (the reported
   "the close cross disappears when resizing" bug). Height becomes a
   minimum; extra controls flow to a second row. */
.tasking-header,
.amc-header,
.topt-header {
  height: auto;
  min-height: 52px;
  flex-wrap: wrap;
  row-gap: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.tasking-header__right,
.amc-header__right,
.topt-header__right {
  flex-wrap: wrap;
  row-gap: 4px;
  margin-left: auto;
}

/* ── Edge / corner resize handles ────────────────────────────── */
.sv-win-handle { position: absolute; z-index: 60; }
.sv-win-handle--n  { top: 0;    left: 10px;  right: 10px; height: 6px; cursor: n-resize; }
.sv-win-handle--s  { bottom: 0; left: 10px;  right: 10px; height: 6px; cursor: s-resize; }
.sv-win-handle--e  { right: 0;  top: 10px;   bottom: 10px; width: 6px; cursor: e-resize; }
.sv-win-handle--w  { left: 0;   top: 10px;   bottom: 10px; width: 6px; cursor: w-resize; }
.sv-win-handle--ne { top: 0;    right: 0;  width: 12px; height: 12px; cursor: ne-resize; }
.sv-win-handle--nw { top: 0;    left: 0;   width: 12px; height: 12px; cursor: nw-resize; }
.sv-win-handle--se { bottom: 0; right: 0;  width: 12px; height: 12px; cursor: se-resize; }
.sv-win-handle--sw { bottom: 0; left: 0;   width: 12px; height: 12px; cursor: sw-resize; }

/* ── Minimize dock ───────────────────────────────────────────── */
/* Glued to the left of the time-control bar, bottom-aligned with it —
   right/bottom are computed by tool-windows.js from the bar's real rect
   (it's centered with a content-driven width). The left/bottom below are
   only the fallback when the bar isn't present. */
#svWinDock {
  position: absolute;
  left: 130px;
  bottom: 10px;
  z-index: 900;
  display: none;           /* flex when it has items (tool-windows.js) */
  gap: 6px;
  align-items: flex-end;
}
.sv-dock__item {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface, #21272D);
  border: 1px solid var(--color-border, #2A3038);
  border-radius: 8px;
  color: #9CA3AF;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.sv-dock__item:hover {
  color: var(--color-accent, #4FA8C9);
  border-color: var(--color-accent, #4FA8C9);
  transform: translateY(-2px);
}
