/* Multi-window workspaces (js/workspace.js). */

/* ── Bare windows: index.html?wsw=1 ─────────────────────────────────────────
   The class goes on <html> from an inline script in <head>, before first paint, so the header
   never flashes. The canvas takes the 60px the header used to have. */
html.wh-bare .dashboard-header { display: none !important; }
html.wh-bare .dashboard-container.with-header { height: 100vh; margin-top: 0; }
html.wh-bare body.edit-mode .dashboard-container.with-header { height: calc(100vh - 60px); }
html.wh-bare body.edit-mode .dashboard-container.collapsed-bar { height: 100vh; }

/* The one control a bare window keeps. It sits over the canvas, so when hidden it must not
   take clicks either: a faint-but-live handle swallowed clicks on the bond box beneath it.
   It shows for a few seconds when the window opens (.wh-peek), then only while the pointer is
   at the very top edge (.wh-bare-hot) or on the handle itself. Top-left, because top-right is
   where edit mode's fixed "EDIT MODE" badge sits (edit_mode.css). */
.wh-bare-hot { position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 1001; }
.wh-bare-handle {
  position: fixed; top: 6px; left: 8px; z-index: 1001;
  display: flex; align-items: center; gap: 8px;
  padding: 3px 4px 3px 10px; border-radius: 14px;
  background: rgba(var(--wh-0b132b-rgb, 11,19,43), 0.95); border: 1px solid var(--wh-3a506b, #3a506b);
  color: var(--wh-e0e0e0, #e0e0e0); font-size: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.wh-bare-hot:hover + .wh-bare-handle, .wh-bare-handle:hover, .wh-bare-handle.wh-peek {
  opacity: 1; pointer-events: auto;
}
.wh-bare-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-bare-btn {
  background: var(--wh-1f3756, #1f3756); color: var(--wh-e0e0e0, #e0e0e0); border: 1px solid var(--wh-3a506b, #3a506b); border-radius: 10px;
  padding: 2px 10px; font-size: 12px; cursor: pointer;
}
.wh-bare-btn:hover { border-color: var(--wh-5bc0be, #5bc0be); color: var(--wh-5bc0be, #5bc0be); }

/* ── Header dropdown section ─────────────────────────────────────────────── */
.wh-ws-item .wh-ws-meta { margin-left: auto; font-size: 11px; color: var(--wh-8aa0b8, #8aa0b8); white-space: nowrap; }
.wh-ws-empty { font-size: 12px; color: var(--wh-8aa0b8, #8aa0b8); padding: 4px 12px 8px; line-height: 1.4; }
.wh-ws-save { width: 100%; margin-top: 4px; }
#workspaceSection .wh-ws-install { padding: 6px 12px 2px; }
#workspaceSection .wh-ws-install .dashboard-action-btn { width: 100%; margin-top: 4px; }

/* ⧉ on each dashboard in the Switch Dashboard list */
.dashboard-item .wh-ws-pop {
  margin-left: auto; background: none; border: 1px solid transparent; border-radius: 4px;
  color: var(--wh-8aa0b8, #8aa0b8); font-size: 14px; line-height: 1; padding: 2px 6px; cursor: pointer;
}
.dashboard-item .wh-ws-pop:hover { color: var(--wh-5bc0be, #5bc0be); border-color: var(--wh-3a506b, #3a506b); }
.wh-ws-pop svg, .wh-ws-icon { display: inline-block; vertical-align: -2px; }

/* ── Banner: windows the pop-up blocker held back ──────────────────────────── */
.wh-ws-banner {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100000;
  display: flex; align-items: center; gap: 12px; max-width: 760px;
  padding: 12px 14px; border-radius: 8px;
  background: var(--wh-1c2541, #1c2541); border: 1px solid var(--wh-5bc0be, #5bc0be); color: var(--wh-e0e0e0, #e0e0e0); font-size: 13px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.wh-ws-banner-txt { line-height: 1.4; }
.wh-ws-banner-txt span { color: var(--wh-b8c4d4, #b8c4d4); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.wh-ws-overlay {
  position: fixed; inset: 0; z-index: 100001; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.wh-ws-modal {
  width: 440px; max-width: calc(100vw - 32px); background: var(--wh-1c2541, #1c2541); color: var(--wh-e0e0e0, #e0e0e0);
  border: 1px solid var(--wh-3a506b, #3a506b); border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.wh-ws-modal h3 { font-size: 16px; font-weight: 500; padding: 16px 18px 0; }
.wh-ws-body { padding: 10px 18px 4px; font-size: 13px; line-height: 1.45; }
.wh-ws-body p { margin-bottom: 10px; }
.wh-ws-quiet { color: var(--wh-8aa0b8, #8aa0b8); font-size: 12px; margin-bottom: 8px; }
.wh-ws-wins { margin: 0 0 12px 20px; }
.wh-ws-wins li { margin: 2px 0; }
.wh-ws-label { display: block; font-size: 12px; color: var(--wh-b8c4d4, #b8c4d4); margin-bottom: 4px; }
.wh-ws-in {
  display: block; width: 100%; margin-top: 4px; padding: 7px 9px; font-size: 13px;
  background: var(--wh-0b132b, #0b132b); color: var(--wh-e0e0e0, #e0e0e0); border: 1px solid var(--wh-3a506b, #3a506b); border-radius: 4px;
}
.wh-ws-in:focus { outline: none; border-color: var(--wh-5bc0be, #5bc0be); }
.wh-ws-check { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; cursor: pointer; }
.wh-ws-install { border-top: 1px solid var(--wh-2a3b55, #2a3b55); padding-top: 8px; margin-top: 4px; }
.wh-ws-err { color: #ff6b6b; font-size: 12px; min-height: 16px; }
.wh-ws-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 18px 16px; }
.wh-ws-btn {
  background: var(--wh-1f3756, #1f3756); color: var(--wh-e0e0e0, #e0e0e0); border: 1px solid var(--wh-3a506b, #3a506b); border-radius: 4px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.wh-ws-btn:hover { border-color: var(--wh-5bc0be, #5bc0be); }
.wh-ws-btn.primary { background: var(--wh-5bc0be, #5bc0be); color: var(--wh-0b132b, #0b132b); border-color: var(--wh-5bc0be, #5bc0be); font-weight: 500; }
.wh-ws-btn.primary:hover { background: var(--wh-6fffe9, #6fffe9); }

/* A Graphs module popped out to its own window (?solo=, js/workspace.js solo()): the module is
   moved to <body> and fills the window; the rest of the dashboard stays hidden behind it. */
html.wh-solo .dashboard-container { visibility: hidden; }
html.wh-solo .wh-bare-hot, html.wh-solo .wh-bare-handle { display: none !important; }
html.wh-solo .wh-solo-target {
  position: fixed !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
  width: auto !important; height: auto !important; margin: 0 !important; transform: none !important;
  z-index: 1050 !important; visibility: visible !important;   /* below the module's own pickers (1100+) */
}
/* In a solo window the module already fills the window. */
html.wh-solo #gFullBtn, html.wh-solo #gWinBtn { display: none !important; }
