/*
 * Boutique Built Elements – adapters for the native Elementor build.
 * Loaded after bb-home-base.css (the original design rules). Everything here
 * exists because Elementor wraps content in its own containers/widgets.
 */

/* Brand colours come from Elementor Site Settings > Global Colours when set. */
body.bb-page {
	--bb-merlot: var(--e-global-color-bbmerlot, #3f0f15);
	--bb-ink: var(--e-global-color-bbink, #f4f4ef);
	--bb-cream: var(--e-global-color-bbcream, #f4e7d4);
	--bb-footer-bar: var(--e-global-color-bbfooterbar, #613438);
}

/* ---------- Containers and widgets: no Elementor spacing inside the design ---------- */
body.bb-page .bb-shell,
body.bb-page .bb-shell .e-con,
body.bb-page .bb-pinned-header,
body.bb-page .bb-pinned-header .e-con {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px;
	--row-gap: 0px;
	--column-gap: 0px;
	--widgets-spacing: 0px 0px;
	--widgets-spacing-row: 0px;
	--widgets-spacing-column: 0px;
	--kit-widget-spacing: 0px;
	--container-default-padding-top: 0px;
	--container-default-padding-right: 0px;
	--container-default-padding-bottom: 0px;
	--container-default-padding-left: 0px;
}
/* (Widget bottom margins are already 0 via --kit-widget-spacing; no reset here, so the
   design's own label margins keep working.) */
/* Inner containers behave like the plain <div>/<section> blocks of the original markup:
   block by default, auto width, and a design rule that sets display:flex gets a row like
   plain CSS. (Elementor would otherwise make every container a full-width column flexbox.) */
body.bb-page .bb-shell .e-con,
body.bb-page .bb-pinned-header,
body.bb-page .bb-pinned-header .e-con {
	--display: block;
	--width: auto;
	--flex-direction: row;
	--flex-wrap: nowrap;
	--align-items: normal;
	--justify-content: normal;
	--align-content: normal;
}

/* Text widgets inherit the design's type instead of Elementor/kit defaults. */
body.bb-page .bb :where(.elementor-heading-title),
body.bb-page .bb-pinned-header :where(.elementor-heading-title) {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}
body.bb-page .bb h2.elementor-heading-title {
	font-family: var(--serif);
	letter-spacing: -.035em;
	text-transform: uppercase;
	line-height: 1.12;
}
/* Low specificity (:where) so the design's own p / p+p rules still win. */
body.bb-page .bb :where(.elementor-widget-text-editor) { color: inherit; }
body.bb-page .bb :where(.elementor-widget-text-editor) p {
	font: inherit;
	margin-block: 0;
}

/* Image widgets: plain block images, as in the original markup. */
body.bb-page .bb .elementor-widget-image,
body.bb-page .bb-pinned-header .elementor-widget-image { text-align: left; line-height: 0; }
body.bb-page .bb .elementor-widget-image a,
body.bb-page .bb-pinned-header .elementor-widget-image a { display: block; }
body.bb-page .bb .elementor-widget-image img { display: block; }

/* ---------- Hero ---------- */
/* The header is moved to <body> (outside .bb, so no border-box) and is an Elementor
   container (width:100%): size it from left/right like the original plain <header>. */
body.bb-page .bb-pinned-header.e-con { width: auto; max-width: none; }
body.bb-page .bb-hero-visual { pointer-events: none; }
body.bb-page .bb-hero-visual img { max-width: none; }
body.bb-page .bb-header-logo a { display: block; }
body.bb-page .bb-header-phone .elementor-heading-title { line-height: inherit; }
body.bb-page .bb-header-phone a { display: inline-block; }
body.bb-page .bb-header-phone a::after { pointer-events: none; }
/* Tagline: the heading text is split into word spans by bb-home.js; the h1 itself steps aside
   so the words sit directly in the flex row, like the original <h1><span>… markup. */
body.bb-page .bb-tagline .elementor-heading-title { display: contents; }
/* In the original the h1 itself carried .bb-tagline, so `.bb h1 {line-height:inherit}` won. */
body.bb-page .bb .bb-tagline { line-height: inherit; }
body.bb-page .bb-tagline span { flex: none; }

/* ---------- Intro / About images ---------- */
body.bb-page .bb-curve img { width: 100%; height: auto; }
body.bb-page .bb-about-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
	body.bb-page .bb-about-photo img { height: auto; aspect-ratio: 346 / 646; max-height: 440px; }
}

/* ---------- Moret headings: text on desktop, image on phones ---------- */
body.bb-page .bb-mobile-moret > .elementor-widget-image img {
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}
@media (max-width: 767px) {
	body.bb-page .bb-mobile-moret > .elementor-widget-image { height: clamp(20px, 5.8vw, 29px); }
}

/* ---------- Process accordion (Elementor Nested Accordion) ---------- */
body.bb-page .bb-process .e-n-accordion { counter-reset: bb-step; display: block; }
body.bb-page .bb-process .e-n-accordion > .e-n-accordion-item {
	counter-increment: bb-step;
	margin: 0;
	border: 0;
	border-top: 1px solid rgba(244, 244, 239, .5);
	background: transparent;
}
body.bb-page .bb-process .e-n-accordion > .e-n-accordion-item:last-child {
	border-bottom: 1px solid rgba(244, 244, 239, .5);
}
body.bb-page .bb-process .e-n-accordion > .e-n-accordion-item > summary.e-n-accordion-item-title {
	display: grid;
	grid-template-columns: 3.61vw 1fr 2.1vw;
	gap: 0;
	align-items: center;
	justify-content: stretch;
	list-style: none;
	cursor: pointer;
	padding: .35vw .83vw;
	min-height: 3.19vw;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-transform: uppercase;
	font-family: var(--mono);
	font-size: var(--body);
	line-height: 1.3;
	color: var(--bb-ink);
}
body.bb-page .bb-process summary.e-n-accordion-item-title::before {
	content: counter(bb-step, decimal-leading-zero);
	font-family: var(--sans);
	font-size: clamp(12px, 1.11vw, 19px);
	color: var(--bb-ink);
}
body.bb-page .bb-process .e-n-accordion-item-title-header,
body.bb-page .bb-process .e-n-accordion-item-title-text {
	display: block;
	font: inherit;
	color: inherit;
	text-transform: inherit;
	letter-spacing: normal;
	margin: 0;
	padding: 0;
	flex: none;
}
body.bb-page .bb-process .e-n-accordion-item-title-icon { display: none !important; }
body.bb-page .bb-process summary.e-n-accordion-item-title::after {
	content: '+';
	display: block;
	text-align: right;
	font: 400 18px/1 Arial, sans-serif;
	color: var(--bb-ink);
}
body.bb-page .bb-process .e-n-accordion-item[open] > summary.e-n-accordion-item-title::after { content: '\2212'; }
body.bb-page .bb-process details > [role=region] {
	overflow: hidden;
	display: flow-root;
	border: 0;
	background: transparent;
	--padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
}
body.bb-page .bb-process details > [role=region] p {
	padding: 3.5vw 4vw 2.2vw 3.61vw;
	max-width: 90%;
	font-family: var(--sans);
	text-transform: none;
}
@media (max-width: 767px) {
	body.bb-page .bb-process .e-n-accordion > .e-n-accordion-item > summary.e-n-accordion-item-title {
		grid-template-columns: 35px 1fr 24px;
		padding: 12px 0;
		min-height: 46px;
		font-size: 14px;
	}
	body.bb-page .bb-process details > [role=region] p { padding: 20px 0 25px 35px; max-width: 100%; }
}

/* ---------- Enquiry form (Fluent Forms widget) ---------- */
body.bb-page .bb-form .fluentform,
body.bb-page .bb-form form,
body.bb-page .bb-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
body.bb-page .bb-form form fieldset { display: grid; gap: 0; }
body.bb-page .bb-form .ff-el-group { margin: 0 !important; padding: 0; }
body.bb-page .bb-form .ff-el-input--label {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
body.bb-page .bb-form .ff-el-form-control,
body.bb-page .bb-form input.ff-el-form-control {
	border: 0;
	border-bottom: 1px solid rgba(244, 231, 212, .7);
	border-radius: 0;
	background: transparent;
	color: var(--bb-ink);
	height: 4.65vw;
	min-height: 56px;
	width: 100%;
	padding: 0 .49vw;
	font-family: var(--mono);
	font-size: var(--body);
	line-height: 1.3;
	outline-offset: 3px;
	box-shadow: none;
}
body.bb-page .bb-form .ff-el-form-control:focus { border-color: rgba(244, 231, 212, .7); box-shadow: none; background: transparent; }
body.bb-page .bb-form .ff-el-form-control::placeholder { color: var(--bb-ink); opacity: 1; }
body.bb-page .bb-form .ff_submit_btn_wrapper { margin: 0; padding: 0; text-align: right; display: flex; justify-content: flex-end; }
body.bb-page .bb-form .ff_submit_btn_wrapper .ff-btn-submit,
body.bb-page .bb-form button.ff-btn {
	background: none !important;
	color: var(--bb-ink) !important;
	border: 0;
	border-radius: 0;
	padding: 1.1vw 0;
	min-height: 0;
	cursor: pointer;
	font-family: var(--mono);
	font-size: var(--body);
	font-weight: 400;
	line-height: 1.3;
	text-decoration: underline;
	box-shadow: none;
	opacity: 1;
}
body.bb-page .bb-form .ff-btn-submit:hover { text-decoration: none; opacity: 1; }
body.bb-page .bb-form .error.text-danger,
body.bb-page .bb-form .ff-errors-in-stack { color: var(--bb-cream); font-size: 14px; margin-top: 6px; }
body.bb-page .bb-form .ff-message-success {
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	background: transparent;
	color: var(--bb-cream);
	font-family: var(--sans);
	line-height: 1.3;
}
body.bb-page .bb-form .ff-message-success p:first-child {
	font-family: var(--mono);
	text-transform: uppercase;
	line-height: 1.34;
	margin-bottom: 36px;
}
body.bb-page .bb-form .ff-message-success p { margin: 0; color: var(--bb-cream); }
@media (max-width: 767px) {
	body.bb-page .bb-form .ff-el-form-control,
	body.bb-page .bb-form input.ff-el-form-control { height: 60px; padding: 0 5px; }
	body.bb-page .bb-form .ff_submit_btn_wrapper .ff-btn-submit { padding: 15px 0; }
}

/* ---------- Footer ---------- */
body.bb-page .bb-footer-bar .elementor-widget-text-editor p { white-space: normal; }

/* ---------- Elementor editor: show everything statically so it can be edited ---------- */
body.elementor-editor-active.bb-page .bb-hero-visual img { opacity: 1 !important; }
body.elementor-editor-active.bb-page .bb-hero-wrap,
body.elementor-editor-active.bb-page .elementor .bb-hero-wrap { position: relative !important; }
body.elementor-editor-active.bb-page .bb-hero-visual { position: absolute !important; }
body.elementor-editor-active.bb-page .bb-header.bb-pinned-header { position: absolute !important; opacity: 1 !important; }
body.elementor-editor-active.bb-page .bb-tagline { opacity: 1 !important; }
/* The editor applies Elementor's default global colour/typography to headings (the live page
   has none defined); keep the design's inherited type while editing. */
body.elementor-editor-active.bb-page .bb .elementor-widget-heading .elementor-heading-title,
body.elementor-editor-active.bb-page .bb-pinned-header .elementor-widget-heading .elementor-heading-title {
	color: inherit;
	font-family: inherit;
	font-weight: inherit;
}
body.elementor-editor-active.bb-page .bb .elementor-widget-heading h2.elementor-heading-title { font-family: var(--serif); }
body.elementor-editor-active.bb-page .bb :where(.elementor-widget-text-editor) p { color: var(--bb-ink); }
