/* Whiteboard block (assets/js/ext/whiteboard.js). */

.wb { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin: 4px 0; background: var(--bg); }
.wb-bar { display: flex; align-items: center; gap: 2px; padding: 3px 4px; border-bottom: 1px solid var(--border); background: var(--bg-side); flex-wrap: wrap; }
.wb-bar.ro { position: absolute; right: 6px; top: 6px; border: 1px solid var(--border); border-radius: 6px; z-index: 2; }
.wb-tool { min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 4px; background: none; color: var(--fg); font-size: 15px; line-height: 1; cursor: pointer; }
.wb-tool:hover:not(:disabled) { background: var(--bg-hover); }
.wb-tool[aria-pressed="true"] { background: var(--bg-active); box-shadow: inset 0 0 0 1px var(--border); }
.wb-tool:disabled { opacity: .35; cursor: default; }
.wb-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.wb-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.wb-zoom { min-width: 40px; text-align: center; }

.wb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: default; outline: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); }
.wb-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.wb-stage.tool-hand, .wb-stage.space { cursor: grab; }
.wb-stage.panning { cursor: grabbing; }
.wb-stage.tool-sticky, .wb-stage.tool-rect, .wb-stage.tool-ellipse, .wb-stage.tool-diamond, .wb-stage.tool-arrow, .wb-stage.tool-line, .wb-stage.tool-pen { cursor: crosshair; }
.wb-stage.tool-text { cursor: text; }
.wb.ro .wb-stage { cursor: grab; }
.wb-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wb-item { pointer-events: none; }
.wb-note { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .18)); }
.wb-text { width: 100%; height: 100%; box-sizing: border-box; padding: 8px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.3; font-family: var(--font); }
.wb-text.wb-sticky { color: var(--fg); }
.wb-text.wb-rect, .wb-text.wb-ellipse, .wb-text.wb-diamond { display: flex; align-items: center; justify-content: center; text-align: center; }
.wb-text.wb-ellipse, .wb-text.wb-diamond { padding: 14% 16%; }
.wb-overlay { pointer-events: none; }
.wb-sel { fill: none; stroke: var(--accent); }
.wb-marquee { fill: var(--select); stroke: var(--accent); }
.wb-handle { fill: var(--bg); stroke: var(--accent); pointer-events: all; cursor: nwse-resize; }
.wb-handle.h-ne, .wb-handle.h-sw { cursor: nesw-resize; }
circle.wb-handle { cursor: move; }
.wb-edit { position: absolute; box-sizing: border-box; margin: 0; padding: 8px; border: 1px solid var(--accent); border-radius: 3px; resize: none; outline: none; overflow: hidden;
  font-family: var(--font); line-height: 1.3; background: transparent; z-index: 3; }
.wb-edit.wb-sticky { color: var(--fg); }
.wb-edit.wb-rect, .wb-edit.wb-ellipse, .wb-edit.wb-diamond { text-align: center; background: var(--bg); }
.wb-grip { height: 7px; cursor: ns-resize; background: var(--bg-side); border-top: 1px solid var(--border); }
.wb-grip:hover { background: var(--bg-active); }
