/* ============================================================
   content-body.css  —  Shared Rich Content Styles
   Template    : any template that outputs Gutenberg post content
   Class       : .intone-content-body  (add to the content wrapper)
   Deps        : intone-design-system + intone-theme-tokens
   Version     : 1.0.0

   Used by
   ────────
   • Single blog posts        (single.php → .post-content.intone-content-body)
   • Case Studies             (future template → .intone-content-body)
   • White Papers             (future template → .intone-content-body)
   • Any Gutenberg-rich page

   Editor block mapping
   ────────────────────
   H2 heading          → section heading  (added to TOC on single posts)
   H3 heading          → sub-heading
   Quote block         → .cb-callout       gold left border
   Quote + class=light → .cb-callout--light  grey bg, gold left border
   Quote + class=dark-note → .cb-callout--dark  #141414 bg, white text
   Unordered list      → gold dot bullets
   Custom HTML block   → .cb-cards / .cb-card  two-column card grid
   Custom HTML block   → .cb-highlight     gold highlight strip

   Sections
   ────────
   1.  Base typography
   2.  Inline elements (links, code, strong)
   3.  Blockquote callouts (gold / light / dark variants)
   4.  Card grid (.cb-cards / .cb-card)
   5.  Highlight strip (.cb-highlight)
   6.  Media (images, figures, video)
   7.  Tables
   8.  Dark mode overrides
   ============================================================ */


/* ── 1. Base typography ──────────────────────────────────── */
.intone-content-body {
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1e2e4c;
}

.intone-content-body > * + * { margin-top: 24px; }

.intone-content-body p {
  font-size: 16px;
  line-height: 1.6;
  color: #1e2e4c;
  margin: 0 0 24px;
}

.intone-content-body h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e2e4c;
  margin: 40px 0 12px;
}

.intone-content-body h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e2e4c;
  margin: 32px 0 12px;
}

.intone-content-body h4 {
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1e2e4c;
  margin: 24px 0 8px;
}

.intone-content-body ol,
.intone-content-body ul {
  margin: 0 0 24px;
  padding-left: 24px;
}

.intone-content-body ol { list-style: decimal; }

/* Gold dot bullets for unordered lists */
.intone-content-body ul {
  list-style: none;
  padding-left: 0;
}

.intone-content-body ul li {
  padding-left: 22px;
  position: relative;
}

.intone-content-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6b43f;
  flex-shrink: 0;
}

.intone-content-body li {
  font-size: 16px;
  line-height: 1.6;
  color: #1e2e4c;
  margin-bottom: 6px;
}


/* ── 2. Inline elements ──────────────────────────────────── */
.intone-content-body a {
  color: #233963;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.intone-content-body a:hover { color: #b07613; }

.intone-content-body strong { font-weight: 700; color: #1e2e4c; }
.intone-content-body em    { font-style: italic; }

.intone-content-body code {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background: #f4f6f9;
  border-radius: 4px;
  padding: 2px 6px;
}

.intone-content-body pre {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background: #f4f6f9;
  border-radius: 4px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 24px;
}

.intone-content-body pre code {
  background: none;
  padding: 0;
}


/* ── 3. Blockquote callouts ──────────────────────────────── */

/* ── Default callout: white bg, 4px gold left border ── */
.intone-content-body .cb-callout,
.intone-content-body blockquote:not([class]),
.intone-content-body .wp-block-quote:not(.cb-callout--light):not(.cb-callout--dark) {
  border-left: 4px solid #f6b43f;
  background: #fff;
  padding: 20px 24px;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(9, 16, 29, 0.05);
}

.intone-content-body .cb-callout p,
.intone-content-body blockquote:not([class]) p,
.intone-content-body .wp-block-quote:not(.cb-callout--light):not(.cb-callout--dark) p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #1e2e4c;
}

.intone-content-body .cb-callout p + p,
.intone-content-body blockquote:not([class]) p + p,
.intone-content-body .wp-block-quote p + p {
  margin-top: 12px;
}

/* ── Light callout: grey bg, 4px gold left border ── */
/* Trigger: <blockquote class="light"> or Gutenberg Quote with Additional CSS class "light" */
.intone-content-body .cb-callout--light,
.intone-content-body blockquote.light,
.intone-content-body .wp-block-quote.light {
  border-left: 4px solid #f6b43f;
  background: #f4f6f9;
  padding: 20px 24px;
  margin: 32px 0;
}

.intone-content-body .cb-callout--light p,
.intone-content-body blockquote.light p,
.intone-content-body .wp-block-quote.light p {
  margin: 0;
  color: #1e2e4c;
}

/* ── Dark note box: #141414 bg, white text ── */
/* Trigger: <blockquote class="dark-note"> or Gutenberg Quote with Additional CSS class "dark-note" */
.intone-content-body .cb-callout--dark,
.intone-content-body blockquote.dark-note,
.intone-content-body .wp-block-quote.dark-note {
  background: #141414;
  border-left: 4px solid #f6b43f;
  padding: 20px 24px;
  margin: 32px 0;
}

.intone-content-body .cb-callout--dark p,
.intone-content-body blockquote.dark-note p,
.intone-content-body .wp-block-quote.dark-note p {
  margin: 0;
  color: #fff;
}


/* ── 4. Card grid ────────────────────────────────────────── */
/* Usage (Custom HTML block):
   <div class="cb-cards">
     <div class="cb-card">
       <h3>Title</h3>
       <p>Content here.</p>
     </div>
   </div>
*/
.intone-content-body .cb-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.intone-content-body .cb-card {
  background: #f4f6f9;
  padding: 24px;
  border-left: 3px solid #f6b43f;
}

.intone-content-body .cb-card h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1e2e4c;
  margin: 0 0 10px;
}

