/* Background Remover page. Adds to base.css; never redefines its variables. */
.tool-hero { padding-top: 32px; padding-bottom: 8px; }
.tool-head { text-align: center; max-width: 760px; margin: 0 auto 8px; }
.tool-head h1 { margin-bottom: .3em; text-wrap: balance; }
.tool-sub { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--muted, #6b675e); margin: 0 0 12px; }

/* License bar */
.license-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin: 0 0 20px; font-size: .95rem; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1.5px solid var(--border, #e8e4da); background: var(--surface, #fff); font-weight: 700; font-size: .85rem; }
.badge[data-plan="pro"] { background: var(--accent, #e8a317); border-color: var(--accent, #e8a317); color: var(--accent-ink, #1b1a17); }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; color: var(--accent-deep, #8a5a00); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--fg, #1b1a17); }
.link-btn[aria-disabled="true"] { opacity: .8; }

/* Pro tags and locks */
.pro-tag { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; background: var(--accent-soft, #fdf1d4); color: var(--accent-deep, #8a5a00); border: 1px solid var(--accent, #e8a317); }
.pro-tag::before { content: ""; width: .85em; height: .85em; background: currentColor; -webkit-mask: var(--lock) center / contain no-repeat; mask: var(--lock) center / contain no-repeat; }
:root { --lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9h-1V7a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2Zm-7-2a2 2 0 0 1 4 0v2h-4Z'/%3E%3C/svg%3E"); }
body[data-plan="pro"] .pro-tag { display: none; }

/* Dropzone */
.workspace { display: grid; gap: 14px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: clamp(220px, 38vh, 340px); padding: 28px 20px; cursor: pointer;
  border: 2.5px dashed var(--accent, #e8a317); border-radius: calc(var(--radius, 14px) + 6px);
  background: linear-gradient(180deg, var(--surface, #fff), var(--accent-soft, #fdf1d4));
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragging { box-shadow: var(--shadow, 0 8px 24px rgba(27,26,23,.08)); background: var(--accent-soft, #fdf1d4); }
.dropzone.dragging { transform: scale(1.01); border-style: solid; }
.dz-icon { width: 56px; height: 56px; color: var(--accent-deep, #8a5a00); }
.dz-title { font-size: clamp(1.2rem, 3.5vw, 1.6rem); font-weight: 700; margin: 8px 0 2px; }
.dz-link { text-decoration: underline; text-underline-offset: 4px; }
.dz-paste, .dz-hint { margin: 2px 0; color: var(--muted, #6b675e); font-size: .95rem; }
kbd { font: .85em var(--font-mono, monospace); background: var(--surface, #fff); border: 1px solid var(--border, #e8e4da); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

.model-status { padding: 14px 16px; border: 1px solid var(--border, #e8e4da); border-radius: var(--radius, 14px); background: var(--surface, #fff); }
.model-text { margin: 0 0 8px; font-size: .95rem; }
progress { width: 100%; height: 10px; accent-color: var(--accent, #e8a317); }

.notice { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft, #fdf1d4); border: 1px solid var(--accent, #e8a317); }
.notice[data-kind="error"] { background: #fdecea; border-color: #c0392b; }
.notice-warn { background: #fff4e0; }

.unsupported { max-width: 640px; margin: 8px auto 0; }

/* Options */
.opts { border: 1px solid var(--border, #e8e4da); border-radius: var(--radius, 14px); background: var(--surface, #fff); padding: 0 16px; }
.opts summary { cursor: pointer; padding: 14px 0; font-weight: 600; min-height: 44px; }
.opts-grid { display: grid; gap: 18px; padding: 0 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt label { font-weight: 600; display: block; margin-bottom: 4px; }
.opt .check { display: flex; gap: 8px; align-items: flex-start; }
.opt input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent, #e8a317); }
.opt input[type="text"], .opt select, .modal input[type="text"] {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: inherit;
  border: 1.5px solid var(--border, #e8e4da); border-radius: 10px; background: var(--surface, #fff);
}
.opt input[readonly] { background: #f4f1e8; cursor: pointer; }
.opt-help { margin: 6px 0 0; font-size: .85rem; color: var(--muted, #6b675e); }
code { font-family: var(--font-mono, monospace); font-size: .9em; background: #f4f1e8; padding: 0 4px; border-radius: 4px; }

/* Results */
.results { margin-top: 24px; }
.results[hidden], [hidden] { display: none !important; }
.batch-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.batch-summary { margin: 0; font-weight: 600; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: .9rem; }

.results-layout { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
.results:not([data-count="1"]) .results-layout { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 70vh; overflow: auto; }
.item-list.single { display: none; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border, #e8e4da); border-radius: 12px; background: var(--surface, #fff); }
.item.selected { border-color: var(--accent, #e8a317); box-shadow: 0 0 0 2px var(--accent-soft, #fdf1d4); }
.item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item-meta { font-size: .8rem; color: var(--muted, #6b675e); text-align: right; }
.item-status { font-size: .85rem; color: var(--muted, #6b675e); grid-column: 1 / 2; overflow-wrap: anywhere; }
.item[data-status="error"] .item-status { color: #b3261e; }
.item[data-status="done"] .item-status { color: #2e7d32; }
.item-bar { grid-column: 1 / -1; }
.item-actions { grid-column: 2; grid-row: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item-actions .btn { min-width: 44px; }

/* Viewer + compare */
.viewer { display: grid; gap: 16px; min-width: 0; }
.cmp-stage {
  position: relative; width: 100%; max-height: 72vh; margin: 0 auto; overflow: hidden; touch-action: pan-y;
  border-radius: var(--radius, 14px); border: 1px solid var(--border, #e8e4da); user-select: none; cursor: ew-resize;
}
.checker { background-color: #fff; background-image: linear-gradient(45deg, #d9d6cd 25%, transparent 25%, transparent 75%, #d9d6cd 75%), linear-gradient(45deg, #d9d6cd 25%, transparent 25%, transparent 75%, #d9d6cd 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.cmp-after, .cmp-before { position: absolute; inset: 0; }
.cmp-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); background: #fff; }
.cmp-stage img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.cmp-handle {
  position: absolute; top: 50%; left: var(--pos, 50%); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent, #e8a317); color: var(--accent-ink, #1b1a17); font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); border: 2px solid #fff;
}
.cmp-label { position: absolute; bottom: 8px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(27,26,23,.72); color: #fff; pointer-events: none; }
.cmp-label-l { left: 8px; }
.cmp-label-r { right: 8px; }
.viewer-meta { margin: 8px 0 0; font-size: .9rem; color: var(--muted, #6b675e); text-align: center; overflow-wrap: anywhere; }

.bg-picker { border: 1px solid var(--border, #e8e4da); border-radius: var(--radius, 14px); padding: 10px 14px 14px; background: var(--surface, #fff); margin: 0; min-width: 0; }
.bg-picker legend { font-weight: 700; padding: 0 6px; }
.bg-options { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-opt { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border: 1.5px solid var(--border, #e8e4da); border-radius: 999px; cursor: pointer; background: var(--surface, #fff); font-weight: 500; }
.bg-opt input[type="radio"] { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bg-opt:has(input[type="radio"]:checked) { border-color: var(--fg, #1b1a17); box-shadow: 0 0 0 2px var(--accent, #e8a317); }
.bg-opt:has(input[type="radio"]:focus-visible) { outline: 3px solid var(--accent, #e8a317); outline-offset: 2px; }
.bg-opt .sw, .bg-opt input[type="color"] { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border, #cfc9b8); padding: 0; flex: none; position: relative; z-index: 1; }
.bg-opt input[type="color"] { background: none; cursor: pointer; }
/* Label text sits in its own span so it can be translated without re-creating the radio input. */
.bg-opt .bg-text { display: inline-flex; align-items: center; gap: 8px; }
.sw-checker { background-color: #fff; background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.sw-image { background: linear-gradient(135deg, #7ec8e3, #f6d365); }

.dl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-help { margin: 0; font-size: .85rem; color: var(--muted, #6b675e); }

/* Dialogs */
.modal { border: 0; padding: 0; border-radius: calc(var(--radius, 14px) + 4px); max-width: min(480px, calc(100vw - 24px)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.35); color: var(--fg, #1b1a17); background: var(--surface, #fff); }
.modal::backdrop { background: rgba(27, 26, 23, .55); }
.modal-body { padding: 24px; display: block; }
.modal h2 { font-size: 1.4rem; }
.modal label { display: block; font-weight: 600; margin-bottom: 4px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pro-list { padding-left: 1.2em; margin: 0 0 4px; }
.form-error { color: #b3261e; margin: 8px 0 0; font-weight: 600; }

/* SEO content */
.content { padding-top: 48px; }
.steps { padding-left: 1.3em; display: grid; gap: 10px; max-width: 70ch; }
.privacy-proof { max-width: 760px; background: var(--accent-soft, #fdf1d4); }
.table-wrap { overflow-x: auto; }
.plans { width: 100%; border-collapse: collapse; background: var(--surface, #fff); border: 1px solid var(--border, #e8e4da); }
.plans th, .plans td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border, #e8e4da); }
.plans thead th { background: #f4f1e8; }
.faq details { border-bottom: 1px solid var(--border, #e8e4da); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; }
.faq details p { margin: 0 0 12px; color: var(--muted, #6b675e); max-width: 70ch; }

@media (max-width: 760px) {
  .results:not([data-count="1"]) .results-layout { grid-template-columns: 1fr; }
  .item-list { max-height: 260px; }
}
@media (max-width: 400px) {
  .tool-hero { padding-top: 20px; }
  .dropzone { padding: 20px 12px; }
  .batch-actions .btn, .dl-row .btn { flex: 1 1 100%; }
  .modal-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone { transition: none; }
}
