/**
 * Vector Studio - Canvas Viewport & Rulers Stylesheet
 */

#canvas-area {
  position: relative;
  flex: 1;
  height: 100%;
  background-color: var(--bg-canvas);
  overflow: hidden;
  cursor: default;
}

/* Rulers */
#ruler-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: var(--bg-topbar);
  border-right: 1px solid var(--border-app);
  border-bottom: 1px solid var(--border-app);
  z-index: 50;
  cursor: pointer;
}

#ruler-horizontal {
  position: absolute;
  top: 0;
  left: 18px;
  right: 0;
  height: 18px;
  background-color: var(--bg-topbar);
  border-bottom: 1px solid var(--border-app);
  z-index: 40;
}

#ruler-vertical {
  position: absolute;
  top: 18px;
  left: 0;
  bottom: 0;
  width: 18px;
  background-color: var(--bg-topbar);
  border-right: 1px solid var(--border-app);
  z-index: 40;
}

/* Canvas Viewport */
#canvas-viewport {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 0;
  bottom: 0;
  overflow: hidden;
  cursor: crosshair;
}

/* Main 2D Render Canvas */
#main-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Interactive Overlay Canvas (Handles, Guides, Selection Box) */
#overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* 3D Preview Canvas (Three.js WebGL for 3D Extrude & Perspective) */
#webgl-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 30;
}

/* Artboard Shadow / Visual Representation in HTML (optional backdrop) */
.artboard-bounds {
  position: absolute;
  background-color: #ffffff;
  box-shadow: var(--shadow-artboard);
  pointer-events: none;
}

/* Floating Contextual Task Bar (On-canvas mini bar) */
#floating-taskbar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: rgba(36, 36, 36, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-control);
  box-shadow: var(--shadow-panel);
  border-radius: 6px;
  z-index: 80;
  display: none;
}

.floating-taskbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-main);
}

/* Interactive Text Area on Canvas (for live editing) */
#canvas-text-editor {
  position: absolute;
  display: none;
  background: rgba(15, 23, 42, 0.35);
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(13, 153, 255, 0.25);
  color: #ffffff;
  caret-color: #0d99ff;
  font-family: Inter, sans-serif;
  font-size: 24px;
  line-height: 1.2;
  outline: none;
  padding: 2px 6px;
  margin: -3px -6px;
  min-width: 60px;
  min-height: 30px;
  resize: both;
  overflow: hidden;
  white-space: pre;
  z-index: 120;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}
