/* ==========================================================================
   FormReady — PDF to Image page styles (tools/pdf-to-image.html only)
   Owner: Zara (W4) · Page-specific CSS only; every value flows from the
   :root tokens in styles.css (design-system.md §9: no page-level <style>,
   no invented colours). Loaded AFTER styles/components/motion.
   ========================================================================== */

/* --- scale toggle ----------------------------------------------------------- */

/* Four scale labels carry DPI text (longer still in Hindi) and must not
   overflow a 390px phone: two per row, labels allowed to wrap. */
.pdfimg-scale-toggle {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.pdfimg-scale-toggle .toggle-btn {
  flex: 1 1 40%;
  white-space: normal;
  text-align: center;
  padding-inline: var(--space-2);
}

/* --- per-page result list (inside .result-panel) ---------------------------- */

.pdfimg-result-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.pdfimg-result-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
}

/* Converted page preview: the real image (blob URL), contained so both
   portrait and landscape pages stay inside the 380px result column and
   the 390px phone layout without sideways scrolling. */
.pdfimg-result-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
}

.pdfimg-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.pdfimg-result-name {
  font-size: var(--text-sm);
  font-weight: 800;
}

.pdfimg-result-size {
  color: var(--color-muted-foreground);
  font-size: var(--text-xs);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .pdfimg-result-item {
    transition: none;
  }
}
