/* Buzzlect AI visibility checker — scoped to .bzl-aiv / .bzl-aiv-mcp.
 * Colours come from the active theme's custom properties (buzzlect-red /
 * buzzlect-mosaic), with neutral fallbacks so it also works elsewhere. */
.bzl-aiv, .bzl-aiv-mcp {
  --bzl-bg: var(--black-2, #f4f7f2);
  --bzl-card: var(--black-3, #ffffff);
  --bzl-text: var(--white, #222521);
  --bzl-dim: var(--grey-dim, #6f6f78);
  --bzl-accent: var(--t-green, var(--red, #d8392b));
  --bzl-line: rgba(127, 127, 127, 0.25);
  --bzl-good: #1f7a4d;
  --bzl-mid: #a35f00;
  --bzl-bad: #b42318;
  color: var(--bzl-text);
  margin: 2rem 0;
}
.bzl-aiv *, .bzl-aiv-mcp * { box-sizing: border-box; }

.bzl-aiv-form { background: var(--bzl-bg); border: 1px solid var(--bzl-line); border-radius: 14px; padding: 1.4rem; }
.bzl-aiv-label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.bzl-aiv-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.bzl-aiv-row input, .bzl-aiv-lead input {
  flex: 1 1 240px; min-width: 0; font: inherit; color: var(--bzl-text); background: var(--bzl-card);
  border: 1px solid var(--bzl-line); border-radius: 10px; padding: 0.85rem 1rem;
}
.bzl-aiv-row input:focus, .bzl-aiv-lead input:focus { outline: 2px solid var(--bzl-accent); outline-offset: 1px; }
.bzl-aiv-row .btn, .bzl-aiv-lead .btn { flex: 0 0 auto; cursor: pointer; border: 0; }
.bzl-aiv .btn:disabled { opacity: 0.6; cursor: wait; }
.bzl-aiv-note { color: var(--bzl-dim); font-size: 0.86rem; margin: 0.6rem 0 0; }
.bzl-aiv-status { margin: 1rem 0; font-weight: 500; min-height: 1.2em; }

.bzl-aiv-result { display: grid; gap: 1.2rem; }
.bzl-aiv-head { display: flex; gap: 1.2rem; align-items: center; background: var(--bzl-bg); border-radius: 14px; padding: 1.3rem; }
.bzl-aiv-score {
  flex: 0 0 auto; width: 104px; height: 104px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; background: var(--bzl-bad);
}
.bzl-aiv-score[data-grade="A"], .bzl-aiv-score[data-grade="B"] { background: var(--bzl-good); }
.bzl-aiv-score[data-grade="C"] { background: var(--bzl-mid); }
.bzl-aiv-score-num { font-size: 2.2rem; line-height: 1; font-weight: 800; }
.bzl-aiv-score-of { font-size: 0.8rem; opacity: 0.9; }
.bzl-aiv-host { font-weight: 700; margin: 0 0 0.3rem; word-break: break-all; }
.bzl-aiv-summary { margin: 0; }

.bzl-aiv-block { border: 1px solid var(--bzl-line); border-radius: 14px; padding: 1.2rem 1.3rem; }
.bzl-aiv-block h3, .bzl-aiv-cta h3, .bzl-aiv-mcp h3 { margin: 0 0 0.8rem; font-size: 1.1rem; }

.bzl-aiv-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.bzl-aiv-chip { display: inline-flex; gap: 0.4rem; align-items: baseline; border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.82rem; background: rgba(31, 122, 77, 0.12); }
.bzl-aiv-chip em { font-style: normal; font-size: 0.75rem; color: var(--bzl-good); font-weight: 600; }
.bzl-aiv-chip[data-status="blocked"] { background: rgba(180, 35, 24, 0.12); }
.bzl-aiv-chip[data-status="blocked"] em { color: var(--bzl-bad); }
.bzl-aiv-chip[data-status="partly-blocked"] { background: rgba(163, 95, 0, 0.12); }
.bzl-aiv-chip[data-status="partly-blocked"] em { color: var(--bzl-mid); }
.bzl-aiv-basics { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.3rem; font-size: 0.92rem; }
.bzl-aiv-basics li::before { display: inline-block; width: 1.3em; font-weight: 700; }
.bzl-aiv-basics .is-ok::before { content: "✓"; color: var(--bzl-good); }
.bzl-aiv-basics .is-warn::before { content: "!"; color: var(--bzl-mid); }
.bzl-aiv-basics .is-bad::before { content: "✕"; color: var(--bzl-bad); }

.bzl-aiv-bar { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 2.5em; gap: 0.7rem; align-items: center; margin: 0.45rem 0; font-size: 0.92rem; }
.bzl-aiv-bar-track { height: 10px; border-radius: 99px; background: var(--bzl-bg); overflow: hidden; }
.bzl-aiv-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--bzl-bad); }
.bzl-aiv-bar-fill[data-level="good"] { background: var(--bzl-good); }
.bzl-aiv-bar-fill[data-level="mid"] { background: var(--bzl-mid); }
.bzl-aiv-bar-num { text-align: right; font-weight: 600; }

.bzl-aiv-fixes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.8rem; }
.bzl-aiv-fixes li { display: flex; gap: 0.8rem; align-items: flex-start; }
.bzl-aiv-fixes p { margin: 0.2rem 0 0; color: var(--bzl-dim); font-size: 0.92rem; }
.bzl-aiv-sev { flex: 0 0 4.6rem; text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 6px; padding: 0.2rem 0; color: #fff; background: var(--bzl-dim); }
.bzl-aiv-sev[data-sev="high"] { background: var(--bzl-bad); }
.bzl-aiv-sev[data-sev="med"] { background: var(--bzl-mid); }

.bzl-aiv-cta { background: var(--bzl-bg); border-radius: 14px; padding: 1.4rem; border-left: 4px solid var(--bzl-accent); }
.bzl-aiv-cta > p { margin: 0 0 0.9rem; }
.bzl-aiv-lead { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.bzl-aiv-lead input { flex: 1 1 180px; }
.bzl-aiv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.bzl-aiv-book { display: inline-block; margin-top: 0.9rem; font-weight: 600; color: var(--bzl-accent); }

.bzl-aiv-badge summary, .bzl-aiv-mcp summary { cursor: pointer; font-weight: 600; }
.bzl-aiv-badge img { display: block; margin: 0.8rem 0; }
.bzl-aiv-badge textarea { width: 100%; font: 0.8rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0.6rem; border-radius: 8px; border: 1px solid var(--bzl-line); background: var(--bzl-card); color: var(--bzl-text); }

.bzl-aiv-mcp { border: 1px solid var(--bzl-line); border-radius: 14px; padding: 1.4rem; }
.bzl-aiv-copy { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 0.9rem 0; }
.bzl-aiv-copy code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; background: var(--bzl-bg); border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.85rem; }
.bzl-aiv-mcp-apps { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.bzl-aiv-mcp code { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .bzl-aiv-head { flex-direction: column; text-align: center; }
  .bzl-aiv-bar { grid-template-columns: 1fr 2.5em; }
  .bzl-aiv-bar-label { grid-column: 1 / -1; }
  .bzl-aiv-row .btn, .bzl-aiv-lead .btn { width: 100%; }
}

/* Theme .post-content rules (lists, strong, inputs) outrank single-class
   selectors, so restate the critical ones one level deeper. */
.bzl-aiv .bzl-aiv-score-num, .bzl-aiv .bzl-aiv-score-of { color: #fff; }
.bzl-aiv ul.bzl-aiv-chips, .bzl-aiv ul.bzl-aiv-basics, .bzl-aiv ol.bzl-aiv-fixes { list-style: none; padding-left: 0; margin-left: 0; }
.bzl-aiv ul.bzl-aiv-chips li, .bzl-aiv ul.bzl-aiv-basics li, .bzl-aiv ol.bzl-aiv-fixes li { margin: 0; padding-left: 0; }
.bzl-aiv ul.bzl-aiv-chips li::marker, .bzl-aiv ol.bzl-aiv-fixes li::marker { content: none; }
.bzl-aiv .bzl-aiv-sev { color: #fff; }
