/*
 * Best of Lime USA: block content inside the page and post templates (.bol-prose wraps Oxygen's PostContent).
 * Core blocks only, so an editor gets the house style without choosing anything.
 * Loaded on the front end by bol-usa-site.php. The editor canvas gets the same rules with
 * .bol-prose swapped for .editor-styles-wrapper.
 * The flow rules match the rich text wrapper as a child of .bol-prose (PostContent on pages and posts)
 * and on the same element (the WooCommerce product description carries both classes).
 */

.bol-prose { max-width: 760px; }

/* Reading column: the page and post templates centre the 760px column in the 1120px container, rather than
   pinning it left with a 520px strip on the right. The title (and the post date) sit in the same column so
   their left edges line up with the text. Scoped to .bol-page-body, so the product description is untouched;
   pages without .bol-prose (News grid, Home, Our Story) keep a full-width title. */
.bol-page-body .bol-prose { margin-left: auto; margin-right: auto; }
body:has(.bol-page-body .bol-prose) .bol-title-band .bol-title { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
/* The post head is a .bol-container with 20px side padding, so 800px leaves a 760px column */
body:has(.bol-page-body .bol-prose) .bol-title-band .bol-post-head { max-width: 800px; }
.bol-page-body .bol-post-body { align-items: center; }
.bol-prose > *,
.bol-prose .breakdance-rich-text-styles > * { margin-top: 0; }
.bol-prose .breakdance-rich-text-styles > * + *,
.bol-prose.breakdance-rich-text-styles > * + * { margin-top: 20px; }
.bol-prose p,
.bol-prose ul,
.bol-prose ol,
.bol-prose figure,
.bol-prose blockquote { margin-bottom: 0; }

/* Heading spacing, at the same weight as the flow rule above so it wins on source order. */
.bol-prose :is(h2, h3, h4) { margin-bottom: 0; }
.bol-prose h4 { color: #265362; }
.bol-prose .breakdance-rich-text-styles > * + h2,
.bol-prose.breakdance-rich-text-styles > * + h2 { margin-top: 48px; }
.bol-prose .breakdance-rich-text-styles > * + h3,
.bol-prose.breakdance-rich-text-styles > * + h3 { margin-top: 36px; }
.bol-prose .breakdance-rich-text-styles > * + h4,
.bol-prose.breakdance-rich-text-styles > * + h4 { margin-top: 28px; }
.bol-prose .breakdance-rich-text-styles > :is(h2, h3, h4) + *,
.bol-prose.breakdance-rich-text-styles > :is(h2, h3, h4) + * { margin-top: 12px; }

.bol-prose :is(ul, ol) { padding-left: 1.4em; }
.bol-prose li + li { margin-top: 8px; }
.bol-prose li > :is(ul, ol) { margin-top: 8px; }

.bol-prose a:not(.wp-block-button__link) { color: #5F730A; }
.bol-prose a:not(.wp-block-button__link):hover { color: #4A5A08; text-decoration-thickness: 2px; }

/* Images and captions */
.bol-prose img { max-width: 100%; height: auto; border-radius: 4px; }
.bol-prose .wp-block-image { margin-left: 0; margin-right: 0; }
.bol-prose figcaption,
.bol-prose .wp-element-caption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #595959; text-align: left; }

/* Buttons, matching .bol-btn-green */
.bol-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.bol-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 203px;
	min-height: 49px;
	padding: 12px 32px;
	border: 2px solid #5F730A;
	border-radius: 36px;
	background-color: #5F730A;
	color: #FFFFFF;
	font: 700 16px/1.2 'Lato', sans-serif;
	text-decoration: none;
}
.bol-prose .wp-block-button__link:hover { background-color: #4A5A08; border-color: #4A5A08; color: #FFFFFF; }

/* Quotes */
.bol-prose blockquote,
.bol-prose .wp-block-quote {
	margin-left: 0;
	margin-right: 0;
	padding: 4px 0 4px 24px;
	border-left: 4px solid #7C950E;
	font-family: 'Merriweather', Georgia, serif;
	font-style: italic;
}
.bol-prose blockquote cite { display: block; margin-top: 8px; font: 700 14px/1.4 'Lato', sans-serif; font-style: normal; color: #595959; }

/* Tables */
.bol-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bol-prose :is(th, td) { padding: 10px 12px; border-bottom: 1px solid #D6D6D6; text-align: left; vertical-align: top; }
.bol-prose th { color: #265362; }
.bol-prose .wp-block-table { overflow-x: auto; margin-left: 0; margin-right: 0; }
/* The ckm-consent cookie table has no wrapper, so it scrolls itself on narrow screens */
.bol-prose .ckm-cookie-table { display: block; overflow-x: auto; margin-bottom: 24px; }
.bol-prose .ckm-cookie-table caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.bol-prose .ckm-cookie-table td:first-child { white-space: nowrap; font-family: Consolas, Menlo, monospace; font-size: 14px; }

.bol-prose hr,
.bol-prose .wp-block-separator { border: 0; border-top: 1px solid #D6D6D6; margin-top: 40px; margin-bottom: 40px; }

/* Gallery: captions under the photo, not over it, and every photo the same height.
   Core's gallery rules carry :not(#individual-image), so these match it to win. */
.bol-prose .wp-block-gallery.bol-gallery { gap: 32px 24px; margin-top: 32px; margin-bottom: 32px; align-items: flex-start; }
.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image) {
	width: calc(50% - 12px); flex: 0 0 calc(50% - 12px); flex-direction: column; align-items: stretch; justify-content: flex-start;
}
.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image) img {
	width: 100%; height: 280px; flex: 0 0 auto; object-fit: cover; border-radius: 8px;
}
.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image) figcaption {
	position: static; flex: 0 0 auto; max-height: none; overflow: visible; margin: 10px 0 0; padding: 0;
	background: none; color: inherit; text-align: left; text-shadow: none; font-size: 15px; line-height: 1.5;
}
.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image)::before { display: none; }
/* The gallery spans the full container rather than the 760px text column, three across on desktop.
   The text around it keeps the 760px cap, in line with the page title.
   .bol-gallery-column opts out: two across inside the text column, for short galleries (Classes, 2 and 4 photos)
   that would leave a half-empty row or a lone photo at three across. */
.bol-prose:has(.bol-gallery:not(.bol-gallery-column)) { max-width: none; }
.bol-prose:has(.bol-gallery:not(.bol-gallery-column)) .breakdance-rich-text-styles > :not(.bol-gallery:not(.bol-gallery-column)) { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) {
	.bol-prose .wp-block-gallery.bol-gallery:not(.bol-gallery-column) figure.wp-block-image:not(#individual-image) { width: calc((100% - 48px) / 3); flex-basis: calc((100% - 48px) / 3); }
}
@media (max-width: 599px) {
	.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image) { width: 100%; flex-basis: 100%; }
	.bol-prose .wp-block-gallery.bol-gallery figure.wp-block-image:not(#individual-image) img { height: 240px; }
}

/* Columns stack on phones */
.bol-prose .wp-block-columns { gap: 32px; }
@media (max-width: 767px) {
	.bol-prose .wp-block-columns { flex-direction: column; }
	.bol-prose .wp-block-column { flex-basis: 100% !important; }
	.bol-prose .breakdance-rich-text-styles > * + h2,
	.bol-prose.breakdance-rich-text-styles > * + h2 { margin-top: 36px; }
}
