/* Images to PDF Converter — matches the Deecliq Data Transfer shape exactly. */
.itp-fit.itp-scope {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 1600px; margin: 0 auto;
  padding: 90px 4vw 60px;
}

.itp-hero { text-align: center; flex-shrink: 0; }
.itp-hero h1 {
  font-size: 1.5rem !important; font-weight: 800 !important;
  color: var(--brand, #10b981) !important;
  margin: 0 0 4px !important;
}
#itpScope .itp-hero p {
  font-size: .85rem !important; color: var(--txt-2, #64748b) !important;
  margin: 0 !important;
}

#itpScope .itp-card {
  max-width: 100% !important; width: 100%;
  padding: 24px 32px !important;
  background: var(--page-bg, #f8fafc) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  box-shadow: none !important;
  margin: 0 auto !important;
}
.itp-input-view { display: flex; flex-direction: column; }

.itp-input-section { display: flex; min-height: 280px; }
.itp-scope .itp-dropzone {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 26px 20px;
  border: 2px dashed var(--brand, #10b981);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--txt, #0f172a);
  background: transparent;
  transition: border-color .2s ease, background .2s ease;
}
.itp-scope .itp-dropzone:hover,
.itp-scope .itp-dropzone.itp-dragover {
  border-color: var(--brand-dark, #059669);
  background: rgba(16,185,129,.05);
}
.itp-scope .itp-dropzone i {
  color: var(--brand, #10b981);
  font-size: 2.2rem;
  display: inline-block;
  animation: itpIconFloat 2.4s ease-in-out infinite;
}
@keyframes itpIconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .itp-scope .itp-dropzone i { animation: none; }
}
.itp-drop-title { font-weight: 700; margin-top: 10px; font-size: .95rem; color: var(--txt, #0f172a); }
.itp-drop-sub { font-size: .8rem; opacity: .65; margin-top: 4px; color: var(--txt-2, #64748b); }

.itp-shake { animation: itpShake .4s ease; }
@keyframes itpShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .itp-shake { animation: none; }
}

.itp-error {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--page-bg, #f8fafc);
  border: 1px dashed var(--brand, #10b981);
  color: var(--txt, #0f172a); font-size: .85rem;
}

/* ── Multi-image list — drag the handle to reorder, matches PDF Merger. ── */
.itp-file-list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px; font-size: .82rem; color: var(--txt-2, #64748b);
}
.itp-add-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand, #10b981); font-weight: 700; font-size: .82rem;
  cursor: pointer;
}
.itp-add-more:hover { text-decoration: underline; }

.itp-file-list {
  list-style: none; margin: 8px 0 0; padding: 4px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 420px; overflow-y: auto;
  border: 1px solid var(--border, #e2e8f0); border-radius: 12px;
  background: var(--page-bg, #f8fafc);
}
.itp-file-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.itp-file-chip.itp-chip-dragging {
  opacity: .85; box-shadow: 0 10px 24px rgba(0,0,0,.18);
  border-color: var(--brand, #10b981);
  position: relative;
}
.itp-chip-handle {
  color: var(--txt-2, #64748b); font-size: 1rem; flex-shrink: 0;
  cursor: grab; touch-action: none;
  padding: 6px; margin: -6px;
}
.itp-chip-handle:active { cursor: grabbing; }
.itp-chip-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--txt-2, #64748b);
}
.itp-chip-thumb {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px;
  object-fit: cover; border: 1px solid var(--border, #e2e8f0);
}
.itp-chip-name { flex: 1; min-width: 0; font-weight: 600; font-size: .85rem; color: var(--txt, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itp-chip-size { font-size: .76rem; color: var(--txt-2, #64748b); flex-shrink: 0; }
.itp-chip-remove {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--red, #ef4444); border: none; border-radius: 50%;
  color: #fff; font-size: .78rem; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.itp-chip-remove:hover { background: #dc2626; transform: scale(1.08); }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }

#itpScope #itpUploadBtn,
#itpScope #itpDownloadBtn,
#itpSettingsModal #itpSettingsConfirmBtn {
  background: linear-gradient(135deg, var(--brand, #10b981), var(--brand-dark, #059669));
  border: none;
  padding: 13px 26px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(16,185,129,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#itpScope #itpUploadBtn:hover,
#itpScope #itpDownloadBtn:hover,
#itpSettingsModal #itpSettingsConfirmBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16,185,129,.45);
}
#itpScope #itpUploadBtn:active,
#itpScope #itpDownloadBtn:active,
#itpSettingsModal #itpSettingsConfirmBtn:active { transform: translateY(0); }
#itpScope .btn-warning { padding: 13px 26px; font-weight: 700; font-size: .95rem; border-radius: 12px; }

/* ── Processing screen — identical ring + step pattern as Transfer. ── */
.itp-processing { padding: 10px 0 4px; }

.itp-ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 18px; }
.itp-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.itp-ring-track { fill: none; stroke: var(--border, #e2e8f0); stroke-width: 8; }
.itp-ring-fill {
  fill: none; stroke: var(--brand, #10b981); stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset .2s ease;
  filter: drop-shadow(0 0 6px rgba(16,185,129,.45));
}
.itp-ring-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--txt, #0f172a);
}
.itp-ring-count { font-size: 2.1rem; line-height: 1; }
.itp-ring-percent { font-size: 1.1rem; opacity: .7; margin-left: 2px; }

.itp-process-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 22px;
}
.itp-process-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700;
  color: var(--txt-2, #64748b);
  opacity: .55;
  transition: opacity .2s ease;
}
.itp-process-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface, #fff);
  border: 2px solid var(--border, #e2e8f0);
  color: var(--txt-2, #64748b);
  font-size: .9rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.itp-process-line { width: 36px; height: 2px; background: var(--border, #e2e8f0); }
.itp-process-step.itp-step-active { opacity: 1; }
.itp-process-step.itp-step-active .itp-process-icon {
  border-color: var(--brand, #10b981);
  color: var(--brand, #10b981);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
  animation: itpPulseStep 1.3s ease-in-out infinite;
}
.itp-process-step.itp-step-done { opacity: 1; }
.itp-process-step.itp-step-done .itp-process-icon {
  border-color: #16a34a; color: #fff; background: #16a34a;
}
@keyframes itpPulseStep {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
  50%      { box-shadow: 0 0 0 8px rgba(16,185,129,.04); }
}
@media (prefers-reduced-motion: reduce) {
  .itp-process-step.itp-step-active .itp-process-icon { animation: none; }
}

.itp-progress-text { font-size: .85rem; margin-top: 10px; color: var(--txt, #0f172a); font-weight: 600; text-align: center; }

/* ── Result screen ── */
.itp-result-icon { text-align: center; font-size: 2.6rem; color: #16a34a; margin-bottom: 6px; }
.itp-autosave { margin-top: 10px; text-align: center; font-size: .82rem; color: var(--txt-2, #64748b); }

.hidden { display: none !important; }
#itpScope .controls.hidden { display: none !important; }

/* ── Settings modal — same pattern as Compress PDF's modal. ── */
.itp-modal {
  position: fixed; inset: 0; z-index: 100001;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.itp-modal.itp-modal-open { display: flex; }
.itp-modal-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.6);
  animation: itpFadeIn .15s ease;
}
.itp-modal-box {
  position: relative; z-index: 1;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  padding: 28px 30px;
  border-radius: 18px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  animation: itpPopIn .18s ease;
}
.itp-modal-box h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--txt, #0f172a); margin: 0 0 16px; padding-right: 36px;
}
.itp-modal-box h3 i { color: var(--brand, #10b981); }
.itp-modal-file-info { font-size: .82rem; color: var(--txt-2, #64748b); margin: 0 0 16px; word-break: break-all; }
.itp-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--page-bg, #f8fafc); color: var(--txt-2, #64748b); border: 1px solid var(--border, #e2e8f0);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.itp-modal-close:hover { background: var(--brand, #10b981); color: #fff; border-color: var(--brand, #10b981); }
@keyframes itpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes itpPopIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .itp-modal-backdrop, .itp-modal-box { animation: none; }
}
#itpSettingsModal .form-group { margin-bottom: 14px; }
#itpSettingsModal .controls { margin-top: 6px; }
