/* Lighting Control Panel */
.lighting-panel {
  position: fixed;
  top: 50%;
  right: -280px;
  transform: translateY(-50%);
  width: 260px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  z-index: 60;
  transition: right 0.3s ease;
  box-shadow: -4px 0 12px rgba(0,0,0,0.3);
}

.lighting-panel.open {
  right: 0;
}

/* Preset Buttons */
.light-preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.light-preset-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.light-preset-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--accent);
}

.light-preset-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Light Rotation Dial */
.light-dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.light-dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  cursor: grab;
  background: var(--bg-tertiary);
  transition: border-color 0.15s;
}

.light-dial:hover {
  border-color: var(--accent);
}

.light-dial.grabbing {
  cursor: grabbing;
  border-color: var(--accent);
}

.light-dial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -4px;
  margin-left: -4px;
  transform: translate(0px, -24px);
  pointer-events: none;
}

.light-dial-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
}

/* Light Sliders */
.light-slider {
  width: calc(100% - 40px);
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  outline: none;
  -webkit-appearance: none;
  margin-right: 8px;
  vertical-align: middle;
}

.light-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}

.light-slider::-webkit-slider-thumb:hover {
  background: var(--text-primary);
  transform: scale(1.2);
}

.light-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* All Lights Off toggle */
.lights-off-btn {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.lights-off-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--accent);
}

.lights-off-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* When lights are off, dim the per-light controls to signal they're inactive */
.lighting-panel.lights-disabled .light-slider,
.lighting-panel.lights-disabled .light-dial,
.lighting-panel.lights-disabled .light-preset-buttons {
  opacity: 0.45;
}
