/*
 * Host lockdown (light DOM).
 *
 * Shadow DOM stops outer selectors from matching anything INSIDE the board, but
 * the host element itself still lives in the page and a theme rule like
 * `div { text-transform: uppercase !important }` will match it — and inherited
 * properties then cross into the shadow tree.
 *
 * So the host is reset here, in the page's own cascade, with !important and a
 * selector strong enough to survive a theme that fights dirty. The plugin also
 * writes the same reset as an inline style attribute, which beats any author
 * rule outright; this file is the fallback for sites whose Content-Security-
 * Policy strips inline styles.
 */

.dia-board-host,
html body .dia-board-host,
html body div.dia-board-host,
html body #content .dia-board-host,
html body .entry-content .dia-board-host {
	all: initial !important;
	display: block !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	float: none !important;
	clear: both !important;
	contain: layout style !important;
}

/* Front-end shortcodes take over the viewport; the wp-admin preview does not. */
html.diaeh-board-active,
body.diaeh-board-active {
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

body.diaeh-board-active > *:not(.dia-board-host) {
	visibility: hidden !important;
}

body.diaeh-board-active > .dia-board-host[data-dia-fullscreen="1"] {
	all: initial !important;
	display: block !important;
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483647 !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	overflow: auto !important;
	visibility: visible !important;
	overscroll-behavior: contain !important;
	-webkit-overflow-scrolling: touch !important;
}
