/* Scan to PDF page. Uses /scan/scan-page.css (same workspace, panel, Full window and camera) and
   /compress/compress-page.css; only the PDF-specific parts live here. */

/* Page switch row: ‹  Page N of M  ⇅ Arrange  › */
.scpdf-mid { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.scpdf-arrange { min-height: 40px; padding: 6px 12px; font-size: 13.5px; white-space: nowrap; border-color: #2f6bf0; color: #2f6bf0; }
.scpdf-arrange:disabled { opacity: .45; }

/* Arrange (same look as the old PDF tools' Arrange screen) */
.arr-ov {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0b0f14; color: #fff; overflow: hidden;
}
.arr-ov[open] { display: flex; flex-direction: column; }
.arr-ov::backdrop { background: #0b0f14; }
.arr-ov:not([open]) { display: none !important; }   /* lovepdfi.css has an older .arr-ov rule with display:flex */
.arr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); flex: 0 0 auto; }
.arr-t { flex: 1; text-align: center; font: 500 12.5px/1.3 Roboto, system-ui, sans-serif; color: #cbd5e1; }
.arr-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; width: 100%; max-width: 760px;
  margin: 0 auto; padding: 10px 12px 40px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.arr-it { position: relative; height: 0; padding-bottom: 133.333%; background: #fff; border: 2px solid #334155; border-radius: 8px; overflow: hidden; touch-action: pan-y; cursor: grab; }
.arr-it img { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.arr-it b { position: absolute; left: 4px; top: 4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #2563eb; color: #fff; font: 700 13px/24px Roboto, system-ui, sans-serif; text-align: center; pointer-events: none; }
.arr-it.arr-src { opacity: .35; border-style: dashed; border-color: #38bdf8; }
.arr-ghost {
  position: fixed; z-index: 3; width: 84px; height: 112px; object-fit: contain; background: #fff; border: 2px solid #38bdf8; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55); pointer-events: none; transform: translate(-50%, -60%) rotate(3deg); opacity: .95;
}
@media (min-width: 600px) { .arr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* One PDF result: the card takes the whole row so "Share PDF" and "Download PDF" fit side by side */
#scResultsList { grid-template-columns: 1fr !important; }
#scResultsList > * { max-width: 520px; width: 100%; }
