/**
 * Yakaa Custom HTML (#yk-page): widen WP main shell + entry so the island can use nearly full viewport.
 * Body class yk-has-island (functions.php) is primary; :has(#yk-page) is fallback.
 * Tune ONE value: --yk-theme-shell-max
 * @package Yakaa
 */
:root {
	--yk-theme-shell-max: min(calc(100vw - 24px), 2000px);
}

body.yk-has-island main#main.site-main.container,
body.yk-has-island main.site-main.container,
.site-main.container:has(#yk-page) {
	max-width: var(--yk-theme-shell-max) !important;
	width: 100%;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.yk-has-island main#main.site-main.container article,
body.yk-has-island main.site-main.container article,
.site-main.container article:has(#yk-page) {
	max-width: none !important;
	width: 100%;
	box-sizing: border-box;
}

body.yk-has-island .site-main .entry-content,
.site-main .entry-content:has(#yk-page) {
	max-width: none !important;
	width: 100% !important;
	box-sizing: border-box;
}

body.yk-has-island main .entry-content.wp-block-post-content.is-layout-constrained,
body.yk-has-island main .wp-block-post-content.is-layout-constrained,
.wp-block-post-content.is-layout-constrained:has(#yk-page),
.is-layout-constrained:has(#yk-page) {
	max-width: var(--yk-theme-shell-max) !important;
	width: 100% !important;
	box-sizing: border-box;
}

.site-main .entry-content {
	display: block;
	width: 100%;
	max-width: 100%;
}

.entry-content .wp-block-html,
.entry-content figure.wp-block-html {
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/*
 * Top announcement strip (yk-wp-topstrip-root): WordPress “layout constrained” caps block width.
 * These rules load in the theme (after core) so the strip matches the main column width.
 */
body.yk-has-topstrip .site-main .entry-content .wp-block-html:has(.yk-wp-topstrip-root),
body.yk-has-topstrip .site-main .entry-content figure.wp-block-html:has(.yk-wp-topstrip-root),
body.yk-has-island .site-main .entry-content .wp-block-html:has(.yk-wp-topstrip-root),
body.yk-has-island .site-main .entry-content figure.wp-block-html:has(.yk-wp-topstrip-root),
.site-main .entry-content .wp-block-html:has(.yk-wp-topstrip-root),
.site-main .entry-content figure.wp-block-html:has(.yk-wp-topstrip-root) {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.yk-has-topstrip .entry-content.is-layout-constrained > .wp-block-html:has(.yk-wp-topstrip-root),
body.yk-has-topstrip main .entry-content.is-layout-constrained > .wp-block-html:has(.yk-wp-topstrip-root),
body.yk-has-topstrip .wp-block-post-content.is-layout-constrained > .wp-block-html:has(.yk-wp-topstrip-root) {
	max-width: 100% !important;
	width: 100% !important;
}

/* Editor “Full width” on the Custom HTML block (optional) */
.wp-block-html.alignfull:has(.yk-wp-topstrip-root),
figure.wp-block-html.alignfull:has(.yk-wp-topstrip-root) {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.yk-contact-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}
