/* Story Builder - Editor Interface Styles */

/* Editor Mode Indicator */
.edit-indicator {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: none;
  z-index: 100;
}

.edit-indicator.active {
  display: block;
}

/* Selection styles */
.selecting {
  user-select: none;
  cursor: crosshair;
}

.selection-box {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(220, 38, 38, 0.1);
  pointer-events: none;
  z-index: 1000;
}

/* Grid and guides (future) */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  display: none;
}

.grid-overlay.active {
  display: block;
}

.guide-line {
  position: absolute;
  background: var(--accent);
  opacity: 0.5;
  pointer-events: none;
  z-index: 999;
}

.guide-line.horizontal {
  height: 1px;
  width: 100%;
  left: 0;
}

.guide-line.vertical {
  width: 1px;
  height: 100%;
  top: 0;
}

/* Snapping indicators */
.snap-indicator {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  pointer-events: none;
  z-index: 1001;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.snap-indicator.active {
  opacity: 1;
}

/* Keyboard shortcuts hint */
.shortcuts-hint {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: rgba(0,0,0,.8);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  max-width: 200px;
  display: none;
  z-index: 1000;
}

.shortcuts-hint.visible {
  display: block;
}

.shortcuts-hint h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
}

.shortcuts-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  margin: 0 2px;
}

/* Loading state */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  display: none;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

/* Drag ghost */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  opacity: 0.5;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

/* Drop zones */
.drop-zone {
  position: absolute;
  inset: 0;
  border: 3px dashed var(--accent);
  border-radius: 20px;
  background: rgba(220, 38, 38, 0.05);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drop-zone.active {
  display: flex;
}

.drop-zone-text {
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
}