/* ========================================================================
   Plumbing Style Variation
   Loaded via enqueue_block_assets — applies on frontend and in the FSE
   editor iframe. Only enqueued when the plumbing variation is active.
   Scopes: .style-variation-plumbing (frontend + iframe body class)
           .editor-styles-wrapper    (editor iframe DOM fixes)
   ======================================================================== */

/* -----------------------------------------------------------------------
   Editor iframe — collapse Gutenberg wrapper divs so CSS Grid on
   .overlay-grid-wrap sees card and badges as direct grid items.
   ----------------------------------------------------------------------- */
.editor-styles-wrapper .overlay-grid-wrap > .block-editor-inner-blocks,
.editor-styles-wrapper .overlay-grid-wrap > .block-editor-inner-blocks > .block-editor-block-list__layout {
	display: contents;
}

.editor-styles-wrapper .plumbing-hero-card,
.editor-styles-wrapper .floating-badge--bl,
.editor-styles-wrapper .floating-badge--tr {
	grid-column: 1;
	grid-row: 1;
}

/* Left column — vertically center the image wrap */
.style-variation-plumbing .plumbing-why-col {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Extra sizing for the tall overlay layout in why-us */
.style-variation-plumbing .plumbing-why-col .overlay-grid-wrap {
	align-items: stretch;
	min-height: 420px;
}

.style-variation-plumbing .plumbing-why-col .overlay-grid-wrap > .wp-block-group:first-child {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Featured testimonial card highlight */
.style-variation-plumbing .plumbing-t-featured {
	border-color: rgba( 230, 126, 34, 0.35 ) !important;
	background: rgba( 230, 126, 34, 0.05 ) !important;
}

/* Always-on badge text */
.style-variation-plumbing .plumbing-always-on {
	color: #e67e22 !important;
	font-weight: 600 !important;
}

/* Hero diagonal separator */
.style-variation-plumbing .plumbing-hero-section {
	position: relative;
	overflow: visible !important;
}

.style-variation-plumbing .plumbing-hero-section::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 80px;
	background: #0b1628;
	clip-path: polygon( 0 100%, 100% 0, 100% 100% );
	z-index: 2;
	pointer-events: none;
}

/* Remove browser default yellow highlight on <mark> in plumbing headings */
.style-variation-plumbing .plumbing-hero-section .wp-block-heading mark,
.editor-styles-wrapper .plumbing-hero-section .wp-block-heading mark {
	background: none;
	background-color: transparent;
}

/* Hero right column — cover block clips to border-radius */
.style-variation-plumbing .plumbing-hero-card {
	overflow: hidden;
	padding: 0 !important;
}

.style-variation-plumbing .plumbing-hero-placeholder-icon .wp-block-image img {
	width: 72px;
	height: 72px;
	margin: 0 auto;
	display: block;
}

/* Footer phone icon */
.style-variation-plumbing .plumbing-footer-phone-icon {
	margin: 0;
}

.style-variation-plumbing .plumbing-footer-phone-icon img {
	width: 16px;
	height: 16px;
	display: block;
}

/* Contact form submit button (group styled as button) */
.style-variation-plumbing .plumbing-contact-submit {
	width: 100%;
	cursor: pointer;
}

.style-variation-plumbing .plumbing-contact-arrow {
	margin: 0;
}

.style-variation-plumbing .plumbing-contact-arrow img {
	width: 16px;
	height: 16px;
	display: block;
}

/* Navigation links — no underline, rectangular hover background */
.style-variation-plumbing .wp-block-navigation-item__content {
	text-decoration: none !important;
	padding: 0.4rem 0.8rem;
	border-radius: 6px;
	transition: color 0.25s ease, background 0.25s ease;
}

.style-variation-plumbing .wp-block-navigation-item__content:hover {
	color: #fff !important;
	background: rgba( 255, 255, 255, 0.06 );
	text-decoration: none !important;
}

/* Mobile top bar — center phone number on small screens */
@media only screen and (max-width: 781px) {
	.style-variation-plumbing .plumbing-top-bar .wp-block-group.alignwide {
		justify-content: center;
	}
}

/* Desktop dropdown submenu — navy background with white text */
.style-variation-plumbing .wp-block-navigation__submenu-container {
	background-color: #112240 !important;
	color: #fff !important;
	border: 1px solid rgba( 255, 255, 255, 0.08 ) !important;
}

.style-variation-plumbing .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: #8fa3bf !important;
}

