/* Backlink CSV Cleaner & Disavow Generator (/tools/backlink-cleaner/). Builds on shared sv-* / tl-* styles in tools.css. */
.bc-app { font-size: 14px; line-height: 1.5; color: #343a40; }
.bc-app * { box-sizing: border-box; }
.bc-app code { font-size: .92em; padding: 0 .3em; background: #f1f3f5; color: #2f4ac0; border-radius: 3px; word-break: break-all; }

/* Drop zone & input controls */
.bc-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
    padding: 24px 16px; border: 2px dashed #bac8ff; border-radius: 14px; background: #f8f9ff; color: #3b5bdb; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.bc-drop:hover, .bc-drop.is-over { border-color: #3b5bdb; background: #edf2ff; }
.bc-drop:focus-visible { outline: 2px solid #3b5bdb; outline-offset: 2px; }
.bc-drop-title { font-weight: 700; font-size: 15px; color: #1e3a8a; }
.bc-drop-sub { font-size: 12.5px; color: #64748b; max-width: 680px; }
.bc-actions { margin-top: 10px; align-items: center; }
.bc-brand-row {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; margin-top: 10px;
    padding-top: 10px; border-top: 1px solid #f1f3f5;
}
.bc-mini-field label { display: block; font-size: 12px; font-weight: 600; color: #495057; margin-bottom: 3px; }
.bc-mini-field input { height: 32px; font-size: 13px; padding: 4px 10px; }
.bc-paste { margin-top: 10px; }
.bc-paste[hidden], .bc-empty[hidden], .bc-report[hidden], .bc-colmap[hidden], .bc-pane[hidden] { display: none !important; }
.bc-paste-input { min-height: 150px; }
.bc-privacy { margin: 10px 0 0 !important; color: #2b8a3e; }
.bc-status { font-size: 13px; margin-top: 8px; word-break: break-word; }
.bc-status:empty { display: none; }
.bc-status.is-ok { color: #2b8a3e; }
.bc-status.is-bad { color: #c92a2a; }

/* Detected column mapping drawer */
.bc-colmap { margin-top: 10px; padding: 10px 12px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 10px; font-size: 12.5px; }
.bc-colmap summary { cursor: pointer; font-weight: 600; color: #495057; }
.bc-colmap-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px;
}
.bc-colmap-grid label { display: block; font-size: 11.5px; color: #64748b; margin-bottom: 2px; font-weight: 600; }
.bc-colmap-grid select { width: 100%; height: 30px; font-size: 12.5px; }

/* Banners & summary chips */
.bc-banner { padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: #fff9db; color: #8a5a00; font-size: 13px; border: 1px solid #ffec99; }
.bc-banner-info { background: #edf2ff; color: #1e3a8a; border-color: #dbe4ff; }
.bc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.bc-chip { background: rgba(255, 255, 255, .82); border: 1px solid rgba(15, 23, 42, .06); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.bc-chip-label { font-size: 11.5px; color: #5b6578; }
.bc-chip-value { font-size: 17px; font-weight: 700; color: #1e3a8a; font-variant-numeric: tabular-nums; word-break: break-word; }
.bc-chip-value small { font-size: 12px; font-weight: 500; color: #5b6578; margin-left: 3px; }
.bc-chip.is-warn .bc-chip-value { color: #c92a2a; }
.bc-chip.is-good .bc-chip-value { color: #2b8a3e; }

.tool-page .content .bc-h, .bc-h { font-size: 15px !important; font-weight: 700; color: #1e3a8a; margin: 0 0 10px !important; }

/* Findings */
.bc-app ul.bc-findings { list-style: none; margin: 0 !important; padding: 0; }
.bc-app .bc-finding { margin: 0 0 8px !important; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid rgba(15, 23, 42, .07); }
.bc-finding-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.bc-finding-title { font-weight: 700; color: #212529; flex: 1 1 220px; min-width: 0; }
.bc-finding.sev-ok .sv-sev { background: #ebfbee; color: #2b8a3e; }
.bc-finding-body { margin-top: 6px; font-size: 13px; color: #495057; line-height: 1.6; }
.bc-src { font-size: 12px; color: #868e96; margin-top: 4px; }
.bc-grade { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.bc-grade.g-A { background: #e7f5ff; color: #1864ab; }
.bc-grade.g-D { background: #f1f3f5; color: #495057; }

/* Main tabs */
.bc-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #e9ecef; margin: 0 0 14px; }
.bc-tab {
    border: 0; background: none; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #64748b;
    border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.bc-tab:hover { color: #1e3a8a; }
.bc-tab.is-active { color: #3b5bdb; border-bottom-color: #3b5bdb; }
.bc-tab-cnt { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: #edf2ff; color: #3b5bdb; font-variant-numeric: tabular-nums; }

/* Filter bar inside tabs */
.bc-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin-bottom: 12px;
    background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 10px; font-size: 13px;
}
.bc-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: #343a40; user-select: none; }
.bc-check input { accent-color: #3b5bdb; cursor: pointer; }
.bc-search { max-width: 240px; height: 30px !important; font-size: 13px !important; padding: 4px 9px !important; }
.bc-select-sm { height: 30px; border: 1px solid #dee2e6; border-radius: 6px; padding: 0 8px; background: #fff; font-size: 12.5px; color: #343a40; }
.bc-spacer { flex: 1 1 auto; }

/* Tables */
.bc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bc-app table.bc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 !important; }
.bc-app table.bc-table td code { white-space: nowrap; }
.bc-app table.bc-table th, .bc-app table.bc-table td {
    border: 0 !important; border-bottom: 1px solid #f1f3f5 !important; padding: 7px 6px !important; text-align: left; vertical-align: top;
}
.bc-app table.bc-table thead th { font-size: 12px; color: #868e96; font-weight: 600; white-space: nowrap; }
.bc-app table.bc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-tpl-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: #1e293b; word-break: break-word; }
.bc-tpl-tok { background: #edf2ff; color: #3b5bdb; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.bc-sub { font-size: 11.5px; color: #5b6578; margin-top: 2px; word-break: break-all; }
.bc-tight-row { margin: 0 !important; }

/* Pills */
.bc-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.bc-pill.p-spam { background: #ffe3e3; color: #c92a2a; }
.bc-pill.p-comm { background: #fff3bf; color: #d9480f; }
.bc-pill.p-brand { background: #ebfbee; color: #2b8a3e; }
.bc-pill.p-empty { background: #f1f3f5; color: #64748b; }
.bc-pill.p-other { background: #e7f5ff; color: #1864ab; }
.bc-pill.p-org { background: #f3f0ff; color: #5f3dc4; }
.bc-pill.p-commu { background: #e6fcf5; color: #0ca678; }
.bc-pill.p-media { background: #e7f5ff; color: #1864ab; }

/* Disavow builder grid */
.bc-disavow-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.bc-box { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.bc-box-title { font-size: 12.5px; font-weight: 700; color: #1e3a8a; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.bc-rule-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bc-disavow-out {
    width: 100%; min-height: 300px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    border: 1px solid #dee2e6; border-radius: 8px; padding: 10px 12px; background: #fff; color: #212529; resize: vertical;
}
.bc-val-list { list-style: none; margin: 8px 0 0 !important; padding: 0; font-size: 12.5px; }
.bc-val-list li { padding: 5px 8px; border-radius: 6px; margin: 0 0 4px !important; display: flex; gap: 8px; align-items: baseline; }
.bc-val-list li.v-err { background: #fff5f5; color: #c92a2a; }
.bc-val-list li.v-warn { background: #fff9db; color: #8a5a00; }
.bc-val-list li.v-ok { background: #ebfbee; color: #2b8a3e; }

/* Distribution bars */
.bc-dist-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.bc-bar-cell { display: flex; align-items: center; gap: 8px; }
.bc-mini-bar { flex: 1 1 80px; height: 7px; background: #f1f3f5; border-radius: 99px; overflow: hidden; max-width: 140px; }
.bc-mini-bar > span { display: block; height: 100%; background: #3b5bdb; border-radius: 99px; }
.bc-mini-bar.is-spam > span { background: #e03131; }

@media screen and (max-width: 900px) {
    .bc-disavow-grid, .bc-dist-grid, .bc-brand-row { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 600px) {
    .bc-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-chip-value { font-size: 15px; }
    .bc-search { max-width: 100%; width: 100%; }
}
