/*
 * Core provides block layouts, breakpoints and support classes. This sheet
 * repairs the classic theme reset only inside authored core block content.
 * Hand-authored source, loaded directly: no generated/minified copy required.
 */

/* Layout: 1200px site container, 840px reading column (legacy 70% column). */
.thermolux-block-content,
.editor-styles-wrapper {
	--wp--style--global--content-size: 840px;
	--wp--style--global--wide-size: 1200px;
	--thermolux-block-gap: 1.5rem;
}

.thermolux-block-content {
	display: flow-root;
	inline-size: 100%;
	min-inline-size: 0;
	font-size: 16px;
	line-height: 1.6;
	white-space: normal;
}

body > .thermolux-block-content {
	--thermolux-content-gutter: clamp(20px, 4vw, 40px);
	padding-inline: var(--thermolux-content-gutter);
}

.thermolux-block-content > :where([class*="wp-block-"]:not(.alignleft):not(.alignright)) {
	max-inline-size: var(--wp--style--global--content-size);
	margin-inline: auto;
}

.thermolux-block-content > :where(.alignwide) {
	max-inline-size: var(--wp--style--global--wide-size);
}

.thermolux-block-content > :where(.alignfull) {
	max-inline-size: none;
	inline-size: 100%;
}

/* Only the page-level scope may bleed to the viewport; sidebars/tabs stay safe. */
body > .thermolux-block-content > .alignfull {
	inline-size: calc(100% + 2 * var(--thermolux-content-gutter));
	max-inline-size: none;
	margin-inline: calc(-1 * var(--thermolux-content-gutter));
}

.thermolux-block-content > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, pre) {
	max-inline-size: var(--wp--style--global--content-size);
	margin-inline: auto;
}

/* Shared reset repair. :where keeps block support classes/inline styles first. */
:is(.thermolux-block-content, .editor-styles-wrapper) :where(*, *::before, *::after) {
	box-sizing: border-box;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(p, li) {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(p, ul, ol, figure, blockquote, pre, details) {
	margin-block: 0 1.25em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6) {
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2;
	margin-block: 1em .5em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(h1) { font-size: 2.5em; }
:is(.thermolux-block-content, .editor-styles-wrapper) :where(h2) { font-size: 2em; }
:is(.thermolux-block-content, .editor-styles-wrapper) :where(h3) { font-size: 1.5em; }
:is(.thermolux-block-content, .editor-styles-wrapper) :where(h4) { font-size: 1.25em; }
:is(.thermolux-block-content, .editor-styles-wrapper) :where(h5) { font-size: 1.125em; }
:is(.thermolux-block-content, .editor-styles-wrapper) :where(h6) { font-size: 1em; }

/* Legacy product descriptions force Roboto/14px and a 32px h3. New block
 * prose follows the shared editor styles; classic descriptions keep them. */
.product-info__description .thermolux-block-content :where(p, ul, li) {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.product-info__description .thermolux-block-content :where(h3) {
	font-size: 1.5em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(a:not(.wp-element-button):not(.wp-block-button__link)) {
	color: #21417e;
	text-decoration: underline;
	text-underline-offset: .15em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid #21417e;
	outline-offset: 3px;
}

/* Columns/Group/Row/Stack/Grid: use core flex/grid, alignment and 781px rules. */
:where(.wp-block-columns, .wp-block-group.is-layout-flex, .wp-block-buttons) {
	gap: var(--wp--style--block-gap, 1.5rem);
}

:where(.wp-block-column, .wp-block-group, .wp-block-media-text__content) {
	min-inline-size: 0;
}

/* WP 6.5 sets Columns align-items: normal !important. Align the children
 * instead; individual column alignment (higher specificity) still wins. */
:where(.wp-block-columns).are-vertically-aligned-top > :where(.wp-block-column) {
	align-self: flex-start;
}

:where(.wp-block-columns).are-vertically-aligned-center > :where(.wp-block-column) {
	align-self: center;
}

:where(.wp-block-columns).are-vertically-aligned-bottom > :where(.wp-block-column) {
	align-self: flex-end;
}

/* Images, Gallery, Cover and Media & Text retain core cropping/aspect ratios. */
:is(.thermolux-block-content, .editor-styles-wrapper) :where(img) {
	max-inline-size: 100%;
	height: auto;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(figcaption) {
	font-size: .8125em;
	line-height: 1.5;
	margin-block-start: .5em;
	text-align: center;
}

/* Lists and Query lists: restore prose markers, keep block layouts marker-free. */
:is(.thermolux-block-content, .editor-styles-wrapper) :where(ul:not(.wp-block-post-template):not(.wp-block-latest-posts):not(.blocks-gallery-grid):not(.wp-block-gallery)) {
	list-style: disc;
	padding-inline-start: 1.5em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(ol) {
	list-style: decimal;
	padding-inline-start: 1.5em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(li) {
	list-style-type: inherit;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(ul.wp-block-post-template, ul.wp-block-latest-posts) {
	list-style: none;
	padding-inline-start: 0;
}

/* Quote/Pullquote/Table/Code/File/Details: core supplies their block skins. */
:is(.thermolux-block-content, .editor-styles-wrapper) :where(blockquote.wp-block-quote) {
	border-inline-start: .25em solid currentColor;
	padding-inline-start: 1em;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(.wp-block-pullquote blockquote) {
	margin: 0;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(.wp-block-table) {
	overflow-x: auto;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(.wp-block-table table) {
	border-collapse: collapse;
	inline-size: 100%;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(pre, code) {
	font-family: ui-monospace, monospace;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(pre) {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

:is(.thermolux-block-content, .editor-styles-wrapper) :where(.wp-block-details summary) {
	display: list-item;
	cursor: pointer;
	font-weight: 600;
}

/* Embeds/media: core responsive-embeds handles aspect ratios and wrappers. */
:where(.wp-block-embed iframe, .wp-block-video video, .wp-block-audio audio, .wp-block-file object) {
	max-inline-size: 100%;
}

/* Classic floating alignment within block content, including RTL. */
.thermolux-block-content > :where(.alignleft) {
	float: left;
	margin-inline: 0 1.5em;
}

.thermolux-block-content > :where(.alignright) {
	float: right;
	margin-inline: 1.5em 0;
}

[dir="rtl"] .thermolux-block-content > :where(.alignleft) { float: right; }
[dir="rtl"] .thermolux-block-content > :where(.alignright) { float: left; }

.thermolux-block-content > :where(.aligncenter) {
	margin-inline: auto;
	text-align: center;
}

/* No rules for Spacer heights, separator colors, button colors or core gaps
 * with inline overrides: preserve the author's block support settings. */
