/* Shared photo crop / framing modal — uses rcs-theme.css tokens */

.rcs-photo-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rcs-photo-crop-modal[hidden] {
  display: none !important;
}

.rcs-photo-crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .rcs-photo-crop-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.rcs-photo-crop-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--rcs-panel, #fff);
  color: var(--rcs-text, #0f172a);
  border: 1px solid var(--rcs-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 64px var(--rcs-shadow, rgba(15, 23, 42, 0.28));
}

.rcs-photo-crop-panel h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.rcs-photo-crop-panel .rcs-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--rcs-muted, #64748b);
}

.rcs-photo-crop-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px var(--rcs-border, rgba(255, 255, 255, 0.12));
  touch-action: none;
  user-select: none;
  cursor: default;
}

.rcs-photo-crop-stage.is-pannable {
  cursor: grab;
}

.rcs-photo-crop-stage.is-panning {
  cursor: grabbing;
}

.rcs-photo-crop-stage--ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.rcs-photo-crop-stage--ratio-1 {
  aspect-ratio: 1 / 1;
}

.rcs-photo-crop-stage--ratio-16-10 {
  aspect-ratio: 16 / 10;
}

.rcs-photo-crop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
}

.rcs-photo-crop-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.rcs-photo-crop-slider-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 10px;
}

.rcs-photo-crop-slider-row label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: inherit;
}

.rcs-photo-crop-slider-row input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.rcs-photo-crop-slider-row:has(input:disabled) {
  opacity: 0.42;
}

.rcs-photo-crop-rotate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.rcs-photo-crop-rotate-btns {
  display: flex;
  gap: 8px;
}

.rcs-photo-crop-rotate-btns .rcs-btn {
  min-width: 2.5rem;
  font-size: 1.15rem;
  line-height: 1;
  padding: 6px 10px;
}

.rcs-photo-crop-error {
  color: var(--rcs-error, #dc2626);
  font-size: 14px;
  min-height: 1.2em;
  margin: 0 0 10px;
}

.rcs-photo-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
