/* ========================================================
   CURVES & LEVELS ADJUSTMENT MODULE STYLES (Photoshop Style)
   ======================================================== */

.ps-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.ps-modal-dialog {
  background: #232326;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  min-width: 440px;
  max-width: 580px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ps-dialog-header {
  height: 34px;
  padding: 0 12px;
  background: #2d2d30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-dialog-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-dialog-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 3px;
}

.ps-dialog-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ps-dialog-body {
  padding: 14px;
  display: flex;
  gap: 16px;
  background: #1f1f22;
}

.ps-dialog-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-dialog-sidebar {
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-dialog-btn {
  height: 25px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #2e2e33;
  color: #f3f4f6;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ps-dialog-btn:hover {
  background: #3a3a40;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ps-dialog-btn.primary {
  background: #0265dc;
  border-color: #0265dc;
  color: #fff;
  font-weight: 600;
}

.ps-dialog-btn.primary:hover {
  background: #0253b8;
}

.ps-dialog-options {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #d1d5db;
  cursor: pointer;
}

.ps-checkbox-label input[type="checkbox"] {
  accent-color: #0265dc;
  cursor: pointer;
}

/* Preset & Channel Bar */
.ps-dialog-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ps-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #9ca3af;
}

.ps-select {
  height: 24px;
  padding: 0 6px;
  font-size: 11.5px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #f3f4f6;
  outline: none;
  cursor: pointer;
}

.ps-select:focus {
  border-color: #0265dc;
}

/* Curves Canvas Graph */
.curves-graph-container {
  width: 256px;
  height: 256px;
  position: relative;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: crosshair;
  overflow: hidden;
  margin: 0 auto;
}

.curves-graph-container canvas {
  width: 256px;
  height: 256px;
  display: block;
}

.curves-io-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 4px;
}

.curves-io-box {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #9ca3af;
}

.curves-io-input {
  width: 52px;
  height: 22px;
  padding: 0 2px;
  font-size: 11px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  color: #f3f4f6;
  text-align: center;
  box-sizing: border-box;
}

/* Levels Controls */
.levels-histogram-container {
  width: 256px;
  height: 120px;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.levels-histogram-container canvas {
  width: 256px;
  height: 120px;
  display: block;
}

.levels-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.levels-num-input {
  width: 56px;
  height: 22px;
  padding: 0 2px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  color: #f3f4f6;
  font-size: 11px;
  text-align: center;
  box-sizing: border-box;
}

.levels-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.levels-slider-label {
  font-size: 10.5px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.levels-slider {
  width: 100%;
  accent-color: #0265dc;
  cursor: pointer;
}
