/**
 * Reset ChatGPT / Word “copy from AI” markup in CMS WYSIWYG fields.
 *
 * Pasted HTML often includes ChatGPT UI classes (gizmo-bot-avatar, h-8, w-8, …).
 * Our 2026 utilities.css defines .w-8 { width: 2rem } for layout components, which
 * collapses pasted headings into a ~32px column.
 *
 * Scope: main content / ACF body areas — not marketing hero shell components.
 */

/* ChatGPT avatar wrappers — only ever appear from AI clipboard paste */
.gizmo-bot-avatar,
.gizmo-bot-avatar > *,
.gizmo-bot-avatar :is(h1, h2, h3, h4, h5, h6, p, div, span, ul, ol, li) {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	overflow: visible !important;
	border-radius: 0 !important;
	flex: none !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	align-self: auto !important;
	background: transparent !important;
	padding: 0 !important;
	white-space: normal !important;
}

.gizmo-bot-avatar :is(ul, ol) {
	display: block !important;
	padding-left: 1.25rem !important;
}

.gizmo-bot-avatar li {
	display: list-item !important;
}

/* ChatGPT design-token classes (inert in WP but may carry inline habits) */
[class*="bg-token-"],
[class*="text-token-"] {
	background: transparent !important;
	color: inherit !important;
}

/*
 * Case study (and similar) ACF content rows — undo utility collisions on headings
 * when paste omitted the gizmo-bot-avatar wrapper.
 */
:is(.single-case-studies, .single-services, .single-sectors, .single-news) .site-main :is(
	.gb-container-interiors-row,
	.gb-container-interiors-row1,
	.row-intro,
	.row-brief,
	.row-solution,
	.row-solution-2,
	.row-solution-3,
	.wysiwygbanner
) :is(h1, h2, h3, h4, h5, h6, p, div, span).w-8,
:is(.single-case-studies, .single-services, .single-sectors, .single-news) .site-main :is(
	.gb-container-interiors-row,
	.gb-container-interiors-row1,
	.row-intro,
	.row-brief,
	.row-solution,
	.row-solution-2,
	.row-solution-3,
	.wysiwygbanner
) :is(h1, h2, h3, h4, h5, h6, p, div, span)[class*="w-8"],
:is(.single-case-studies, .single-services, .single-sectors, .single-news) .site-main :is(
	.gb-container-interiors-row,
	.gb-container-interiors-row1,
	.row-intro,
	.row-brief,
	.row-solution,
	.row-solution-2,
	.row-solution-3,
	.wysiwygbanner
) div.flex:has(> :is(h1, h2, h3, h4, h5, h6)) {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	min-height: 0 !important;
	overflow: visible !important;
	border-radius: 0 !important;
	flex: none !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	background: transparent !important;
	padding: 0 !important;
	white-space: normal !important;
}

:is(.single-case-studies, .single-services, .single-sectors, .single-news) .site-main :is(
	.gb-container-interiors-row,
	.gb-container-interiors-row1,
	.row-intro,
	.row-brief,
	.row-solution,
	.row-solution-2,
	.row-solution-3,
	.wysiwygbanner
) :is(h1, h2, h3, h4, h5, h6) {
	max-width: none;
}
