/* Photoshop Dark Theme - Refine Hair & Mask Workspace */
.rh-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}

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

.rh-dialog {
  width: 96vw;
  height: 94vh;
  max-width: 1380px;
  max-height: 900px;
  background: #242424;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  color: #dfdfdf;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  user-select: none;
  overflow: hidden;
}

.rh-header {
  height: 38px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.rh-header-title {
  font-weight: 600;
  font-size: 13px;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rh-view-modes {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #282828;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #3c3c3c;
}

.rh-view-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.rh-view-btn:hover {
  color: #fff;
}

.rh-view-btn.active {
  background: #2680eb;
  color: #fff;
  font-weight: 500;
}

.rh-close-btn {
  background: transparent;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 8px;
  line-height: 1;
}

.rh-close-btn:hover {
  color: #fff;
}

.rh-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Viewport */
.rh-viewport {
  flex: 1;
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.rh-viewport.view-onBlack {
  background: #000000;
}

.rh-viewport.view-onWhite {
  background: #ffffff;
}

.rh-viewport.view-transparency {
  background-image: linear-gradient(45deg, #202020 25%, transparent 25%),
                    linear-gradient(-45deg, #202020 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #202020 75%),
                    linear-gradient(-45deg, transparent 75%, #202020 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.rh-preview-canvas {
  max-width: 95%;
  max-height: 95%;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

/* Right Control Panel */
.rh-sidebar {
  width: 320px;
  background: #222222;
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.rh-quick-actions {
  padding: 14px 16px;
  border-bottom: 1px solid #333;
  background: #1d1d1d;
}

.rh-btn-refine-hair {
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(180deg, #2680eb, #1a6cd1);
  border: 1px solid #145db7;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(38, 128, 235, 0.3);
}

.rh-btn-refine-hair:hover {
  background: linear-gradient(180deg, #308cf2, #1c72dc);
}

.rh-controls {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rh-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
  margin-bottom: 8px;
  border-bottom: 1px solid #2e2e2e;
  padding-bottom: 4px;
}

.rh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rh-row:last-child {
  margin-bottom: 0;
}

.rh-label {
  width: 95px;
  flex-shrink: 0;
  color: #bbb;
  font-size: 11.5px;
}

.rh-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rh-range {
  flex: 1;
  accent-color: #2680eb;
  cursor: pointer;
}

.rh-num {
  width: 44px;
  background: #181818;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #fff;
  padding: 3px 5px;
  font-size: 11.5px;
  text-align: right;
  outline: none;
}

.rh-num:focus {
  border-color: #2680eb;
}

.rh-select {
  flex: 1;
  background: #181818;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #fff;
  padding: 4px 8px;
  font-size: 11.5px;
  outline: none;
}

.rh-select:focus {
  border-color: #2680eb;
}

/* Footer Actions */
.rh-footer {
  padding: 12px 16px;
  background: #1a1a1a;
  border-top: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.rh-btn {
  background: #333333;
  border: 1px solid #484848;
  border-radius: 4px;
  color: #eee;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}

.rh-btn:hover {
  background: #404040;
  color: #fff;
}

.rh-btn-primary {
  background: #2680eb;
  border-color: #1a6cd1;
  color: #fff;
  font-weight: 600;
}

.rh-btn-primary:hover {
  background: #1f6fd1;
}
