/* The Perspective Correction tool (inc/persp-tool.inc.php): the samples and
   the photo. 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 ─────────────────────────────────────────── */
.persp-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. */
#pc-empty.hidden { display: none; }
.persp-editor .sample-thumbnails { display: flex; justify-content: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.persp-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;
}
.persp-editor .sample-thumbnail:hover,
.persp-editor .sample-thumbnail:focus-visible { border-color: var(--pt-accent, #0f70e6); box-shadow: 0 4px 12px rgba(15, 112, 230, 0.25); }
.persp-editor .sample-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767px) { .persp-editor .sample-thumbnail { width: 84px; height: 84px; } }

/* ── The photo ────────────────────────────────────────────────────────── */
#pc-viewport { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
#pc-canvas { display: block; max-width: 100%; max-height: 100%; border-radius: 6px; background: repeating-conic-gradient(#eef1f5 0% 25%, #fff 0% 50%) 0 0/16px 16px; }
#pc-canvas[hidden] { display: none; }
#pc-compare.active, #pc-grid[aria-pressed="true"] { color: #fff; background: var(--cb-ink, #16181d); border-color: var(--cb-ink, #16181d); }

.pc-link {
  border: 0;
  background: none;
  padding: 2px 4px;
  font-size: 0.8rem;
  color: var(--pt-accent, #0f70e6);
  cursor: pointer;
}
.pc-link:disabled { color: #9aa1aa; cursor: default; }
