/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 0;
}

/* Parametric Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slider-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 110px;
  min-width: 110px;
}

.slider-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  min-width: 38px;
}

.slider-track-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Range input styling */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.range-slider:hover {
  background: rgba(255, 255, 255, 0.18);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #EDEDED;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.1s, background-color 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #FFFFFF;
}

.range-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.3);
  background: var(--accent-blue);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFFFFF;
  color: #0B0C0E;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: #EDEDED;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.btn-glow {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--bg-surface-3);
  border-color: var(--border-medium);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

/* Curve Editor Component */
.curve-editor-wrapper {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.curve-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curve-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
}

.curve-presets {
  display: flex;
  gap: 4px;
}

.btn-preset-curve {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all 0.12s;
}

.btn-preset-curve:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.curve-svg {
  border-radius: 6px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
  overflow: visible;
  touch-action: none;
}

.curve-footer {
  width: 100%;
  text-align: center;
}

.curve-coords-readout {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

/* Color Grading Wheels Grid */
.color-wheels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 10px;
}

.color-wheel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wheel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.wheel-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
}

.wheel-readout {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
}

.wheel-puck {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.05s;
}

.wheel-lum-slider {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.lum-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary);
}

.lum-slider-header span:last-child {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* 8-Channel HSL Selector */
.hsl-channel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-surface-2);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.hsl-tab-btn {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.12s;
}

.hsl-tab-btn.active {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.hsl-channel-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

/* AI Masks Panels */
.mask-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mask-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mask-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.mask-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 0, 85, 0.12);
  color: var(--accent-ruby);
  border: 1px solid rgba(255, 0, 85, 0.25);
}

.mask-badge.bg-badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  border-radius: 18px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-blue);
}

input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

/* AI Prompt & Smart Paste Boxes */
.ai-workflow-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paste-textarea {
  width: 100%;
  height: 110px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
  background: var(--bg-surface-1);
}

.prompt-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompt-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--bg-surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s;
}

.prompt-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.08);
}

.paste-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-emerald);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  width: 460px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: #181B20;
  color: #EDEDED;
  border: 1px solid var(--border-medium);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
