/* ── Canvas Workspace ────────────────────────── */
.canvas-workspace {
  position: relative;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    0 8px 32px rgba(0,0,0,0.25),
    0 0 0 1px rgba(255,255,255,0.05);
  background: #fff;
  border-radius: 4px;
}

.canvas-workspace canvas {
  display: block;
  border-radius: 4px;
}

/* ── Selection Handles ──────────────────────── */
.selection-box {
  position: absolute;
  border: 2px solid var(--color-brand);
  pointer-events: none;
  z-index: 20;
}

.selection-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid var(--color-brand);
  border-radius: 2px;
  pointer-events: all;
  z-index: 21;
  transition: transform 150ms;
}

.selection-handle:hover {
  transform: scale(1.3);
}

.selection-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.selection-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.selection-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.selection-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.selection-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.selection-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.selection-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: w-resize; }
.selection-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: e-resize; }

.rotation-handle {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid var(--color-brand);
  border-radius: 50%;
  cursor: grab;
  pointer-events: all;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms, box-shadow 150ms;
}

.rotation-handle:hover {
  transform: translateX(-50%) scale(1.15);
  box-shadow: 0 2px 8px rgba(242,0,0,0.3);
}

.rotation-handle svg {
  width: 12px;
  height: 12px;
  color: var(--color-brand);
}

.rotation-line {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 1px;
  height: 20px;
  background: var(--color-brand);
  pointer-events: none;
  z-index: 20;
}

/* ── Snap Guides ─────────────────────────────── */
.snap-guide {
  position: absolute;
  background: #F20000;
  z-index: 30;
  pointer-events: none;
}

.snap-guide.horizontal {
  height: 1px;
  left: 0;
  right: 0;
}

.snap-guide.vertical {
  width: 1px;
  top: 0;
  bottom: 0;
}

/* ── Canvas Zoom Info ────────────────────────── */
.canvas-zoom-info {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.1);
}
