/* ============================================================
   Image to PDF — preview.css
   Step 3: a single "PDF card" — stacked-sheet document icon +
   projected file name/size — standing in for the finished file.
   Replaces the old raw per-page image strip: this step is about
   the PDF you're about to download, not the source photos.
   ============================================================ */


/* ══════════════════════════════════════════
   1. CARD SHELL
   ══════════════════════════════════════════ */
.ip-img2pdf-pdfcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 16px 22px;
  margin: 4px 0 6px;
  border-radius: 20px;
  background: var(--ip-bg);
  animation: ipCardIn 0.25s ease both;
}


/* ══════════════════════════════════════════
   2. STACKED-SHEET DOCUMENT ICON
   Three offset rectangles read as "pages merged into one file";
   the front sheet carries a folded corner + a PDF tag so it
   unmistakably reads as a finished document, not a photo.
   ══════════════════════════════════════════ */
.ip-img2pdf-pdfcard__stack {
  position: relative;
  width: 108px;
  height: 132px;
  margin-bottom: 14px;
}

.ip-img2pdf-pdfcard__sheet {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid var(--ip-line);
}

.ip-img2pdf-pdfcard__sheet--3 {
  z-index: 1;
  transform: rotate(-7deg) translate(-7px, 5px);
  opacity: 0.7;
}

.ip-img2pdf-pdfcard__sheet--2 {
  z-index: 2;
  transform: rotate(5deg) translate(6px, 2px);
  opacity: 0.88;
}

.ip-img2pdf-pdfcard__sheet--1 {
  z-index: 3;
  box-shadow: 0 10px 22px rgba(20,20,30,0.14), 0 2px 6px rgba(20,20,30,0.08);
  overflow: hidden;
}

/* Folded top-right corner — the classic "this is a document" cue */
.ip-img2pdf-pdfcard__sheet--1::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, transparent 50%, var(--ip-bg) 50%);
  box-shadow: -1px 1px 3px rgba(20,20,30,0.12);
}

/* A few faint text-lines so the front sheet reads as page content */
.ip-img2pdf-pdfcard__line {
  position: absolute;
  left: 14px;
  height: 4px;
  border-radius: 9999px;
  background: var(--ip-line);
}

.ip-img2pdf-pdfcard__line--1 { top: 34px; width: 56%; }
.ip-img2pdf-pdfcard__line--2 { top: 45px; width: 42%; }
.ip-img2pdf-pdfcard__line--3 { top: 56px; width: 48%; }

.ip-img2pdf-pdfcard__tag {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 3px 11px;
  border-radius: 6px;
  background: var(--ip-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Page-count badge, pinned to the stack's top-right corner */
.ip-img2pdf-pdfcard__count {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 4;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--ip-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(20,20,30,0.2);
}


/* ══════════════════════════════════════════
   3. FILE NAME / META TEXT
   ══════════════════════════════════════════ */
.ip-img2pdf-pdfcard__name {
  margin: 0;
  max-width: 100%;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ip-ink);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-img2pdf-pdfcard__meta {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ip-ink-soft);
  text-align: center;
}


/* ══════════════════════════════════════════
   4. DESKTOP ENHANCEMENTS (≥768px)
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
  .ip-img2pdf-pdfcard {
    padding: 34px 16px 26px;
  }

  .ip-img2pdf-pdfcard__stack {
    width: 122px;
    height: 148px;
  }

  .ip-img2pdf-pdfcard__name {
    font-size: 16px;
  }
}


/* ══════════════════════════════════════════
   5. ACCESSIBILITY
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ip-img2pdf-pdfcard {
    animation: none;
  }
}
