/*
 * Styles for rhizz mdbook output.
 *
 * Compiled ```rhizz blocks and ```rhizz-project fences render as live
 * iframes (see js/rhizz-embed.js); what remains here is the embed chrome
 * plus the panels for non-compiled content (```rhizz,ignore notices and
 * tool-error fallbacks).
 *
 * Theme-aware: mdbook applies the active theme as a class on <html>
 * (.light / .coal / .navy / .ayu / .rust; html:not(.js) defaults to light).
 * Neutral colors below follow the active theme; light defaults in :root,
 * dark-theme overrides under .coal/.navy/.ayu.
 */

:root,
html:not(.js) {
  --rhizz-neutral-bg: #f4f6f7;
  --rhizz-neutral-border: #90a4ae;
  --rhizz-neutral-head-bg: #cfd8dc;
  --rhizz-neutral-head-fg: #37474f;
  --rhizz-neutral-fg: #455a64;
}

/* dark themes */
.coal,
.navy,
.ayu {
  --rhizz-neutral-bg: #1f2124;
  --rhizz-neutral-border: #43484d;
  --rhizz-neutral-head-bg: #2b2f33;
  --rhizz-neutral-head-fg: #c3cbd1;
  --rhizz-neutral-fg: #aeb6bc;
}

/* ── panel chrome ─────────────────────────────────────────────────── */

.rhizz-diag {
  /*margin: 0.9rem 0 1.4rem;*/
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  overflow: hidden;
}

.rhizz-head {
  padding: 0.45rem 0.8rem;
  font-weight: 600;
}

/* not-compiled / tool-error panels */
.rhizz-ignore,
.rhizz-tool {
  border-color: var(--rhizz-neutral-border);
  background: var(--rhizz-neutral-bg);
}

.rhizz-ignore .rhizz-head,
.rhizz-tool .rhizz-head {
  background: var(--rhizz-neutral-head-bg);
  color: var(--rhizz-neutral-head-fg);
}

.rhizz-tool .rhizz-msg {
  margin: 0;
  padding: 0.5rem 0.8rem;
  color: var(--rhizz-neutral-fg);
}

/* ── interactive project embeds (rhizz-project) ─────────────────────── */

.rhizz-project {
  margin: 0.9rem 0 1.4rem;
}

.rhizz-project iframe {
  display: block;
  background: var(--quote-bg, #f4f6f7);
  border: none !important;
}
