/* ================================================================
   Blacklist (fanen #tab-blacklist) — NoraBlacklist i assets/js/blacklist.js.
   Gjenbruker .card/.infobox/.results-toolbar/.tag-*; bare det som er
   eget for Blacklist står her. Alt på tema-variablene (fire temaer).
   ================================================================ */

/* Nav-telleren: «av» når blacklisten er slått av */
.nav-count.bl-av { background: var(--bg); color: var(--text-tertiary); font-weight: 500; }

/* ---------- Av/på-bryteren ---------- */
.bl-bryter {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  padding: 7px 12px 7px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.bl-bryter:hover { border-color: var(--accent); }
.bl-bryter input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bl-bryter-spor {
  position: relative; flex-shrink: 0; width: 36px; height: 20px; border-radius: 99px;
  background: var(--border); transition: background .15s;
}
.bl-bryter-spor::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.bl-bryter input:checked + .bl-bryter-spor { background: var(--accent); }
.bl-bryter input:checked + .bl-bryter-spor::after { transform: translateX(16px); }
.bl-bryter input:focus-visible + .bl-bryter-spor { outline: 2px solid var(--accent); outline-offset: 2px; }

.bl-info.bl-info-av svg { color: var(--text-tertiary); }

/* ---------- Legg til ---------- */
.bl-ny { margin-bottom: 14px; }
.bl-ny-rad { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bl-felt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bl-felt-navn { flex: 0 1 360px; }
.bl-flabel { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.bl-valgfri { font-weight: 400; color: var(--text-tertiary); }
.bl-tekst { width: 100%; resize: vertical; min-height: 120px; font-family: 'DM Mono', monospace; font-size: 12.5px; line-height: 1.55; }
.bl-ny-fot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.bl-linjer { font-size: 12.5px; color: var(--text-tertiary); }
.bl-linjer.over { color: var(--red); }
.bl-resultat {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  background: var(--accent-light); color: var(--accent);
}
.bl-resultat.advarsel { background: var(--orange-light); color: var(--orange); }
.bl-resultat .flink { font-weight: 600; text-decoration: underline; }

/* ---------- Lagringene ---------- */
.bl-lagringer { margin-left: auto; font-size: 12.5px; color: var(--text-tertiary); }
.bl-tabell td { vertical-align: middle; }
.bl-tabell .muted, .bl-detalj-tabell .muted { color: var(--text-tertiary); }
.bl-tabell tr.bl-rad { cursor: pointer; }
.bl-tabell tr.bl-rad.apen td { background: var(--surface-hover); }
.bl-tabell .bl-navn-celle { font-weight: 500; color: var(--text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.bl-tabell.uten-av .bl-kol-av { display: none; }
.bl-tabell .bl-flere { margin-left: 6px; white-space: nowrap; }
.bl-ikke { color: var(--red); font-weight: 500; }
.bl-handling {
  color: var(--text-tertiary); font-size: 12px; cursor: pointer; background: none; border: 0;
  font-family: inherit; padding: 2px 6px;
}
.bl-handling:hover { color: var(--accent); }
.bl-handling.bl-slett:hover { color: var(--red); }

.bl-tabell tr.bl-detalj > td { padding: 0; background: var(--surface-hover); cursor: default; }
.bl-detalj-inn { padding: 10px 14px 14px; max-height: 460px; overflow: auto; font-size: 12.5px; color: var(--text-secondary); }
.bl-detalj-tabell { width: 100%; border-collapse: collapse; }
.bl-detalj-tabell th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-tertiary); padding: 6px 8px; border-bottom: 1px solid var(--border);
  position: sticky; top: -10px; background: var(--surface-hover);
}
.bl-detalj-tabell td { padding: 6px 8px; border-bottom: 1px solid var(--border-light, var(--border)); }
.bl-detalj-tabell .td-mono { font-family: 'DM Mono', monospace; white-space: nowrap; }
.bl-detalj-tabell tr.bl-klikk { cursor: pointer; }
.bl-detalj-tabell tr.bl-klikk:hover td { color: var(--accent); }
.bl-vis-alle { margin-top: 10px; }

@media (max-width: 720px) {
  .bl-felt-navn { flex-basis: 100%; }
  .bl-tabell .bl-flere { display: block; margin: 3px 0 0; width: max-content; }
}
