/* ------------------------------------------------------------------
 * wp-blocks.css
 * Restores the look of WordPress Gutenberg block classes for content
 * migrated from void-star.icu. See spec/10-wordpress-to-jekyll-migration.md.
 * Colours go through theme tokens (assets/css/theme.css) so migrated
 * content adapts to light/dark just like native content — NO hardcoded
 * light-only literals (that left code/tables/quotes/comments broken in
 * dark mode; see spec/03-impl/01-visual-design.md §3).
 * ------------------------------------------------------------------ */

/* Images & captions */
.blog-post .wp-block-image { margin: 1.2em 0; }
.blog-post .wp-block-image img { max-width: 100%; height: auto; }
.blog-post .wp-block-image.aligncenter,
.blog-post figure.aligncenter { text-align: center; }
.blog-post .aligncenter > img,
.blog-post figure.aligncenter > img { margin-left: auto; margin-right: auto; display: block; }
.blog-post .alignright { text-align: right; }
.blog-post .alignleft { text-align: left; }
.blog-post figure.is-resized img { height: auto; }
.blog-post figcaption,
.blog-post .wp-element-caption {
  font-size: 0.85em; color: var(--fg-muted); text-align: center;
  margin-top: 0.5em; line-height: 1.4;
}

/* Columns */
.blog-post .wp-block-columns {
  display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-start; margin: 1.2em 0;
}
.blog-post .wp-block-column { flex: 1 1 0%; min-width: 0; }
@media (max-width: 600px) {
  .blog-post .wp-block-columns { display: block; }
}

/* Code & preformatted — token-driven so they darken in dark mode */
.blog-post pre.wp-block-code,
.blog-post pre.wp-block-preformatted {
  background: var(--code-bg); color: var(--code-fg);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px; overflow-x: auto; font-size: 0.9em; line-height: 1.45;
}
.blog-post pre.wp-block-code code,
.blog-post pre.wp-block-preformatted code {
  background: none; padding: 0; white-space: pre; color: inherit;
}

/* Tables */
.blog-post .wp-block-table { margin: 1.2em 0; overflow-x: auto; }
.blog-post .wp-block-table table { border-collapse: collapse; width: 100%; }
.blog-post .wp-block-table th,
.blog-post .wp-block-table td { border: 1px solid var(--border); padding: 6px 10px; }
.blog-post .wp-block-table thead th { background: var(--surface-2); }

/* Quotes — accent rail (was the legacy BJ teal #0085A1) */
.blog-post .wp-block-quote {
  border-left: 4px solid var(--accent); margin: 1.2em 0; padding: 0.4em 1em; color: var(--fg-muted);
}
.blog-post .wp-block-quote cite { display: block; font-size: 0.85em; color: var(--fg-muted); margin-top: 0.4em; }

/* File (PDF) block */
.blog-post .wp-block-file { margin: 1.2em 0; }
.blog-post .wp-block-file__embed { margin-bottom: 0.5em; border: 1px solid var(--border); }
.blog-post .wp-block-file__button {
  display: inline-block; margin-left: 0.75em; padding: 2px 12px;
  background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent);
  border-radius: 4px; text-decoration: none; font-size: 0.85em;
}
.blog-post .wp-block-file__button:hover { background: var(--accent); color: var(--bg); }

/* Separator */
.blog-post .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 1.6em auto; max-width: 100px; }

/* Star rating (Ultimate Addons) */
.blog-post .uag-star-rating { color: #f0b800; font-size: 1.1em; }

/* Embeds */
.blog-post .wp-block-embed { margin: 1.2em 0; }
.blog-post .wp-block-embed iframe { max-width: 100%; }

/* ------------------------------------------------------------------
 * Legacy (read-only) comments imported from WordPress
 * ------------------------------------------------------------------ */
.legacy-comments { margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--border); }
.legacy-comments-title { font-size: 1.4em; margin-bottom: 1em; }
.legacy-comments-title small { font-size: 0.6em; color: var(--fg-muted); font-weight: normal; }
.legacy-comment {
  border: 1px solid var(--border); border-radius: 6px; padding: 0.75em 1em; margin: 0.75em 0; background: var(--surface);
}
.legacy-comment-reply { margin-left: 2em; background: var(--surface-2); }
.legacy-comment-meta { font-size: 0.85em; margin-bottom: 0.3em; }
.legacy-comment-author { font-weight: 600; color: var(--fg); }
.legacy-comment-meta time { color: var(--fg-muted); margin-left: 0.6em; }
.legacy-comment-body p:last-child { margin-bottom: 0; }
