/* Revision Renamer – card, drop zone and button styles shared with 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: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
main.container { padding: 28px 20px 60px; }


/* Hero band */
.rr-hero { padding: 40px 0 34px; }
.rr-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.08; }
.rr-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: wait; }

.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); }

.table-scroll { overflow-x: auto; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); }
.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%; }
}

/* ---------- Revision Renamer additions ---------- */
.rr-hero p code, .field-help code, .output-note code { font: .9em var(--rm-mono); }
.rr-hero p code { color: var(--rm-amber); }
.drop-meta { margin: 12px 0 0 !important; font: .78rem var(--rm-mono); color: var(--rm-muted); }
.folder-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; font-weight: 600; }
.folder-line svg { width: 20px; height: 20px; fill: none; stroke: var(--rm-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.folder-line .rm-btn { margin-left: auto; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--rm-amber); border-radius: var(--rm-radius); background: var(--rm-surface); line-height: 1.5; }
.notice svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--rm-amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rev-row { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 16px; }
.field label { display: block; font: 600 .72rem var(--rm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rm-muted); margin-bottom: 6px; }
.field input {
  width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  color: var(--rm-text);
  font: 700 1.1rem var(--rm-mono);
  letter-spacing: .08em;
}
.field input:focus { outline: 2px solid var(--rm-primary); outline-offset: 1px; border-color: var(--rm-primary); }
.field-help { margin: 0 0 4px; font-size: .88rem; color: var(--rm-muted); }
.field-help .hl { color: var(--rm-primary); }

.table-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); }
.rr-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rr-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--rm-surface-2);
  color: var(--rm-muted);
  font: 600 .7rem var(--rm-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rm-border);
  white-space: nowrap;
}
.rr-table td { padding: 8px 12px; border-bottom: 1px solid var(--rm-border); vertical-align: top; }
.rr-table tbody tr:nth-child(even) { background: var(--rm-surface-2); }
.rr-table tbody tr:last-child td { border-bottom: 0; }
.rr-table .col-chk { width: 40px; text-align: center; }
.rr-table .col-num { width: 44px; text-align: center; font: .78rem var(--rm-mono); color: var(--rm-muted); }
.rr-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--rm-primary); cursor: pointer; }
.rr-table td.name { word-break: break-all; }
.rr-table .size { display: block; font: .72rem var(--rm-mono); color: var(--rm-muted); }
.rr-table .preview { display: inline-block; min-width: 3ch; padding: 1px 4px; margin: -1px -4px; border-radius: var(--rm-radius-sm); cursor: text; }
.rr-table .preview.is-new { color: var(--rm-primary); font-weight: 600; }
.rr-table .preview:focus { outline: 2px solid var(--rm-primary); background: var(--rm-surface); }
.rr-table .preview[contenteditable="false"] { cursor: default; }
.rr-table tr.is-off td { color: var(--rm-muted); }
.rr-table tr.is-bad .preview { color: var(--rm-danger); }
.rr-table .issue { display: block; font-size: .76rem; font-weight: 600; color: var(--rm-danger); }

.table-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { padding: 3px 10px; border: 1px solid var(--rm-border); border-radius: 999px; font: .76rem var(--rm-mono); color: var(--rm-muted); background: var(--rm-surface-2); }
.chip-bad { color: var(--rm-danger); border-color: var(--rm-danger); }
.clear-btn { margin-left: auto; color: var(--rm-danger); }
.action-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.rr-table td.empty { text-align: center; color: var(--rm-muted); padding: 28px 12px; }

.status-msg:empty { display: none; }
#statusMsg { margin: 14px 0 0; }

.rr-dialog { border: 1px solid var(--rm-border); border-radius: var(--rm-radius-lg); background: var(--rm-surface); color: var(--rm-text); padding: 22px 24px; width: min(380px, calc(100vw - 32px)); box-shadow: var(--rm-shadow-lg); }
.rr-dialog::backdrop { background: rgba(4, 16, 30, .6); }
.rr-dialog h3 { margin: 0 0 6px; font-size: 1.3rem; }
.rr-dialog p { margin: 0 0 14px; color: var(--rm-muted); font-size: .9rem; }
.rr-dialog fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; gap: 18px; flex-wrap: wrap; }
.rr-dialog legend { font: 600 .7rem var(--rm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rm-muted); margin-bottom: 6px; padding: 0; }
.rr-dialog label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rr-dialog input { accent-color: var(--rm-primary); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

@media (max-width: 560px) {
  .rev-row { flex-direction: column; align-items: stretch; }
  .field input { width: 100%; }
  .rr-table td.name { min-width: 150px; }
  .action-bar .rm-btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .action-bar .btn--large { flex-basis: 100%; }
}
