/* ═══════════════════════════════════════════
   Euklids Værksted — style.css
   ═══════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box }

body {
  background: #2a2a2a;
  font-family: 'Cormorant Garamond', serif;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top bar ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #1e1e1e;
  color: #f5f0e6;
  z-index: 10;
  border-bottom: 1px solid #3a3a3a;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar h1 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: #c9a96e;
  white-space: nowrap;
}

/* ─── Tool buttons ─── */
.tools { display: flex; gap: 3px }

.tool-btn {
  background: transparent;
  border: 2px solid transparent;
  color: #8a8278;
  padding: 7px 14px;
  font-family: inherit;
  font-size: .95rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tool-btn:hover { color: #f5f0e6; background: rgba(255,255,255,.06) }
.tool-btn.active { color: #f5f0e6; border-color: #c9a96e; background: rgba(201,169,110,.12) }
.tool-btn svg { width: 18px; height: 18px; flex-shrink: 0 }

/* ─── Action buttons ─── */
.actions { display: flex; gap: 6px }

.action-btn {
  background: transparent;
  border: 1px solid #444;
  color: #8a8278;
  padding: 5px 12px;
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s;
  white-space: nowrap;
}
.action-btn:hover { color: #f5f0e6; border-color: #777 }

/* ─── Status bar ─── */
.statusbar {
  padding: 5px 20px;
  background: #252525;
  color: #908878;
  font-size: .78rem;
  font-family: 'JetBrains Mono', monospace;
  min-height: 28px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #333;
}

/* ─── Canvas ─── */
.canvas-wrap {
  flex: 1;
  position: relative;
  cursor: crosshair;
  background: #f5f0e6;
}
canvas { display: block; width: 100%; height: 100% }

/* ─── Compass lock indicator ─── */
.compass-lock {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(139,94,60,.92);
  color: #f5f0e6;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: .82rem;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.compass-lock.visible { opacity: 1 }

/* ─── Keyboard hint ─── */
.hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(30,30,30,.88);
  color: #908878;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .7rem;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.9;
  opacity: .5;
  transition: opacity .3s;
  pointer-events: auto;
}
.hint:hover { opacity: 1 }

kbd {
  background: #555;
  color: #eee;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .65rem;
}


/* ─── Delete tool cursor ─── */
.canvas-wrap.delete-mode { cursor: not-allowed }
.canvas-wrap.delete-mode:hover { cursor: pointer }

/* ─── Hidden toggle active ─── */
.action-btn.active-toggle {
  border-color: #c9a96e !important;
  color: #f5f0e6 !important;
}


/* ─── Zoom / Pan controls ─── */
.zoom-controls {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 10;
}
.zoom-btn {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(44,62,80,0.3);
  border-radius: 6px;
  background: rgba(245,240,230,0.9);
  color: #2c3e50;
  font-size: 18px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  backdrop-filter: blur(4px);
  line-height: 1;
}
.zoom-btn:hover {
  background: rgba(245,240,230,1);
  border-color: #c9a96e;
  color: #8b5e3c;
}
.zoom-btn.pan {
  font-size: 15px;
  letter-spacing: -1px;
}
.zoom-btn.small {
  width: 34px; height: 22px;
  font-size: 14px;
}
.zoom-btn.active-toggle {
  background: #2c3e50;
  color: #c9a96e;
  border-color: #c9a96e;
}
.zoom-label {
  font: 10px 'JetBrains Mono', monospace;
  color: rgba(44,62,80,0.6);
  cursor: default;
  user-select: none;
  padding: 2px 0;
}
.canvas-wrap[style*="grab"] { cursor: grab !important; }
.canvas-wrap[style*="grabbing"] { cursor: grabbing !important; }