.intone-content-body .cb-card p {
  font-size: 15px;
  line-height: 1.55;
  color: #455068;
  margin: 0;
}

@media (max-width: 640px) {
  .intone-content-body .cb-cards {
    grid-template-columns: 1fr;
  }
}


/* ── 5. Highlight strip ──────────────────────────────────── */
/* Usage (Custom HTML block):
   <div class="cb-highlight">Important insight here.</div>
*/
.intone-content-body .cb-highlight {
  background: #f6b43f;
  color: #09101d;
  padding: 16px 24px;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 32px 0;
}

.intone-content-body .cb-highlight p {
  margin: 0;
  color: inherit;
  font-weight: inherit;
}


/* ── 6. Media (images, figures, video) ───────────────────── */
.intone-content-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}

.intone-content-body figure { margin: 32px 0; }

.intone-content-body figcaption {
  font-size: 14px;
  color: #818994;
  margin-top: 8px;
  font-style: italic;
}

/* Gutenberg image block alignment */
.intone-content-body .wp-block-image { margin: 24px 0; }

.intone-content-body .wp-block-image.alignwide {
  margin-left: -32px;
  margin-right: -32px;
}


/* ── 7. Tables ───────────────────────────────────────────── */
.intone-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
}

.intone-content-body th {
  background: #1e2e4c;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 12px 16px;
}

.intone-content-body td {
  padding: 10px 16px;
  border-bottom: 1px solid #d3dae4;
  color: #1e2e4c;
  vertical-align: top;
}

.intone-content-body tr:nth-child(even) td {
  background: #f4f6f9;
}


/* ── 8. Dark mode overrides ──────────────────────────────── */
[data-theme="dark"] .intone-content-body,
[data-theme="dark"] .intone-content-body p,
[data-theme="dark"] .intone-content-body h2,
[data-theme="dark"] .intone-content-body h3,
[data-theme="dark"] .intone-content-body h4,
[data-theme="dark"] .intone-content-body li,
[data-theme="dark"] .intone-content-body strong {
  color: var(--t-text);
}

[data-theme="dark"] .intone-content-body a {
  color: var(--ds-gold, #f6b43f);
}

[data-theme="dark"] .intone-content-body a:hover {
  color: #fff;
}

[data-theme="dark"] .intone-content-body code,
[data-theme="dark"] .intone-content-body pre {
  background: var(--t-surface);
  color: var(--t-text);
}

/* Callouts */
[data-theme="dark"] .intone-content-body .cb-callout,
[data-theme="dark"] .intone-content-body blockquote:not([class]),
[data-theme="dark"] .intone-content-body .wp-block-quote:not(.cb-callout--light):not(.cb-callout--dark) {
  background: var(--t-surface-raised);
}

[data-theme="dark"] .intone-content-body .cb-callout p,
[data-theme="dark"] .intone-content-body blockquote:not([class]) p,
[data-theme="dark"] .intone-content-body .wp-block-quote p {
  color: var(--t-text);
}

[data-theme="dark"] .intone-content-body .cb-callout--light,
[data-theme="dark"] .intone-content-body blockquote.light,
[data-theme="dark"] .intone-content-body .wp-block-quote.light {
  background: var(--t-surface);
}

[data-theme="dark"] .intone-content-body .cb-callout--light p,
[data-theme="dark"] .intone-content-body blockquote.light p,
[data-theme="dark"] .intone-content-body .wp-block-quote.light p {
  color: var(--t-text);
}

/* Cards */
[data-theme="dark"] .intone-content-body .cb-card {
  background: var(--t-surface-raised);
}

[data-theme="dark"] .intone-content-body .cb-card h3 {
  color: var(--t-text);
}

[data-theme="dark"] .intone-content-body .cb-card p {
  color: var(--t-text-muted);
}

/* Tables */
[data-theme="dark"] .intone-content-body th {
  background: var(--t-surface-raised);
  color: var(--t-text);
}

[data-theme="dark"] .intone-content-body td {
  border-bottom-color: var(--t-border);
  color: var(--t-text);
}

[data-theme="dark"] .intone-content-body tr:nth-child(even) td {
  background: var(--t-surface);
}
