/* =====================================================
   PDFPro — tool.css  (Tool Page Styles)
   ===================================================== */

/* ── Breadcrumb ── */
.breadcrumb-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
}
.bc-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-weight: 500;
  transition: var(--transition);
}
.bc-link svg { width: 16px; height: 16px; }
.bc-link:hover { color: var(--red); }
.bc-sep { color: var(--text-3); }
.bc-current { color: var(--text); font-weight: 600; }

/* ── Tool Hero ── */
.tool-hero {
  padding: 24px 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.tool-hero-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}
.tool-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.tool-hero-icon svg { width: 100%; height: 100%; }
.tool-hero-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--red-light);
  color: var(--red);
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
}
.tool-hero-text h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: 4px;
}
.tool-hero-text p {
  color: var(--text-2);
  font-size: .9rem;
  max-width: 560px;
  line-height: 1.55;
}

/* ── Tool Main ── */
.tool-main {
  padding: 28px 0 80px;
  background: var(--bg-soft);
  min-height: calc(100vh - 68px);
}
.tool-container { max-width: 100%; }

/* ── Step Header ── */
.step-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}
.step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg);
  border: 2px solid var(--border);
  white-space: nowrap;
  transition: var(--transition);
}
.step-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232,71,63,.3);
}
.step-pill.done {
  background: #E8F8F0;
  border-color: #27AE60;
  color: #27AE60;
}
.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
}
.step-pill:not(.active):not(.done) .step-dot {
  background: var(--border);
  color: var(--text-3);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
  max-width: 60px;
  transition: background var(--transition);
}
.step-line.active { background: #27AE60; }

/* ── Upload Card ── */
.upload-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: var(--bg-soft);
}
.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone.dragover {
  border-color: var(--red);
  background: var(--red-light);
  transform: scale(1.005);
}
.upload-dropzone.dragover { box-shadow: 0 0 0 4px rgba(232,71,63,.12); }

.dz-icon svg { width: 52px; height: 52px; margin: 0 auto 12px; }
.dz-main { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.dz-sub { font-size: .855rem; color: var(--text-3); margin-bottom: 12px; }
.dz-formats {
  display: inline-block;
  padding: 5px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .8rem;
  color: var(--text-3);
  font-weight: 500;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.upload-or {
  color: var(--text-3);
  font-size: .875rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ── iLovePDF-style upload page ── */
.upload-page-hero {
  text-align: center;
  padding: 48px 20px 32px;
}
.uph-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--red-light);
  color: var(--red);
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 14px;
}
.uph-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.6px;
  margin-bottom: 10px;
  color: var(--text);
}
.uph-desc {
  color: var(--text-2);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}
.upload-narrow-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.upload-zone-clean {
  background: #fff;
  border-radius: 16px;
  padding: 64px 40px 56px;
  box-shadow: 0 4px 32px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  border: 2px solid #d0d7e3;
  text-align: center;
  cursor: default;
}
.upload-zone-clean.dragover {
  border-color: var(--red);
  background: var(--red-light);
  box-shadow: 0 0 0 4px rgba(232,71,63,.1);
}
.upload-narrow-wrap .file-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 24px;
  margin-top: 0;
}
.uzc-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-select-main {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 28px 80px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-width: 360px;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(232,71,63,.4);
  letter-spacing: -.2px;
}
.btn-select-main:hover {
  background: #d63b33;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(232,71,63,.5);
}
.btn-select-main:active { transform: translateY(0); }
.uzc-cloud-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-cloud-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
}
.btn-cloud-icon:hover {
  background: var(--bg-soft);
  border-color: #aab4c8;
  transform: scale(1.08);
}
.uzc-drop-hint {
  margin: 22px 0 0;
  color: var(--text-3);
  font-size: .9rem;
}

