/*
Theme Name: Boulder Israel – Woodmart Child
Description: תבנית־בת ל-Woodmart עם חוויית קריאה מקצועית למאמרי בולדר ישראל.
Author: Boulder Israel
Template: woodmart
Version: 1.5.28
Text Domain: boulder-woodmart-child
*/

/* WordPress auto-paragraphs must not create a gap above/below the contact shell. */
.bi-contact > p:empty {
	display: none;
}

body.page-id-651 .content-layout-wrapper {
	padding-block-start: 0;
}

body.page-id-651 .bi-contact {
	margin-block-start: 0;
}

/* One predictable, high-contrast navigation surface across every template. */
.whb-header .whb-general-header,
.whb-header .whb-general-header.whb-without-bg,
body.single-post .whb-header .whb-general-header,
body.single-post .whb-header .whb-general-header.whb-without-bg {
	background-color: #123744 !important;
}

/* Keep the primary navigation visible in both scroll directions. */
.whb-header.whb-hide-on-scroll .whb-main-header {
	position: fixed !important;
	inset-block-start: 0 !important;
	transform: translateY(0) !important;
}

html {
	scroll-padding-block-start: calc(var(--wd-header-general-h) + 16px);
}

.whb-header:not(.whb-sticked) .whb-general-header,
.whb-header:not(.whb-sticked) .whb-general-header .whb-row-inner {
	height: var(--wd-header-general-h) !important;
}

.whb-header.whb-sticked .whb-general-header,
.whb-header.whb-sticked .whb-general-header .whb-row-inner {
	height: var(--wd-header-general-sticky-h) !important;
}

/* The former US-site flag is no longer relevant in the main header. */
.whb-header .whb-pftm83c7085w903y7mka .wpb_single_image {
	display: none !important;
}

/* Use Boulder Israel's brand blue for primary actions site-wide. */
:root {
	--boulder-brand-surface: #123744;
	--boulder-brand-blue: #235b69;
	--boulder-brand-blue-hover: #194955;
}

/* Match every full-width dark product section to the header/footer surface. */
.boulder-rm .rm-reading,
.boulder-rm .rm-rfq,
.boulder-oils .dark {
	background: var(--boulder-brand-surface) !important;
	background-image: none !important;
}

/* One clear, clickable WhatsApp contact across the site. */
.boulder-whatsapp-link {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .2em;
}

.boulder-floating-whatsapp {
	position: fixed;
	inset-inline-start: max(18px, env(safe-area-inset-right));
	inset-block-end: max(18px, env(safe-area-inset-bottom));
	z-index: 998;
	min-block-size: 58px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 10px 18px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 999px;
	background: #25d366;
	box-shadow: 0 12px 34px rgba(13, 74, 37, .3);
	color: #073f20 !important;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.boulder-floating-whatsapp svg {
	inline-size: 32px;
	block-size: 32px;
	flex: 0 0 auto;
	fill: currentColor;
}

.boulder-floating-whatsapp:is(:hover, :focus-visible) {
	background: #37df77;
	box-shadow: 0 16px 40px rgba(13, 74, 37, .38);
	color: #062f19 !important;
	transform: translateY(-2px);
}

.boulder-floating-whatsapp:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.boulder-floating-whatsapp {
		inline-size: 58px;
		padding: 0;
	}

	.boulder-floating-whatsapp span {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* Contact-page route cards: override the legacy catch-all 11px span rule. */
.bi-contact .bi-route-grid .bi-route-index {
	font-size: 13px;
	line-height: 1.4;
}

.bi-contact .bi-route-grid .bi-route-title {
	font-size: clamp(21px, 1.7vw, 26px);
	line-height: 1.3;
}

.bi-contact .bi-route-grid .bi-route-copy {
	font-size: 16px;
	line-height: 1.75;
}

.bi-contact .bi-route-grid .bi-route-cta {
	font-size: 15px;
	line-height: 1.5;
}

/* Normalize legacy/page-builder contact forms and their reCAPTCHA widgets. */
:where(.wpcf7-form, .wpforms-form, .elementor-form, form.wpcf7-form) {
	direction: rtl;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 18px;
	inline-size: 100%;
	max-inline-size: 720px;
	margin-inline: auto;
	text-align: start;
}

/* Preserve Contact Form 7 layouts that already use Woodmart's row/column grid. */
.wpcf7-form:has(> .row) {
	display: block;
	max-inline-size: 1000px;
	margin-inline: auto;
	padding: 30px;
	border: 1px solid #d5e0e4;
	border-radius: 18px;
	background: #f7f9fa;
	box-shadow: 0 18px 50px rgba(15, 55, 65, .08);
}

.wpcf7-form:has(> .row) > .row {
	inline-size: auto;
	margin-inline: -10px;
}

.wpcf7-form:has(> .row) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea) {
	border-color: #afc1c8 !important;
	background: #fff !important;
	color: #17343d !important;
}