.style-variation-plumbing .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: #fff !important;
	background: rgba( 255, 255, 255, 0.06 );
}

/* Hamburger — transparent background, white bars */
.style-variation-plumbing .wp-block-navigation__responsive-container-open {
	background: transparent !important;
	color: #fff !important;
}

.style-variation-plumbing .wp-block-navigation__responsive-container-open svg line {
	stroke: #fff !important;
}

/* Mobile overlay — navy background with white text */
.style-variation-plumbing .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #112240 !important;
	color: #fff !important;
}

.style-variation-plumbing .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.style-variation-plumbing .wp-block-navigation__responsive-container.is-menu-open a {
	color: #fff !important;
}

.style-variation-plumbing .wp-block-navigation__responsive-container-close {
	background: rgba( 255, 255, 255, 0.15 ) !important;
	color: #fff !important;
}

.style-variation-plumbing .wp-block-navigation__responsive-container-close svg {
	color: #fff !important;
	fill: #fff !important;
}

/* -----------------------------------------------------------------------
   Contact Form 7 — plumbing dark-card context
   Targets the CF7 block inside the plumbing contact pattern.
   ----------------------------------------------------------------------- */

/* Remove CF7's default paragraph margin so spacing is controlled by blockGap */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector p {
	margin: 0;
}

/* Stack fields with consistent gap */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: var( --wp--preset--spacing--medium );
}

/* Hide the fieldset of hidden inputs */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .hidden-fields-container {
	display: none;
}

/* Labels — scoped to .wpcf7-form to avoid styling the editor block UI */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form label {
	display: flex;
	flex-direction: column;
	gap: var( --wp--preset--spacing--x-small );
	color: #8fa3bf;
	font-size: var( --wp--preset--font-size--x-small );
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* Text inputs and textarea — scoped to .wpcf7-form to avoid styling the editor block UI */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="text"],
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="email"],
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form textarea {
	width: 100%;
	box-sizing: border-box;
	background: rgba( 255, 255, 255, 0.05 );
	border: 1px solid #1e3558;
	border-radius: var( --wp--preset--border-radius--sm );
	padding: var( --wp--preset--spacing--small ) var( --wp--preset--spacing--medium );
	color: #fff;
	font-size: var( --wp--preset--font-size--small );
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s ease;
}

.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="text"]:focus,
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="email"]:focus,
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form textarea:focus {
	border-color: #E67E22;
}

.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form textarea {
	resize: vertical;
	min-height: 120px;
}

/* Submit button */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="submit"] {
	width: 100%;
	background: #E67E22;
	color: #fff;
	border: none;
	border-radius: var( --wp--preset--border-radius--pill );
	padding: 0.95em 2em;
	font-size: var( --wp--preset--font-size--base );
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s ease;
}

.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form input[type="submit"]:hover {
	background: #cf6d17;
}

/* Spinner — keep next to button */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-spinner {
	margin-left: 0.5em;
	vertical-align: middle;
}

/* Inline validation error tips */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-not-valid-tip {
	color: #f08080;
	font-size: var( --wp--preset--font-size--x-small );
	margin-top: 4px;
	display: block;
}

/* Invalid field highlight */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-not-valid {
	border-color: #f08080 !important;
}

/* Success / error response bar */
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-response-output {
	border-radius: var( --wp--preset--border-radius--sm );
	padding: var( --wp--preset--spacing--small ) var( --wp--preset--spacing--medium );
	font-size: var( --wp--preset--font-size--x-small );
	border: 1px solid transparent;
}

.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form.sent .wpcf7-response-output {
	background: rgba( 46, 160, 67, 0.15 );
	border-color: rgba( 46, 160, 67, 0.4 );
	color: #7ee787;
}

.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form.invalid .wpcf7-response-output,
.style-variation-plumbing .wp-block-contact-form-7-contact-form-selector .wpcf7-form.failed .wpcf7-response-output {
	background: rgba( 240, 128, 128, 0.1 );
	border-color: rgba( 240, 128, 128, 0.35 );
	color: #f08080;
}