/* File list */
.file-list {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.file-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.file-list-header h3 { font-size: .95rem; }
.btn-add-more {
  font-size: .85rem;
  color: var(--red);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.btn-add-more:hover { background: var(--red-light); }

#fileListItems { display: flex; flex-direction: column; gap: 10px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  animation: fadeInUp .25s ease both;
  cursor: grab;
  user-select: none;
  transition: box-shadow .15s, opacity .15s, border-color .15s;
}
.file-item:active { cursor: grabbing; }
.file-item.drag-over {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(232,71,63,.18);
  background: #fff5f5;
}
.file-item.dragging {
  opacity: .38;
  border-style: dashed;
}
.file-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drag-handle {
  display: flex;
  align-items: center;
  color: #bbb;
  flex-shrink: 0;
  cursor: grab;
  padding: 0 2px;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 16px; height: 16px; }
.file-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.file-item-meta { flex: 1; min-width: 0; }
.file-item-meta strong {
  display: block;
  font-size: .9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item-meta span { font-size: .8rem; color: var(--text-3); }
.file-item-remove {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.file-item-remove:hover { background: #fdecea; color: var(--red); }
.file-item-remove svg { width: 16px; height: 16px; }

.file-list-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.btn-sm { padding: 7px 16px; font-size: .875rem; }

/* Info cards */
.tool-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 24px auto 0;
}
.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.info-card:hover { border-color: var(--red); box-shadow: var(--shadow-sm); }
.info-icon { font-size: 1.6rem; margin-bottom: 10px; }
.info-card h4 { font-size: .9rem; margin-bottom: 6px; }
.info-card p { font-size: .82rem; color: var(--text-3); line-height: 1.55; }

/* ── Processing Card ── */
.processing-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.processing-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proc-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--red);
  border-right-color: rgba(232,71,63,.3);
  animation: spin 1.2s linear infinite;
}
.proc-planet {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232,71,63,.6);
}
.proc-pdf-icon { z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.processing-card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.processing-card > p { color: var(--text-2); margin-bottom: 28px; font-size: .95rem; }

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8473F, #FF6B6B);
  border-radius: 50px;
  width: 0%;
  transition: width .4s ease;
  box-shadow: 0 0 8px rgba(232,71,63,.4);
}
.progress-pct {
  font-size: .875rem;
  font-weight: 700;
  color: var(--red);
  min-width: 36px;
  text-align: right;
}

.processing-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 320px; margin: 0 auto; }
.proc-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--text-2);
  transition: var(--transition);
}
.proc-step.dim { color: var(--text-3); }
.proc-step.done { color: #27AE60; font-weight: 500; }
.ps-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  transition: var(--transition);
}
.ps-dot.loading {
  background: none;
  border: 2px solid var(--red);
  border-top-color: transparent;
  animation: spin .8s linear infinite;
}
.ps-dot.done-dot {
  background: #27AE60;
  color: #fff;
}
.ps-dot.done-dot::after { content: '✓'; }

/* ── Download Card ── */
.download-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px 32px 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
  margin-bottom: 24px;
}
.download-success-icon { margin: 0 auto 24px; animation: popIn .4s cubic-bezier(0.175,0.885,0.32,1.275) both; }
@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.download-card h2 { font-size: 1.75rem; margin-bottom: 8px; }
.dl-subtitle { color: var(--text-2); margin-bottom: 28px; font-size: 1rem; }

.dl-file-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 28px;
  text-align: left;
}
.dl-file-icon svg { width: 48px; height: 48px; flex-shrink: 0; }
.dl-file-meta strong { display: block; font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.dl-file-meta span { font-size: .83rem; color: var(--text-3); }

.download-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
  color: #fff;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(39,174,96,.4);
  transition: var(--transition);
  animation: pulseGreen 2s ease-in-out infinite;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(39,174,96,.5);
  animation: none;
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 6px 20px rgba(39,174,96,.4); }
  50% { box-shadow: 0 6px 28px rgba(39,174,96,.7); }
}

.download-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: var(--text-2);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-text:hover { background: var(--bg-soft); color: var(--red); }
.dot-sep { color: var(--text-3); }

.auto-delete-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-3);
  background: var(--bg-soft);
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
}

/* ── QR Code Section ── */
.qr-section {
  margin-top: 28px;
}
.qr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: .8rem;
  margin-bottom: 20px;
}
.qr-divider::before,
.qr-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-wrap canvas {
  border-radius: 12px;
  border: 3px solid var(--border);
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: block;
}
.qr-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-3);
  margin: 0;
}

/* ── Related Tools ── */
.related-tools { margin-top: 12px; }
.related-tools h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.related-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
.related-card-icon svg { width: 100%; height: 100%; }
.related-card strong { font-size: .875rem; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .tool-hero-inner { flex-direction: column; text-align: center; align-items: center; }
  .tool-hero-text p { margin: 0 auto; }
  .upload-card { padding: 16px 14px; }
  .upload-actions { flex-direction: column; align-items: stretch; }
  .upload-actions .btn { justify-content: center; }
  .upload-or { text-align: center; }
  .tool-info-grid { grid-template-columns: 1fr; }
  .upload-page-hero { padding: 32px 16px 24px; }
  .uph-title { font-size: 1.8rem; }
  .upload-zone-clean { padding: 40px 20px 36px; }
  .btn-select-main { min-width: 100%; padding: 16px 24px; font-size: 1rem; }
  .uzc-btn-row { flex-wrap: wrap; }
  .uzc-cloud-stack { flex-direction: row; }
  .processing-card { padding: 40px 24px; }
  .download-card { padding: 40px 24px 36px; }
  .step-header { gap: 4px; }
  .step-pill { padding: 6px 12px; font-size: .78rem; }
  .step-line { min-width: 12px; }
  .dl-file-info { flex-direction: column; text-align: center; }
}
