/* Content-Aware Scale Dialog Styles */

.cas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10070;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e2e8f0;
  user-select: none;
}

.cas-modal {
  width: 860px;
  max-width: 95vw;
  max-height: 94vh;
  background: #27272a;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px #3f3f46;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cas-header {
  padding: 10px 18px;
  background: #323238;
  border-bottom: 1px solid #1f1f23;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cas-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f4f4f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cas-header .close-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

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

.cas-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cas-viewport {
  width: 100%;
  height: 380px;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cas-canvas-wrap {
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.cas-preview-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.cas-energy-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.cas-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #a1a1aa;
  pointer-events: none;
}

/* Control Bar */
.cas-controls-panel {
  background: #1f1f23;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cas-controls-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cas-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.cas-field label {
  color: #a1a1aa;
}

.cas-field input[type="number"] {
  width: 70px;
  background: #18181b;
  border: 1px solid #52525b;
  color: #fff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  text-align: right;
}

.cas-field input[type="range"] {
  width: 110px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.cas-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e4e4e7;
  cursor: pointer;
}

.cas-check-label input[type="checkbox"] {
  accent-color: #3b82f6;
  cursor: pointer;
}

.cas-footer {
  padding: 12px 18px;
  background: #323238;
  border-top: 1px solid #1f1f23;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cas-btn {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.cas-btn-primary {
  background: #0078d4;
  color: #fff;
  border-color: #0060aa;
}

.cas-btn-primary:hover {
  background: #1084df;
}

.cas-btn-secondary {
  background: #3f3f46;
  color: #e4e4e7;
  border-color: #52525b;
}

.cas-btn-secondary:hover {
  background: #52525b;
  color: #fff;
}
