/*
 * Styles for WordPress core block markup (buttons, lists, quotes, image
 * alignment, ...) rendered inside post/page content.
 *
 * This is hand-written, not Tailwind-generated: block markup lives in the
 * database (post_content), not in our .php templates, so Tailwind's content
 * scanner never sees it and can't purge/generate utilities for it anyway
 * (wp-block-*, alignleft, has-*-color etc. aren't Tailwind classes).
 *
 * Scoped to .entry-content (frontend, see singular.php) and
 * .editor-styles-wrapper (wp-admin block editor preview) so both match.
 * Colors/fonts/radii below mirror the design tokens in tailwind.config.js —
 * update both if a token changes.
 */

:where(.entry-content, .editor-styles-wrapper) > * + * {
	margin-top: 1rem;
}

/* Headings --------------------------------------------------------------- */

:where(.entry-content, .editor-styles-wrapper) h1,
:where(.entry-content, .editor-styles-wrapper) h2,
:where(.entry-content, .editor-styles-wrapper) h3,
:where(.entry-content, .editor-styles-wrapper) h4,
:where(.entry-content, .editor-styles-wrapper) h5,
:where(.entry-content, .editor-styles-wrapper) h6 {
	font-family: 'EB Garamond', serif;
	font-weight: 500;
	color: #1b1c1c;
	margin-top: 2rem;
}

:where(.entry-content, .editor-styles-wrapper) h1 { font-size: 40px; line-height: 1.2; font-weight: 600; }
:where(.entry-content, .editor-styles-wrapper) h2 { font-size: 32px; line-height: 1.3; }
:where(.entry-content, .editor-styles-wrapper) h3 { font-size: 24px; line-height: 1.4; }
:where(.entry-content, .editor-styles-wrapper) h4 { font-size: 20px; line-height: 1.4; }
:where(.entry-content, .editor-styles-wrapper) h5 { font-size: 18px; line-height: 1.4; }
:where(.entry-content, .editor-styles-wrapper) h6 { font-size: 16px; line-height: 1.4; font-weight: 600; }

/* Links -------------------------------------------------------------------*/

:where(.entry-content, .editor-styles-wrapper) a {
	color: #006F36;
	text-decoration: underline;
	text-underline-offset: 2px;
}

:where(.entry-content, .editor-styles-wrapper) a:hover {
	text-decoration: none;
}

/* Lists (wp-block-list) --------------------------------------------------- */

:where(.entry-content, .editor-styles-wrapper) ul {
	list-style: disc;
	padding-left: 1.5rem;
}

:where(.entry-content, .editor-styles-wrapper) ol {
	list-style: decimal;
	padding-left: 1.5rem;
}

:where(.entry-content, .editor-styles-wrapper) li + li {
	margin-top: 0.25rem;
}

/* wp-block-quote / wp-block-pullquote ------------------------------------- */

:where(.entry-content, .editor-styles-wrapper) .wp-block-quote {
	border-left: 3px solid #006F36;
	padding-left: 1rem;
	font-style: italic;
	color: #44474d;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-style: normal;
	font-size: 14px;
	color: #75777e;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-pullquote blockquote {
	border-left: none;
	border-top: 3px solid #006F36;
	border-bottom: 3px solid #006F36;
	padding: 1rem 0;
	text-align: center;
}

/* wp-block-button / wp-block-buttons --------------------------------------*/

:where(.entry-content, .editor-styles-wrapper) .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-button__link {
	display: inline-block;
	background-color: #006F36;
	color: #ffffff;
	font-family: 'Hanken Grotesk', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.05em;
	padding: 0.75rem 1.5rem;
	border-radius: 0.25rem;
	text-decoration: none;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-button__link:hover {
	filter: brightness(0.9);
}

:where(.entry-content, .editor-styles-wrapper) .is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: #006F36;
	border: 1px solid #006F36;
}

/* wp-block-separator ------------------------------------------------------ */

:where(.entry-content, .editor-styles-wrapper) hr {
	border: none;
	border-top: 1px solid #c5c6ce;
	margin: 2rem 0;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-separator.is-style-dots {
	border-top: none;
	text-align: center;
	line-height: 1;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-separator.is-style-dots::before {
	content: "···";
	font-size: 24px;
	letter-spacing: 0.5em;
	color: #75777e;
}

/* wp-block-table ----------------------------------------------------------*/

:where(.entry-content, .editor-styles-wrapper) table {
	width: 100%;
	border-collapse: collapse;
}

:where(.entry-content, .editor-styles-wrapper) th,
:where(.entry-content, .editor-styles-wrapper) td {
	border: 1px solid #c5c6ce;
	padding: 0.5rem 0.75rem;
	text-align: left;
}

:where(.entry-content, .editor-styles-wrapper) th {
	background-color: #f5f3f3;
	font-weight: 600;
}

/* Images + alignment options ----------------------------------------------*/

:where(.entry-content, .editor-styles-wrapper) img {
	max-width: 100%;
	height: auto;
	border-radius: 0.25rem;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-image figcaption {
	font-size: 14px;
	color: #75777e;
	text-align: center;
	margin-top: 0.5rem;
}

:where(.entry-content, .editor-styles-wrapper) .alignleft {
	float: left;
	margin: 0.25rem 1.5rem 1rem 0;
}

:where(.entry-content, .editor-styles-wrapper) .alignright {
	float: right;
	margin: 0.25rem 0 1rem 1.5rem;
}

:where(.entry-content, .editor-styles-wrapper) .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Wide and full width both bleed to the edges of the site's own boxed
   layout (the frontend's <main>, or the editor canvas) — not the browser
   viewport. `main`/`.editor-styles-wrapper` have no width of their own, so
   they exactly match the boxed body container; making them query
   containers lets `cqw` measure that box instead of the viewport.
   Requires add_theme_support( 'align-wide' ) (see functions.php) to expose
   these options in the block toolbar. */
main,
.editor-styles-wrapper {
	container-type: inline-size;
}

:where(.entry-content, .editor-styles-wrapper) .alignwide,
:where(.entry-content, .editor-styles-wrapper) .alignfull {
	width: 100cqw;
	max-width: 100cqw;
	margin-left: calc(50% - 50cqw);
	margin-right: calc(50% - 50cqw);
}
