/* The retouch tool (inc/retouch-tool.inc.php): the samples, the photo and
   the spot brush's ring. The layout is pt-ui.css's, the phone editor
   pt-app.css's, the sliders and buttons take pt-theme.css's look. */

/* ── Empty state: the samples ─────────────────────────────────────────── */
.retouch-editor .sample-thumbnails-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  /* Without a width it shrinks to half the box (left: 50%). */
  width: 90%;
}
/* By id: in the phone editor the photo box is out of the card. */
#rt-empty.hidden { display: none; }
.retouch-editor .sample-thumbnails { display: flex; justify-content: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.retouch-editor .sample-thumbnail {
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  overflow: hidden;
  width: 110px;
  height: 110px;
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.retouch-editor .sample-thumbnail:hover,
.retouch-editor .sample-thumbnail:focus-visible { border-color: var(--pt-accent, #0f70e6); box-shadow: 0 4px 12px rgba(15, 112, 230, 0.25); }
.retouch-editor .sample-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767px) { .retouch-editor .sample-thumbnail { width: 84px; height: 84px; } }

/* ── The photo ────────────────────────────────────────────────────────── */
#rt-viewport { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
#rt-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  /* a transparent PNG shows over a checkerboard */
  background: repeating-conic-gradient(#e6e6e6 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  cursor: none;
  touch-action: manipulation;
}
#rt-canvas[hidden] { display: none; }
#rt-compare.active { color: #fff; background: var(--cb-ink, #16181d); border-color: var(--cb-ink, #16181d); }

/* The spot brush: where a click heals (and where a tap just did). Two
   rings, dark and light, so it shows on pale and on dark skin. */
.rt-ring {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(22, 24, 29, 0.7), inset 0 0 0 1px rgba(22, 24, 29, 0.45);
  pointer-events: none;
}
.rt-ring[hidden] { display: none; }

.rt-link {
  border: 0;
  background: none;
  padding: 2px 4px;
  font-size: 0.8rem;
  color: var(--pt-accent, #0f70e6);
  cursor: pointer;
}
.rt-link:disabled { color: #9aa1aa; cursor: default; }
.rt-hint { font-size: 0.7rem; line-height: 1.45; color: #6c757d; margin: 2px 0 10px; }
fieldset:disabled .rt-hint { opacity: 0.75; }
