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

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

#wmkScope .wmk-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;
}
.wmk-input-view { display: flex; flex-direction: column; }

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

.wmk-file-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
}
.wmk-file-row i.fa-file-pdf { font-size: 1.4rem; color: var(--brand, #2563eb); }
.wmk-file-name { font-weight: 700; font-size: .88rem; color: var(--txt, #0f172a); word-break: break-all; }
.wmk-file-size { font-size: .76rem; color: var(--txt-2, #64748b); }
.wmk-remove {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand, #2563eb); border: none; border-radius: 50%;
  color: #fff; font-size: .85rem; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.wmk-remove:hover { background: #dc2626; transform: scale(1.08); }

.wmk-shake { animation: wmkShake .4s ease; }
@keyframes wmkShake {
  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) {
  .wmk-shake { animation: none; }
}

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

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

#wmkScope #wmkUploadBtn,
#wmkScope #wmkSettingsConfirmBtn,
#wmkScope #wmkDownloadBtn {
  background: linear-gradient(135deg, var(--brand, #2563eb), var(--brand-dark, #1d4ed8));
  border: none;
  padding: 13px 26px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37,99,235,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#wmkScope #wmkUploadBtn:hover,
#wmkScope #wmkSettingsConfirmBtn:hover,
#wmkScope #wmkDownloadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37,99,235,.45);
}
#wmkScope #wmkUploadBtn:active,
#wmkScope #wmkSettingsConfirmBtn:active,
#wmkScope #wmkDownloadBtn:active { transform: translateY(0); }
#wmkScope .btn-warning { padding: 13px 26px; font-weight: 700; font-size: .95rem; border-radius: 12px; }

.wmk-hint { font-size: .76rem; color: var(--txt-2, #64748b); margin-top: 6px; }

/* ── Page grid + side panel (iLovePDF-style) ── */
.wmk-workspace {
  display: flex; align-items: stretch;
  min-height: 70vh;
  border: 1px solid var(--border, #e2e8f0); border-radius: 14px; overflow: hidden;
  background: var(--page-bg, #f8fafc);
}

.wmk-thumb-panel { flex: 1; min-width: 0; padding: 28px; overflow-y: auto; max-height: 80vh; }

.wmk-grid-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.wmk-grid-toolbar .wmk-file-select {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff); color: var(--txt, #0f172a); font-size: .88rem; font-weight: 600;
}
.wmk-grid-hint { font-size: .78rem; color: var(--txt-2, #64748b); }

.wmk-thumb-grid {
  display: flex; flex-wrap: wrap; align-items: flex-start;
}

.wmk-thumb-tile { flex: 0 0 160px; margin: 0 13px 26px; display: flex; flex-direction: column; align-items: center; user-select: none; }
.wmk-thumb-frame {
  position: relative; width: 100%; height: 213px;
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface, #fff); padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.wmk-thumb-canvas-wrap {
  width: 100%; height: 100%; border-radius: 4px; overflow: hidden;
  background: #fff; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.wmk-thumb-canvas-wrap img, .wmk-thumb-canvas-wrap canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.wmk-thumb-label { margin-top: 8px; font-size: .82rem; color: var(--txt-2, #64748b); }

/* The little marker showing where the watermark will land on every page —
   purely a position preview, not a literal render of the text/image. */
.wmk-wm-dot {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red, #ef4444); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #fff;
}

.wmk-sidebar {
  flex: 0 0 320px; background: var(--surface, #fff);
  border-left: 4px solid var(--brand, #2563eb);
  padding: 26px 28px; display: flex; flex-direction: column;
}
.wmk-sidebar h2 { margin: 0 0 16px; font-size: 1.4rem; font-weight: 800; color: var(--txt, #0f172a); }
.wmk-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--border, #e2e8f0); margin-bottom: 14px;
  font-weight: 700; font-size: 1rem; color: var(--txt, #0f172a);
}
.wmk-reset-all { font-size: .82rem; font-weight: 600; color: var(--brand, #2563eb); text-decoration: underline; }
.wmk-reset-all:hover { color: var(--brand-dark, #1d4ed8); }
.wmk-file-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px;
  background: var(--brand-light, #e0f2fe); border-radius: 8px; font-size: .85rem; color: var(--txt, #0f172a);
}
.wmk-file-row i { color: var(--brand, #2563eb); }
.wmk-file-name { word-break: break-all; }
.wmk-sidebar { overflow-y: auto; }
.wmk-sidebar h2 { font-size: 1.5rem; }

/* Place text / Place image tabs */
.wmk-tabs { display: flex; border-bottom: 1px solid var(--border, #e2e8f0); margin-bottom: 18px; }
.wmk-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px 12px; background: none; border: none; border-bottom: 3px solid transparent;
  cursor: pointer; color: var(--txt-2, #64748b); font-size: .78rem; font-weight: 600;
}
.wmk-tab i { font-size: 1.3rem; }
.wmk-tab.wmk-tab-active { color: var(--brand, #2563eb); border-bottom-color: var(--brand, #2563eb); }

.wmk-field { margin-bottom: 16px; }
.wmk-field-label { display: block; font-weight: 700; font-size: .85rem; color: var(--txt, #0f172a); margin-bottom: 6px; }
.wmk-field-input, .wmk-field-select {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0); font-size: .88rem;
  background: var(--page-bg, #f8fafc); color: var(--txt, #0f172a);
}
.wmk-field-row { display: flex; gap: 12px; }
.wmk-field-row .wmk-field { flex: 1; min-width: 0; }

.wmk-text-format { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wmk-format-btn {
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff); color: var(--txt-2, #64748b); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .82rem;
}
.wmk-format-btn.wmk-format-active { background: var(--brand, #2563eb); color: #fff; border-color: var(--brand, #2563eb); }
.wmk-color-swatch { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border, #e2e8f0); padding: 0; cursor: pointer; }

.wmk-image-upload-btn {
  width: 100%; padding: 11px; border-radius: 8px; border: 1px solid var(--brand, #2563eb);
  background: var(--brand-light, #e0f2fe); color: var(--brand, #2563eb); font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.wmk-image-preview { margin-top: 10px; max-width: 100%; max-height: 90px; border-radius: 6px; border: 1px solid var(--border, #e2e8f0); display: none; }
.wmk-image-preview.wmk-has-image { display: block; }

.wmk-position-row { display: flex; align-items: center; gap: 14px; }
.wmk-position-grid {
  width: 84px; height: 84px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
}
.wmk-position-cell {
  border: 1px dashed var(--border, #e2e8f0); display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: none;
}
.wmk-position-cell .wmk-pos-dot { width: 12px; height: 12px; border-radius: 50%; background: transparent; }
.wmk-position-cell.wmk-position-active .wmk-pos-dot { background: var(--red, #ef4444); box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.wmk-mosaic-label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--txt, #0f172a); }

.wmk-sidebar-spacer { flex: 1; min-height: 18px; }
.wmk-remove-btn {
  width: 100%; border: none; border-radius: 12px; padding: 14px 18px;
  background: linear-gradient(135deg, var(--brand, #2563eb), var(--brand-dark, #1d4ed8));
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(37,99,235,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wmk-remove-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.45); }
.wmk-remove-btn:active { transform: translateY(0); }
.wmk-start-over {
  margin-top: 10px; width: 100%; background: none; border: none; cursor: pointer;
  font-size: .82rem; color: var(--txt-2, #64748b); padding: 6px 0;
}
.wmk-start-over:hover { color: var(--brand, #2563eb); }

@media (max-width: 760px) {
  .wmk-workspace { flex-direction: column; }
  .wmk-sidebar { flex: none; border-left: none; border-top: 4px solid var(--brand, #2563eb); }
}

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

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

.wmk-process-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 22px;
}
.wmk-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;
}
.wmk-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;
}
.wmk-process-line { width: 36px; height: 2px; background: var(--border, #e2e8f0); }
.wmk-process-step.wmk-step-active { opacity: 1; }
.wmk-process-step.wmk-step-active .wmk-process-icon {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
  animation: wmkPulseStep 1.3s ease-in-out infinite;
}
.wmk-process-step.wmk-step-done { opacity: 1; }
.wmk-process-step.wmk-step-done .wmk-process-icon {
  border-color: #16a34a; color: #fff; background: #16a34a;
}
@keyframes wmkPulseStep {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
  50%      { box-shadow: 0 0 0 8px rgba(37,99,235,.04); }
}
@media (prefers-reduced-motion: reduce) {
  .wmk-process-step.wmk-step-active .wmk-process-icon { animation: none; }
}

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

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

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