/**
 * Override WordPress 6.x block theme constrained layout
 * (.is-layout-constrained > … content-size) for GemFind Diamond Link.
 */

/* System font stack (no remote font CDN). */
.wpdl2-app-wrapper,
.wpdl2-app-wrapper #wpdl2-root,
.wpdl2-app-wrapper #wpdl-root {
	font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Shortcode wrapper — always full width */
.wpdl2-app-wrapper {
	max-width: 100% !important;
	width: 100%;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

#wpdl2-root {
	max-width: 100% !important;
	width: 100%;
	box-sizing: border-box;
}

/*
 * Full-bleed (theme padding / container-safe)
 * Many themes wrap content in padded containers; this pulls our tool to the viewport edges
 * without requiring a special page template.
 */
.wpdl2-app-wrapper {
	width: 100vw;
	max-width: 100vw !important;
	/*
	 * Use margin-based breakout instead of left:-50vw because some themes place the shortcode
	 * inside a narrow/right-shifted column; margin breakout stays correct regardless of parent alignment.
	 */
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Prevent horizontal scrollbars caused by 100vw + scrollbar width on some themes. */
body:has(.wpdl2-app-wrapper) {
	overflow-x: hidden;
}

/* Remove global padding in block themes for pages that contain the tool. */
body:has(.wpdl2-app-wrapper) .has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* When the shortcode block is the direct child of a constrained layout */
.is-layout-constrained > .wp-block-shortcode:has(.wpdl2-app-wrapper) {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Nested groups: shortcode is inside a constrained layout but not always direct child */
.is-layout-constrained .wp-block-shortcode:has(.wpdl2-app-wrapper) {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Same as theme rule, but only for rows that contain our app — full width */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)):has(.wpdl2-app-wrapper) {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Shortcode output is a direct child (no wp-block-shortcode wrapper) */
.is-layout-constrained > .wpdl2-app-wrapper {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

#wpdl2-root p {
	padding-bottom: 0;
}

#wpdl2-root input[type="text"] {
	background-color: #fff;
}
