/*
 * Restoration-only integration. The historical stylesheet remains the visual
 * specification, including the slide-in menu in full. This file carries only
 * the mobile-arrow correction, the language-switcher layout WPML would have
 * supplied, and custom-plugin compatibility.
 */

:root {
	--hs-restored-orange: #ef4f15;
}

/* The reference homepage has no prominent scroll arrow on a phone. */
@media (max-width: 767px) {
	.hs-restored.home #intro .et_pb_image_1 {
		display: none !important;
	}

}

/*
 * The restoration stack does not enqueue WPML's legacy-list-horizontal
 * stylesheet, so the switcher's own layout rules are restated verbatim here.
 * Appearance (colour, weight, the "|" separator) stays with style.css.
 */
.wpml-ls-legacy-list-horizontal {
	clear: both;
	padding: 7px;
	border: 1px solid transparent;
}

/*
 * `padding` is deliberately not reset: Divi's own `.et-l--header ul` rule has
 * equal specificity and, loading later, wins on the reference. Zeroing it here
 * would pull the switcher 24px to the right of its original position.
 */
.wpml-ls-legacy-list-horizontal > ul {
	margin: 0 !important;
	list-style-type: none;
}

.wpml-ls-legacy-list-horizontal .wpml-ls-item {
	display: inline-block;
	margin: 0;
	padding: 0;
	list-style-type: none;
}

.wpml-ls-legacy-list-horizontal a {
	display: block;
	padding: 5px 10px 6px;
	line-height: 1;
	text-decoration: none;
}

.wpml-ls-legacy-list-horizontal a span {
	vertical-align: middle;
}

/* Existing footer link reopens the replacement privacy panel. */
.hs-restored .borlabs-cookie-preference {
	cursor: pointer;
}

.hs-restored .et-l--header a:focus-visible,
.hs-restored .et-l--header [role="button"]:focus-visible,
.hs-restored .borlabs-cookie-preference:focus-visible {
	border-radius: 0.15rem;
	outline: 2px solid var(--hs-restored-orange);
	outline-offset: 4px;
}

/*
 * Promoted page titles render exactly as the h2 they replaced.
 *
 * Eight pages — the treatment layers and the voucher form, in both languages —
 * opened at h4 with no h1 anywhere. `wp hautsein promote_restoration_page_titles`
 * lifts the first h2 to `h1.hs-page-title`, matching the block rebuild.
 *
 * Divi's generated module CSS already declares `.et_pb_text_N h1, .et_pb_text_N h2`
 * together, and the theme's own scaler shares `h1, .entry-title, h2` at every
 * breakpoint at or below 1024px. Only the three rules above 1024px name `h2`
 * alone, so those are the only ones restated here — bounded by min-width so
 * they cannot reach the shared rules underneath.
 */
@media (min-width: 1641px) {
	body #page-container h1.hs-page-title {
		font-size: 70px !important;
		line-height: 90px !important;
	}
}

@media (min-width: 1025px) and (max-width: 1640px) {
	body #page-container h1.hs-page-title {
		font-size: calc(5.6314px + 3.92491vw) !important;
		line-height: calc(28.43px + 3.75427vw) !important;
	}
}

/* The Blog archive title is the only intentionally new element in this pass. */
body.blog .hs-blog-title-row {
	padding-top: clamp(1.5rem, 3vw, 3rem) !important;
	padding-bottom: 0 !important;
}

body.blog .hs-blog-title {
	margin-bottom: 0 !important;
}

body.blog #page-container .hs-blog-title h1 {
	padding-bottom: clamp(0.75rem, 1.5vw, 1.5rem) !important;
	font-size: clamp(2rem, 3vw, 3.25rem) !important;
	line-height: 1.15 !important;
}
