/* ── STAGE PREVIEW PANEL (docked right on sequencer) ── */
.seq-preview-col {
  width: 280px;
  min-width: 160px;
  max-width: 700px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.seq-preview-resizer {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  cursor: ew-resize;
  z-index: 10;
  background: transparent;
  transition: background .15s;
}
.seq-preview-resizer:hover,
.seq-preview-resizer.dragging { background: var(--accent2); opacity: .5; }

.seq-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 6px;
}

.seq-preview-title {
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--label);
  text-transform: uppercase;
  flex: 1;
}

.seq-preview-hint {
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--border2);
}

.seq-preview-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #050705;
}

#seqPreviewCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  display: block;
}

/* ── FULLSCREEN PREVIEW OVERLAY ── */
.preview-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #050705;
  flex-direction: column;
}
.preview-fullscreen.visible { display: flex; }

.preview-fs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.preview-fs-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--accent2);
  flex: 1;
}

.preview-fs-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#seqPreviewFsCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── FLOATING VISUALIZER ── */
.viz-float {
  position: absolute;
  z-index: 50;
  background: var(--bg);
  border: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-float);
  min-width: 180px;
  min-height: 140px;
  overflow: hidden;
  transition: left 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--r-md);
}
/* suppress transition during user-drag so it doesn't feel laggy */
.viz-float.dragging {
  transition: none;
}
.viz-float-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: move;
  flex-shrink: 0;
  user-select: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.viz-float-title {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--label);
  text-transform: uppercase;
  flex: 1;
}
.viz-float-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #050705;
}
.viz-float-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.viz-resize-handle {
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  cursor: nwse-resize;
  z-index: 5;
}
.viz-resize-handle::after {
  content: '';
  position: absolute;
  bottom: 3px; right: 3px;
  width: 5px; height: 5px;
  border-right: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
}

/* ── DOCK STRIPS ── */
.viz-dock-strip {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
.viz-dock-strip.docked-top { border-top: none; border-bottom: 1px solid var(--border); }
.viz-dock-resizer-h {
  position: absolute;
  left: 0; right: 0;
  height: 5px;
  cursor: ns-resize;
  z-index: 10;
  background: transparent;
  transition: background .15s;
}
.viz-dock-resizer-h:hover, .viz-dock-resizer-h.dragging { background: var(--accent2); opacity: .5; }
.viz-dock-resizer-h.top { top: 0; }
.viz-dock-resizer-h.bottom { bottom: 0; }

/* ── SNAP GHOSTS ── */
.viz-snap-ghost {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--accent2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 100;
}
.viz-snap-ghost.visible { opacity: 0.6; }
