/* PDF to CAD – based on PDF Compress (../PDFCompressTool/static/style.css);
   colours, fonts, tool bar and theme come from ../shared/rm-tools.css */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
main.container { padding: 28px 20px 60px; }

.pdf-mark { font: 700 .62rem var(--rm-mono); letter-spacing: .02em; }

/* Hero band */
.pdf-hero { padding: 40px 0 34px; }
.pdf-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.08; }
.pdf-hero p { margin: 0; max-width: 560px; }

.card {
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--rm-shadow-sm);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--rm-radius-sm);
  background: var(--rm-primary);
  color: var(--rm-primary-ink);
  font: 600 .8rem var(--rm-mono);
}

.dropzone {
  border: 2px dashed var(--rm-border);
  border-radius: var(--rm-radius);
  padding: 28px;
  text-align: center;
  color: var(--rm-muted);
  background: var(--rm-surface-2);
  transition: background 0.15s, border-color 0.15s;
}
.dropzone.is-dragover {
  background: var(--rm-primary-soft);
  border-color: var(--rm-primary);
}
.dropzone p { margin: 0 0 12px; }
.drop-icon { width: 34px; height: 34px; margin-bottom: 6px; fill: none; stroke: var(--rm-primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* The file input stays focusable (keyboard users tab to it) but is invisible; the label is the button */
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.browse-btn { position: relative; }
.browse-btn:focus-within { outline: 2px solid var(--rm-primary); outline-offset: 2px; }

.btn--large { padding: 12px 26px; font-size: 1rem; min-height: 46px; }
.btn--small { padding: 6px 12px; font-size: 0.82rem; min-height: 32px; }
.rm-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.file-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  overflow: hidden;
}
.file-list:empty { display: none; }
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  word-break: break-all;
}
.file-list li:nth-child(odd) { background: var(--rm-surface); }
.file-list li:nth-child(even) { background: var(--rm-surface-2); }
.file-list li > span:last-child { display: flex; align-items: center; flex-shrink: 0; }
.file-list .file-size { color: var(--rm-primary); margin-right: 14px; font: .82rem var(--rm-mono); white-space: nowrap; }
.file-list .remove-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--rm-radius-sm);
  background: none;
  color: var(--rm-danger);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.file-list .remove-btn:hover { border-color: var(--rm-danger); }

.level-select { display: flex; gap: 10px; }
.level-btn {
  flex: 1;
  border: 1px solid var(--rm-border);
  background: var(--rm-surface);
  border-radius: var(--rm-radius);
  padding: 12px 10px;
  cursor: pointer;
  font: 700 1.1rem var(--rm-head);
  letter-spacing: .03em;
  color: var(--rm-text);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color .15s, background .15s;
}
.level-btn span { font: 400 0.76rem var(--rm-body); letter-spacing: 0; color: var(--rm-muted); }
.level-btn:hover { border-color: var(--rm-primary); }
.level-btn.is-active { border-color: var(--rm-primary); background: var(--rm-primary-soft); box-shadow: inset 0 0 0 1px var(--rm-primary); }
.level-btn.is-active span { color: var(--rm-text); }

.action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.status-msg { font-size: 0.9rem; color: var(--rm-primary); }
.status-msg.is-error { color: var(--rm-danger); }

.output-note { font-size: 0.85rem; line-height: 1.6; color: var(--rm-muted); margin: 14px 0 0; }

@media (max-width: 560px) {
  .card { padding: 16px; }
  .level-select { flex-direction: column; }
  .action-row .btn--large { width: 100%; }
}

/* ---------- PDF to CAD additions ---------- */
.drop-meta { margin: 12px 0 0 !important; font: .78rem var(--rm-mono); color: var(--rm-muted); }
.list-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.file-summary { font: .82rem var(--rm-mono); color: var(--rm-muted); }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.option-label { font: 600 .72rem var(--rm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rm-muted); margin-bottom: 8px; }
.option-group .level-select { flex-direction: column; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .92rem; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--rm-primary); flex-shrink: 0; }
.check span { color: var(--rm-muted); }
.check b { color: var(--rm-text); font-weight: 600; }

.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-weight: 600; }
.log {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  padding: 14px 16px;
  background: var(--rm-surface-2);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  font: .8rem/1.55 var(--rm-mono);
  color: var(--rm-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.log .log-ok { color: var(--rm-success); }
.log .log-err { color: var(--rm-danger); font-weight: 600; }
.log .log-info { color: var(--rm-primary); font-weight: 600; }

.privacy-note { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--rm-muted); margin: 0; }
.privacy-note svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--rm-success); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  .option-grid { grid-template-columns: 1fr; }
  .result-bar .rm-btn { width: 100%; justify-content: center; }
}
