/**
 * BitBot post design kit — styles the bb-post-* components that draftKitPost
 * renders into post_content (core blocks only). Ships with the plugin so kit
 * posts look designed on ANY theme; enqueued only on singular views whose
 * content contains bb-post-layout.
 *
 * Palette: neutral tints built on currentColor so the theme's own colors
 * carry the page; one accent var (--bb-accent) with a safe default that a
 * theme-stylist custom_css rule can override per site.
 */
/* The shell carries WordPress's own alignwide (the THEME grants whatever wide
   width it has — we never force one) and is a size container: the rail grid
   below engages only when the granted width is actually wide enough. Default
   is plain stacked flow, which renders correctly on every theme. */
.bb-post-shell {
  container-type: inline-size;
  container-name: bbpost;
}
.bb-post-layout {
  --bb-accent: #b4451f;
  --bb-line: color-mix(in srgb, currentColor 16%, transparent);
  --bb-surface: color-mix(in srgb, currentColor 5%, transparent);
  --bb-soft: color-mix(in srgb, var(--bb-accent) 10%, transparent);
  position: relative;
}
.bb-post-main { min-width: 0; }
@container bbpost (min-width: 640px) {
  .bb-post-layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 2.25rem;
    align-items: start;
  }
  .bb-side-rail { grid-column: 1 / -1; }
}
@container bbpost (min-width: 1000px) {
  .bb-post-layout { grid-template-columns: 13rem minmax(0, 1fr) 15rem; gap: 2.5rem; }
  .bb-side-rail { grid-column: auto; }
  /* No rail card supplied → run two-column; the article takes the space. */
  .bb-post-layout:not(:has(.bb-side-rail)) { grid-template-columns: 13rem minmax(0, 1fr); }
}

/* Component shell */
.bb-post-kit {
  border: 1px solid var(--bb-line);
  border-radius: 8px;
  background: var(--bb-surface);
  padding: 1.15rem 1.35rem;
  margin: 1.8rem 0;
}
.bb-kit-h {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bb-accent);
  margin: 0 0 0.7rem;
}

/* Standfirst */
.bb-standfirst { font-size: 1.15em; opacity: 0.75; }

/* Rails — plain boxes in stacked flow; sticky only once the grid engages. */
.bb-toc-rail, .bb-side-rail {
  margin: 0 0 1.8rem;
  font-size: 0.88rem;
}
@container bbpost (min-width: 640px) {
  .bb-toc-rail { position: sticky; top: 2rem; margin: 0; }
}
@container bbpost (min-width: 1000px) {
  .bb-side-rail { position: sticky; top: 2rem; margin: 0; }
}
.bb-toc-rail { padding: 1rem 1.1rem; }
.bb-toc-list { list-style: none; padding: 0 !important; margin: 0; }
.bb-toc-list li { margin: 0; }
.bb-toc-list a {
  display: block;
  text-decoration: none;
  padding: 0.32rem 0.6rem;
  border-left: 2px solid var(--bb-line);
  opacity: 0.75;
  line-height: 1.35;
}
.bb-toc-list a:hover { opacity: 1; }
.bb-toc-list a.bb-active {
  color: var(--bb-accent);
  border-left-color: var(--bb-accent);
  font-weight: 600;
  opacity: 1;
}
.bb-side-rail { border: 0; background: none; padding: 0; }
.bb-rail-pick {
  border: 1px solid var(--bb-line);
  border-radius: 8px;
  background: var(--bb-surface);
  padding: 1rem 1.1rem;
}
.bb-pick-name { font-weight: 700; margin: 0 0 0.2rem; }
.bb-pick-meta { font-size: 0.82rem; opacity: 0.75; margin: 0 0 0.7rem; }
.bb-rail-pick .wp-block-button__link { width: 100%; text-align: center; }

/* Takeaways */
.bb-takeaways { border-left: 4px solid var(--bb-accent); }
.bb-takeaways ul { margin: 0; padding-left: 1.1rem; }
.bb-takeaways li { margin-bottom: 0.35rem; }

/* Comparison table */
.bb-compare { margin: 1.4rem 0 2rem; overflow-x: auto; }
.bb-compare table { border-collapse: collapse; width: 100%; font-size: 0.92em; font-variant-numeric: tabular-nums; border: 0; }
.bb-compare th {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.65; text-align: left; padding: 0.55rem 0.8rem; border: 0; border-bottom: 2px solid var(--bb-line); white-space: nowrap;
}
.bb-compare td { padding: 0.65rem 0.8rem; border: 0; border-bottom: 1px solid var(--bb-line); vertical-align: top; }
.bb-compare tr.bb-pick-row td { background: var(--bb-soft); }
.bb-compare tr.bb-pick-row td:first-child { border-left: 3px solid var(--bb-accent); }
.bb-why { opacity: 0.65; font-size: 0.85em; }

/* Product card */
.bb-product .bb-rank {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bb-accent); margin: 0 0 0.25rem;
}
.bb-product .bb-pname { font-size: 1.25em; font-weight: 700; margin: 0 0 0.25rem; }
.bb-product .bb-pmeta { font-size: 0.9em; opacity: 0.75; margin: 0 0 0.8rem; }
.bb-proscons { gap: 1rem; margin-top: 1rem; }
.bb-proscons .bb-pc-h {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.4rem;
}
.bb-pros, .bb-cons { border-radius: 6px; padding: 0.85rem 1rem; }
.bb-pros { background: color-mix(in srgb, #2e7d32 9%, transparent); }
.bb-cons { background: color-mix(in srgb, #c62828 9%, transparent); }
.bb-pros .bb-pc-h { color: #2e7d32; }
.bb-cons .bb-pc-h { color: #c62828; }
.bb-pros ul, .bb-cons ul { margin: 0; padding-left: 1.05rem; font-size: 0.92em; }

/* CTA buttons */
.bb-buy .wp-block-button__link {
  background: var(--bb-accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
.bb-buy .wp-block-button__link:hover { filter: brightness(0.88); }

/* Callout */
.bb-callout { border-left: 4px solid #c62828; }
.bb-callout p { margin: 0; }

/* Verdict */
.bb-verdict { background: var(--bb-soft); border-color: var(--bb-accent); }
.bb-verdict p:last-of-type { margin-bottom: 0.4rem; }

/* FAQ */
.bb-faq { padding: 0.4rem 1.35rem; }
.bb-faq .wp-block-details { border-bottom: 1px solid var(--bb-line); padding: 0.7rem 0; margin: 0; }
.bb-faq .wp-block-details:last-child { border-bottom: 0; }
.bb-faq summary { font-weight: 600; cursor: pointer; }
.bb-faq .wp-block-details p { margin: 0.5rem 0 0.2rem; opacity: 0.8; }

/* Per-post affiliate notice — an agent-filled kit slot, not injected markup. */
.bb-affiliate-note {
  font-size: 0.82em;
  opacity: 0.78;
  border: 1px solid var(--bb-line);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
}

/* The site-wide disclosure footer strip is styled by its own style block
   printed with the markup (it renders on every page, including ones where
   this file isn't enqueued). */
