/* Shared wide layout for the Converter menu tools. */
.conv-page {
  --cv-ink: #172033;
  --cv-body: #3d4658;
  --cv-muted: #64748b;
  --cv-line: #e3e9f1;
  --cv-blue: #2563eb;
  --cv-aside: 230px;
  display: grid;
  grid-template-columns: var(--cv-aside) minmax(0, 1fr);
  gap: 18px 22px;
  align-items: start;
  margin: 4px 0 28px;
}
.conv-aside { display: flex; flex-direction: column; min-width: 0; padding-top: 8px; }
.conv-title {
  margin: 0 0 8px;
  color: var(--cv-ink);
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: left;
}
.article .conv-lede { margin: 0 0 16px; color: #3b4d9a; font-size: 1.02rem; line-height: 1.4; text-align: left; }
.article img.conv-art {
  display: block; width: 100%; max-width: 280px; height: auto; margin: 16px 0 0;
  border: 0; background: transparent; box-shadow: none; pointer-events: none;
}
.article .conv-perks { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.article .conv-perks li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; color: var(--cv-body); font-size: 0.8rem; line-height: 1.3; text-align: left; }
.article .conv-perks li::before { content: none; }
.conv-perks strong { display: block; color: var(--cv-ink); font-size: 0.88rem; }
.conv-perk { width: 36px; height: 36px; flex: none; border-radius: 50%; background: #fff center / 18px no-repeat; }
.conv-perk.is-online { background-color: #dcfce7; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2316a34a'/%3E%3Cpath d='m7 12.2 3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.conv-perk.is-fast { background-color: #ffe4e6; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e11d48' d='M13.5 2 4.5 13.5h6.2L9.8 22l9-11.5h-6.2z'/%3E%3C/svg%3E"); }
.conv-perk.is-doc { background-color: #dbeafe; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v5h5M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.conv-perk.is-device { background-color: #ede9fe; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2'%3E%3Crect x='8' y='2' width='8' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }

.conv-page .cpdf-app { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.conv-page .cpdf-app [hidden] { display: none !important; }
.conv-page .cpdf-side { width: auto; max-width: none; margin-top: 14px; padding: 0; background: transparent; }
.conv-page .cpdf-side .itool-hist-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; }
.conv-page .cpdf-app > .cpdf-success { margin: 0 0 12px; border: 1px solid #bbf7d0; border-radius: 16px; }

.conv-board { display: grid; grid-template-columns: minmax(340px, 1.05fr) minmax(300px, 0.95fr); gap: 12px; align-items: start; }
.conv-stack { display: grid; gap: 12px; min-width: 0; }
.conv-card { min-width: 0; padding: 14px; border: 1px solid var(--cv-line); border-radius: 16px; background: #fff; }
.conv-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px;
  list-style: none; border: 1px solid var(--cv-line); border-radius: 16px; background: #fff;
}
.article .conv-steps, .article .conv-steps li, .article .conv-tips ol, .article .conv-tips li { list-style: none; }
.article .conv-steps li::before { content: none; }
.conv-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.conv-steps li > span:first-child {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: #e2e8f0; color: #475569; font-size: 0.82rem; font-weight: 800;
}
.conv-steps strong, .conv-steps small { display: block; }
.conv-steps strong { color: var(--cv-ink); font-size: 0.8rem; }
.conv-steps small { color: var(--cv-muted); font-size: 0.7rem; line-height: 1.25; }
.conv-steps .is-done > span:first-child { background: #16a34a; color: #fff; }
.conv-steps .is-on > span:first-child { background: var(--cv-blue); color: #fff; }
.conv-steps .is-on strong { color: var(--cv-blue); }

.article h2.conv-card-title, .conv-card-title, .article .conv-tips h2 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--cv-ink);
  font-size: 1.02rem; font-weight: 800; text-align: left;
}
.article .conv-sub, .article .conv-note, .article .conv-page .cpdf-status, .article .conv-page .cpdf-hint {
  margin: 4px 0 10px; color: var(--cv-muted); font-size: 0.8rem; line-height: 1.35; text-align: left;
}
.article .conv-note a, .article .conv-tips a { color: var(--cv-blue); }
.conv-page .cpdf-status.is-error { color: #b91c1c; }
.conv-page .cpdf-status.is-ok { color: #15803d; }
.conv-page .cpdf-status.is-loading { color: var(--cv-blue); }

.conv-page .cpdf-app .cpdf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; }
.conv-page .cpdf-drop {
  gap: 8px; min-height: 0; margin: 0; padding: 22px 14px; border: 1.5px dashed #93c5fd;
  border-radius: 14px; background: #f5f9ff; box-shadow: none; text-align: center;
}
.conv-cloud {
  width: 54px; height: 54px; margin: 0 auto 4px; border-radius: 50%;
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232563eb' d='M7 18h10a4 4 0 0 0 .4-8 5 5 0 0 0-9.7-1.2A3.5 3.5 0 0 0 7 18z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' d='M12 16V9m0 0-2.2 2.2M12 9l2.2 2.2'/%3E%3C/svg%3E") center / 34px no-repeat;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}
.conv-page .cpdf-drop .cpdf-drop-title { color: var(--cv-ink); font-size: 1rem; font-weight: 800; }
.conv-page .cpdf-drop .cpdf-drop-hint { max-width: none; color: var(--cv-muted); }
.conv-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.conv-files { margin-top: 12px; }
.conv-files-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.conv-files-head h3 { margin: 0; color: var(--cv-ink); font-size: 0.88rem; }
.conv-files-head h3 span { color: var(--cv-muted); font-weight: 650; }
.conv-page .cpdf-list { max-height: 280px; overflow: auto; scrollbar-width: thin; scrollbar-color: #94a3b8 transparent; }
.conv-page .cpdf-list::-webkit-scrollbar { width: 4px; }
.conv-page .cpdf-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.conv-page .cpdf-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 8px; border-radius: 12px; box-shadow: none; }
.conv-page .cpdf-preview-pdf { width: 36px; height: 42px; border: 0; border-radius: 8px; background: #fee2e2; color: #dc2626; font-size: 0.68rem; }
.conv-page .cpdf-icon-btn { width: 32px; height: 32px; border: 1px solid var(--cv-line); border-radius: 8px; background: #f8fafc; }
.conv-page .cpdf-list-empty { margin: 0; padding: 8px 0; border: 0; background: transparent; font-style: normal; text-align: left; }

.conv-page .cpdf-field { margin: 0 0 12px; }
.conv-page .cpdf-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.conv-page .cpdf-preset {
  border: 1px solid var(--cv-line); border-radius: 999px; background: #fff; color: var(--cv-body);
  padding: 7px 12px; font-weight: 700;
}
.conv-page .cpdf-preset.is-active { border-color: #93c5fd; background: #f5f9ff; color: var(--cv-blue); }
.conv-page .cpdf-check { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.conv-page input[type="range"] { width: 100%; height: 28px; margin: 6px 0 0; padding: 0; border: 0; background: transparent; }
.conv-page select, .conv-page .cpdf-input, .conv-page textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--cv-line); border-radius: 10px;
  background: #fff; color: var(--cv-ink); font: inherit;
}
.conv-page textarea { min-height: 220px; resize: vertical; }
.conv-page .conv-go {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px;
  margin-top: 4px; border: 0; border-radius: 12px; background: #f5b400; color: #1f2937;
  font-size: 1rem; font-weight: 800; cursor: pointer;
}
.conv-page .conv-go:disabled { opacity: 0.55; cursor: not-allowed; }
.conv-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.conv-downloads .cpdf-btn { flex: 1 1 140px; }
.conv-stats { display: grid; gap: 6px; margin: 0; }
.conv-stats div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; color: var(--cv-muted); font-size: 0.82rem; }
.conv-stats span { flex: none; }
.conv-stats strong {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
  color: var(--cv-ink); font-weight: 700;
}
.conv-stats strong.is-muted { color: var(--cv-muted); font-weight: 650; }
.conv-page .cpdf-pass-row .cpdf-input { width: auto; flex: 1 1 auto; min-width: 0; margin-top: 0; }
.conv-page .ppdf-workspace { margin-top: 0; }
.conv-page .ppdf-preview-wrap { max-width: 100%; }
canvas#xpdf-preview { width: 100%; height: auto; margin-top: 10px; border-radius: 12px; background: #fff; }
.conv-page .ppdf-thumbs { margin-top: 8px; }

.conv-tips { padding: 14px; border: 1px solid #fde68a; border-radius: 16px; background: #fffbeb; }
.article .conv-tips ol { counter-reset: conv-tip; margin: 0; padding: 0; display: grid; gap: 8px; }
.article .conv-tips li { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--cv-body); font-size: 0.84rem; line-height: 1.35; text-align: left; }
.article .conv-tips li::before {
  content: counter(conv-tip); counter-increment: conv-tip; display: grid; place-items: center;
  width: 22px; height: 22px; flex: none; border-radius: 50%; background: #f59e0b; color: #fff; font-size: 0.75rem; font-weight: 800;
}

@media (min-width: 1360px) {
  .conv-page {
    --cv-w: min(1600px, calc(100vw - 96px));
    --cv-aside: clamp(230px, 16vw, 280px);
    width: var(--cv-w);
    margin-left: calc((100% - var(--cv-w)) / 2);
    column-gap: 26px;
  }
}
@media (max-width: 1100px) { .conv-board { grid-template-columns: 1fr; } .conv-page { --cv-aside: 200px; } }
@media (max-width: 980px) {
  .conv-page { grid-template-columns: minmax(0, 1fr); }
  .article .conv-perks, .article img.conv-art { display: none; }
}
@media (max-width: 720px) { .conv-steps { display: none; } }

html[data-theme="dark"] .conv-page { --cv-ink: #f1f5f9; --cv-body: #cbd5e1; --cv-muted: #94a3b8; --cv-line: #334155; }
html[data-theme="dark"] .article .conv-lede { color: #a5b4fc; }
html[data-theme="dark"] .conv-card,
html[data-theme="dark"] .conv-steps,
html[data-theme="dark"] .conv-page .cpdf-preset,
html[data-theme="dark"] .conv-page select,
html[data-theme="dark"] .conv-page .cpdf-input,
html[data-theme="dark"] .conv-page textarea { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .conv-page .cpdf-drop { background: #0f1b33; }
html[data-theme="dark"] .conv-tips { background: #3b2f12; border-color: #854d0e; }
html[data-theme="dark"] .conv-page .conv-go { color: #1f2937; }

@media (max-width: 1100px) {
  body.page-tarjar-pdf-online .conv-board { display: flex; flex-direction: column; }
  body.page-tarjar-pdf-online .conv-stack { display: contents; }
  body.page-tarjar-pdf-online .conv-steps { order: 1; }
  body.page-tarjar-pdf-online .tpdf-upload { order: 2; }
  body.page-tarjar-pdf-online #tpdf-workspace { order: 3; }
  body.page-tarjar-pdf-online .tpdf-actions { order: 4; }
  body.page-tarjar-pdf-online .tpdf-result { order: 5; }
  body.page-tarjar-pdf-online .conv-tips { order: 6; }
}
body.page-tarjar-pdf-online .tpdf-upload:has(#tpdf-drop[hidden]) { display: none; }
