/**
 * Pastor Video Creator — isolate wizard DOM from the active WordPress theme.
 *
 * Loads after wizard-new.css. Keeps selectors scoped to PVC roots only.
 */

/* Scoped PVC overrides stay unlayered so theme “unlayered” CSS cannot override `@layer` bundles.
 * (@layer would lose to unlayered declarations.) */

/* FSE: do_shortcode before do_blocks can leave wizard HTML as direct .wp-site-blocks child (no .wp-block-shortcode). */
body.pvc-wizard-present .wp-site-blocks > .pvc-wizard-shortcode-root,
body.pvc-wizard-present .wp-site-blocks > .pvc-wizard-shortcode-root .pvc-wizard-wrapper {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	flex: 1 1 100% !important;
	flex-grow: 1 !important;
	flex-basis: auto !important;
	align-self: stretch !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
	box-sizing: border-box !important;
	display: block !important;
	position: relative !important;
	overflow: visible !important;
}

/* --- Embed host: block themes / flex layouts squeeze shortcode blocks unless reset --- */
body.pvc-wizard-present .wp-site-blocks > .wp-block-shortcode:has(.pvc-wizard-wrapper),
body.pvc-wizard-present .wp-block-shortcode:has(.pvc-wizard-wrapper) {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	flex: 1 1 100% !important;
	flex-grow: 1 !important;
	flex-basis: auto !important;
	align-self: stretch !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
	box-sizing: border-box !important;
}

body.pvc-wizard-present .wp-block-columns .wp-block-column:has(.pvc-wizard-wrapper),
body.pvc-wizard-present .wp-block-group.is-layout-flex > .wp-block-shortcode:has(.pvc-wizard-wrapper),
body.pvc-wizard-present .wp-block-group.is-layout-grid > .wp-block-shortcode:has(.pvc-wizard-wrapper) {
	min-width: 0 !important;
	max-width: none !important;
	flex: 1 1 100% !important;
	width: 100% !important;
}

/* Shortcode block: drop theme content-width limits */
.wp-block-shortcode .pvc-wizard-wrapper,
body.pvc-wizard-present .wp-block-shortcode .pvc-wizard-wrapper {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box !important;
	display: block !important;
	position: relative !important;
	overflow: visible !important;
}

.wp-block-group .wp-block-shortcode .pvc-wizard-wrapper {
	flex: 0 1 auto !important;
	min-width: 0 !important;
	align-self: auto !important;
	max-width: none !important;
}

.entry-content .pvc-wizard-wrapper,
.site-main .pvc-wizard-wrapper {
	max-width: none !important;
}

.elementor-widget-shortcode .pvc-wizard-wrapper {
	max-width: none !important;
	width: 100% !important;
}

body .wizard-modal-overlay {
	box-sizing: border-box !important;
	isolation: isolate !important;
}

/* Reduce theme “inherit” bleed on common controls inside PVC (same-document mode) */
body.pvc-wizard-present .pvc-wizard-wrapper input:not([type="checkbox"]):not([type="radio"]),
body.pvc-wizard-present .pvc-wizard-wrapper textarea,
body.pvc-wizard-present .pvc-wizard-wrapper select,
body.pvc-wizard-present .wizard-modal-overlay input:not([type="checkbox"]):not([type="radio"]),
body.pvc-wizard-present .wizard-modal-overlay textarea,
body.pvc-wizard-present .wizard-modal-overlay select {
	box-sizing: border-box !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

body.pvc-wizard-present .pvc-wizard-wrapper button,
body.pvc-wizard-present .pvc-wizard-wrapper .button,
body.pvc-wizard-present .wizard-modal-overlay button {
	box-sizing: border-box !important;
}

body.pvc-wizard-present .pvc-wizard-wrapper img,
body.pvc-wizard-present .wizard-modal-overlay img {
	height: auto !important;
	max-width: 100% !important;
	display: inline-block !important;
	vertical-align: middle !important;
}

/* Full-width modal body — block themes often set max-width on flex children */
body .wizard-modal-overlay .wizard-modal-container,
body .wizard-modal-overlay .wizard-modal-content {
	max-width: none !important;
}

body .wizard-modal-overlay .wizard-modal-content {
	width: 100% !important;
	min-height: 0 !important;
}

/* Theme resets sometimes strip label semantics — force card layout */
body .wizard-modal-overlay label.wizard-new-option-card,
body .pvc-wizard-wrapper label.wizard-new-option-card {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	height: auto !important;
	align-self: start !important;
}

body .wizard-modal-overlay label.wizard-new-option-card .wizard-new-option-icon,
body .pvc-wizard-wrapper label.wizard-new-option-card .wizard-new-option-icon {
	flex: 0 0 auto !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
}

/* Prevent grid rows from stretching cards to equal broken row heights */
body .wizard-modal-overlay .wizard-new-option-grid,
body .pvc-wizard-wrapper .wizard-new-option-grid {
	align-items: start !important;
	justify-items: stretch !important;
}

body .wizard-modal-overlay .wizard-new-carousel-wrapper,
body .pvc-wizard-wrapper .wizard-new-carousel-wrapper {
	min-height: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

/* Preserve emoji alongside UI fonts when themes narrow font-family */
.pvc-wizard-wrapper,
.wizard-modal-overlay {
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif !important;
}

/* Block themes (e.g. Twenty Twenty-Four) style a:hover { text-decoration: underline } — keep wizard chrome clean */
body.pvc-wizard-present .wizard-modal-overlay a,
body.pvc-wizard-present .wizard-modal-overlay a:hover,
body.pvc-wizard-present .wizard-modal-overlay a:focus,
body.pvc-wizard-present .wizard-modal-overlay a:active,
body.pvc-wizard-present .wizard-modal-overlay a:visited,
body.pvc-wizard-present .pvc-wizard-wrapper a,
body.pvc-wizard-present .pvc-wizard-wrapper a:hover,
body.pvc-wizard-present .pvc-wizard-wrapper a:focus,
body.pvc-wizard-present .pvc-wizard-wrapper a:active,
body.pvc-wizard-present .pvc-wizard-wrapper a:visited {
	text-decoration: none !important;
}
