/* ==========================================================================
   CANVA-STYLE ONLINE DESIGN EDITOR STYLES
   ========================================================================== */

.editor-wrapper {
  display: flex;
  height: calc(100vh - 120px);
  min-height: 680px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}

/* 1. Left Sidebar Tools Panel */
.editor-sidebar-nav {
  width: 72px;
  background: #ffffff;
  border-right: 1px solid var(--pg-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  z-index: 20;
}

.editor-nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 3px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-nav-btn i {
  font-size: 1.25rem;
}

.editor-nav-btn:hover, .editor-nav-btn.active {
  background: var(--pg-secondary-light);
  color: var(--pg-secondary);
}

/* Secondary Drawer Panel */
.editor-subdrawer {
  width: 300px;
  background: #ffffff;
  border-right: 1px solid var(--pg-border);
  display: flex;
  flex-direction: column;
  z-index: 15;
  overflow-y: auto;
}

/* 2. Top Action & Prepress Bar */
.editor-top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--pg-border);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
}

.prepress-indicator-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 3. Center Canvas Workspace */
.editor-canvas-stage {
  flex-grow: 1;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  padding: 40px;
}

.canvas-artboard-container {
  position: relative;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(11, 19, 41, 0.15);
  border-radius: 4px;
  user-select: none;
  transition: box-shadow 0.2s ease;
}

/* Safe Print & Bleed Guides Overlay */
.guide-bleed-line {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border: 1.5px dashed #ef4444;
  pointer-events: none;
  z-index: 100;
}

.guide-safe-line {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1.5px dashed #10b981;
  pointer-events: none;
  z-index: 100;
}

.guide-trim-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid #3b82f6;
  pointer-events: none;
  z-index: 100;
}

/* Canvas Elements on Stage */
.canvas-element {
  position: absolute;
  cursor: move;
  border: 1.5px dashed transparent;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s ease;
}

.canvas-element.selected {
  border-color: #2563eb !important;
}

.canvas-element .transform-handle {
  width: 12px;
  height: 12px;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  display: none;
  z-index: 50;
  pointer-events: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
}

.canvas-element .transform-handle:hover {
  transform: scale(1.25);
}

.canvas-element.selected .transform-handle {
  display: block;
}

.transform-handle.tl { top: -6px; left: -6px; cursor: nwse-resize; }
.transform-handle.tr { top: -6px; right: -6px; cursor: nesw-resize; }
.transform-handle.bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.transform-handle.br { bottom: -6px; right: -6px; cursor: nwse-resize; }
.transform-handle.rot { 
  top: -24px; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 16px;
  height: 16px;
  background: #ea580c; 
  cursor: grab; 
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 4. Right Properties Inspector Panel */
.editor-properties-panel {
  width: 280px;
  background: #ffffff;
  border-left: 1px solid var(--pg-border);
  padding: 20px;
  overflow-y: auto;
  z-index: 15;
}

/* Image Filter Presets */
.filter-thumb {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 2px;
  text-align: center;
}

.filter-thumb:hover, .filter-thumb.active {
  border-color: var(--pg-secondary);
}

.filter-thumb img {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