.wpcf7-form:has(> .row) textarea {
	min-block-size: 140px;
}

.wpcf7-form:has(> .row) > .wpcf7-form-control-wrap.recaptcha {
	direction: rtl;
	display: flex;
	justify-content: flex-start;
	inline-size: 100%;
	margin-block: 20px 16px;
	overflow: visible;
}

.wpcf7-form:has(> .row) > p:has(input[type="submit"]) {
	margin: 0;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) :where(p, label, .wpforms-field, .elementor-field-group) {
	min-inline-size: 0;
	margin: 0;
	text-align: start;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea) {
	box-sizing: border-box;
	inline-size: 100% !important;
	min-inline-size: 0;
	min-block-size: 48px;
	margin: 7px 0 0 !important;
	padding: 11px 13px !important;
	border: 1px solid rgba(255, 255, 255, .42) !important;
	border-radius: 3px;
	background: rgba(255, 255, 255, .05) !important;
	color: inherit;
	text-align: start;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) textarea {
	min-block-size: 132px;
	resize: vertical;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) :where(textarea, .wpcf7-form-control-wrap[data-name*="message"], .wpforms-field-textarea, .elementor-field-type-textarea, .g-recaptcha, .wpcf7-recaptcha, .wpforms-recaptcha-container, .elementor-field-type-recaptcha, .elementor-field-type-submit, .wpforms-submit-container, .wpcf7-response-output) {
	grid-column: 1 / -1;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) > :where(p, div):has(textarea, .g-recaptcha, .wpcf7-recaptcha, button[type="submit"], input[type="submit"]) {
	grid-column: 1 / -1;
}

:where(.g-recaptcha, .wpcf7-recaptcha, .wpforms-recaptcha-container, .elementor-field-type-recaptcha) {
	direction: ltr;
	justify-self: start;
	max-inline-size: 100%;
	overflow: hidden;
}

:where(.g-recaptcha, .wpcf7-recaptcha, .wpforms-recaptcha-container) iframe {
	display: block;
	max-inline-size: 100%;
}

:where(.wpcf7-form, .wpforms-form, .elementor-form) :where(button[type="submit"], input[type="submit"]) {
	inline-size: 100%;
	min-block-size: 50px;
}

@media (max-width: 680px) {
	:where(.wpcf7-form, .wpforms-form, .elementor-form, form.wpcf7-form) {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	:where(.wpcf7-form, .wpforms-form, .elementor-form) > * {
		grid-column: 1;
	}

	:where(.g-recaptcha, .wpcf7-recaptcha, .wpforms-recaptcha-container) {
		transform: scale(.88);
		transform-origin: right top;
		margin-block-end: -9px;
	}

	.wpcf7-form:has(> .row) {
		padding: 20px 16px;
		border-radius: 14px;
	}
}

:where(
	.button,
	.btn,
	button[type="submit"],
	input[type="submit"],
	.woodmart-button-wrapper a,
	.wd-button-wrapper a,
	.boulder-oils .button
) {
	border-color: var(--boulder-brand-blue) !important;
	background-color: var(--boulder-brand-blue) !important;
	color: #fff !important;
}

/* Persistent quote action on product pages with a real quote form. */
.boulder-sticky-quote {
	position: fixed;
	inset-inline: 0;
	inset-block-end: max(18px, env(safe-area-inset-bottom));
	z-index: 999;
	inline-size: max-content;
	max-inline-size: calc(100vw - 28px);
	margin-inline: auto;
	min-block-size: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 20px;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 999px;
	background: var(--boulder-brand-blue);
	box-shadow: 0 10px 28px rgba(25, 73, 85, .28);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.boulder-sticky-quote svg {
	inline-size: 18px;
	block-size: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	transform: scaleX(-1);
}

.boulder-sticky-quote:is(:hover, :focus-visible) {
	background: var(--boulder-brand-blue-hover);
	box-shadow: 0 14px 34px rgba(25, 73, 85, .36);
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
}

.boulder-sticky-quote:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

#rfq,
#contact,
#rfq-form,
#boulder-product-quote-form {
	scroll-margin-block-start: 96px;
}

@media (max-width: 480px) {
	body.single-product .site-content,
	body.single-product main {
		padding-block-end: calc(78px + env(safe-area-inset-bottom));
	}

	.boulder-sticky-quote {
		inset-inline: 14px;
		inset-block-end: max(12px, env(safe-area-inset-bottom));
		inline-size: auto;
		max-inline-size: none;
		min-block-size: 50px;
		padding-inline: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.boulder-sticky-quote {
		transition: none;
	}
}

:where(
	.button,
	.btn,
	button[type="submit"],
	input[type="submit"],
	.woodmart-button-wrapper a,
	.wd-button-wrapper a,
	.boulder-oils .button
):is(:hover, :focus-visible) {
	border-color: var(--boulder-brand-blue-hover) !important;
	background-color: var(--boulder-brand-blue-hover) !important;
	color: #fff !important;
}
