/* MTips5s Photoshop Lite - Gradient Map and Threshold Styles */

.gradient-map-modal, .threshold-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e0e0e0;
}

.gradient-map-window, .threshold-window {
  width: 440px;
  background: #2b2b2b;
  border: 1px solid #3c3c3c;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gm-header, .th-header {
  height: 38px;
  background: #1f1f1f;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.gm-title, .th-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-close, .th-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
}

.gm-close:hover, .th-close:hover {
  color: #fff;
}

.gm-body, .th-body {
  padding: 14px;
  display: flex;
  gap: 14px;
}

.gm-left, .th-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gm-right, .th-right {
  width: 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gm-right button, .th-right button {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-gm-primary {
  background: #007acc;
  color: #fff;
  border-color: #0060a0;
}

.btn-gm-primary:hover {
  background: #0088e0;
}

.btn-gm-secondary {
  background: #3c3c3c;
  color: #ddd;
  border-color: #4a4a4a;
}

.btn-gm-secondary:hover {
  background: #4a4a4a;
  color: #fff;
}

/* Gradient Preview Bar */
.gm-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gm-bar {
  width: 100%;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #444;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  cursor: pointer;
}

.gm-stops-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gm-stop-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.gm-color-input {
  width: 24px;
  height: 24px;
  border: 1px solid #555;
  border-radius: 3px;
  cursor: pointer;
  background: none;
  padding: 0;
}

.gm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11.5px;
}

.gm-checkbox-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.gm-select {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #3c3c3c;
  color: #eee;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 11.5px;
}

/* Threshold histogram and slider */
.th-histogram-box {
  width: 100%;
  height: 120px;
  background: #181818;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

.th-canvas {
  width: 100%;
  height: 100%;
}

.th-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.th-slider-row input[type="range"] {
  flex: 1;
  accent-color: #007acc;
  height: 4px;
  cursor: pointer;
}

.th-num-input {
  width: 44px;
  background: #181818;
  border: 1px solid #3c3c3c;
  color: #eee;
  padding: 3px 4px;
  text-align: right;
  border-radius: 3px;
  font-size: 11px;
}
