/**
 * SE Header (mod_seheader)
 * Copyright (C) 2026 SE24 Media. All rights reserved.
 * GNU General Public License version 2 or later.
 *
 * Colours, fonts and sizes come from CSS custom properties written per instance
 * (#sehd-{id}). The desktop/mobile switch is written inline at the breakpoint
 * chosen in the module, toggling .sehd__desktop-only / .sehd__mobile-only.
 */

.sehd {
	position: relative;
	z-index: 1000;
	font-family: var(--sehd-font-nav, inherit);
	line-height: 1.5;
	color: var(--sehd-nav, #0E1B2C);
}

.sehd *,
.sehd *::before,
.sehd *::after {
	box-sizing: border-box;
}

.sehd--bleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* 100vw includes the scrollbar on Windows; clip the few pixels of overflow it causes */
body:has(.sehd--bleed) {
	overflow-x: clip;
}

.sehd__mobile-only {
	display: none;
}

.sehd [hidden] {
	display: none !important;
}

.sehd__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

html.sehd-lock,
html.sehd-lock body {
	overflow: hidden;
}

/* ---------- Utility bar (desktop) ---------- */
.sehd__utility {
	background: var(--sehd-utility-bg, #0E1B2C);
	color: var(--sehd-utility-text, #DCE3EC);
	font-size: var(--sehd-utility-size, 14px);
}

.sehd__utility-inner {
	max-width: var(--sehd-maxw, 1200px);
	margin: 0 auto;
	padding: 10px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}

.sehd__utility-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 22px;
}

.sehd .sehd__utility a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: transparent;
}

.sehd .sehd__utility a:hover,
.sehd .sehd__utility a:focus-visible {
	text-decoration-color: currentColor;
}

.sehd .sehd__utility .sehd__utility-phone {
	font-weight: 700;
	text-decoration: none;
}

.sehd__status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sehd__dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sehd-dot, #5FD39B);
	display: inline-block;
}

/* ---------- Notice strip (mobile) ---------- */
.sehd__notice {
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--sehd-utility-bg, #0E1B2C);
	color: var(--sehd-utility-text, #DCE3EC);
	font-size: 13px;
	text-align: center;
}

.sehd__notice .sehd__dot {
	width: 7px;
	height: 7px;
}

/* ---------- Main bar ---------- */
.sehd__bar {
	position: relative;
	z-index: 100;
	background: var(--sehd-header-bg, #FFFFFF);
	border-bottom: 1px solid var(--sehd-border, #E3E6EA);
}

.sehd.is-stuck .sehd__bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	box-shadow: 0 6px 24px rgba(14, 27, 44, 0.08);
}

.sehd__bar-inner {
	max-width: var(--sehd-maxw, 1200px);
	margin: 0 auto;
	padding: var(--sehd-pad-y, 18px) 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}

/* Logo */
.sehd .sehd__logo {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	color: var(--sehd-logo, #0E1B2C);
	text-decoration: none;
}

.sehd__mark {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: var(--sehd-mark-radius, 8px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--sehd-mark-bg, #0E1B2C);
	color: var(--sehd-mark-fg, #FFFFFF);
	overflow: hidden;
}

.sehd__mark--meridian svg {
	width: 100%;
	height: 100%;
}

.sehd__mark-line {
	stroke: var(--sehd-accent, #C8102E);
}

.sehd__logo-words {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.05;
}

.sehd__logo-words .sehd__logo-text {
	line-height: 1.05;
}

.sehd__tagline {
	margin-top: 2px;
	font-family: var(--sehd-font-logo, inherit);
	font-weight: 500;
	font-size: calc(var(--sehd-logo-size, 19px) * 0.68);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sehd-tagline, #4A5565);
	white-space: nowrap;
}

.sehd__logo-text {
	font-family: var(--sehd-font-logo, inherit);
	font-weight: var(--sehd-logo-weight, 700);
	font-size: var(--sehd-logo-size, 22px);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.sehd__logo-img {
	display: block;
	width: auto;
	height: var(--sehd-logo-h, 44px);
}

/* Right-hand group: one row. When it can't fit, the script switches to the mobile menu. */
.sehd__right {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px var(--sehd-nav-gap, 28px);
}

/* ---------- Shared menu reset ----------
 * Templates often add margins to nav and lists; the header controls its own spacing. */
.sehd .sehd__nav,
.sehd .sehd__panel-nav {
	margin: 0;
	padding: 0;
}

.sehd .sehd__menu,
.sehd .sehd__sub {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sehd .sehd__item {
	margin: 0;
	padding: 0;
}

.sehd .sehd__row {
	display: flex;
	align-items: center;
}

.sehd .sehd__link {
	color: var(--sehd-nav, #0E1B2C);
	text-decoration: none;
	font-family: inherit;
}

.sehd .sehd__link--btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}

.sehd .sehd__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sehd-nav, #0E1B2C);
	cursor: pointer;
}

.sehd__chev {
	transition: transform 0.2s ease;
}

.sehd [aria-expanded="true"] > .sehd__chev {
	transform: rotate(180deg);
}

/* ---------- Desktop nav ---------- */
.sehd__nav .sehd__menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px var(--sehd-nav-gap, 28px);
}

.sehd__nav .sehd__item--1 {
	position: relative;
}

.sehd__nav .sehd__item--1 > .sehd__row > .sehd__link {
	padding: 8px 0;
	white-space: nowrap;
	font-size: var(--sehd-nav-size, 16px);
	font-weight: var(--sehd-nav-weight, 500);
}

.sehd__nav .sehd__item--1 > .sehd__row > .sehd__toggle {
	width: 26px;
	height: 32px;
	margin-left: 2px;
	border-radius: 8px;
}

.sehd .sehd__nav .sehd__link:hover,
.sehd .sehd__nav .sehd__link:focus-visible,
.sehd .sehd__nav .is-active > .sehd__row > .sehd__link {
	color: var(--sehd-nav-active, #C8102E);
}

.sehd .sehd__nav .sehd__item--1.is-current > .sehd__row > .sehd__link,
.sehd .sehd__nav .sehd__item--1.is-active > .sehd__row > .sehd__link {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}

/* Dropdown */
.sehd__nav .sehd__sub--2 {
	position: absolute;
	top: 100%;
	left: -14px;
	z-index: 110;
	min-width: 240px;
	margin-top: 8px;
	padding: 8px;
	display: none;
	background: var(--sehd-dropdown-bg, #FFFFFF);
	border: 1px solid var(--sehd-border, #E3E6EA);
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(14, 27, 44, 0.14);
}

/* Invisible bridge so the dropdown stays open while the pointer crosses the gap */
.sehd__nav .sehd__sub--2::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -10px;
	height: 10px;
}

.sehd__nav .sehd__sub--2.is-open,
.sehd__nav .sehd__item--1:focus-within > .sehd__sub--2 {
	display: block;
}

@media (hover: hover) {
	.sehd__nav .sehd__item--1:hover > .sehd__sub--2 {
		display: block;
	}
}

.sehd__nav .sehd__sub .sehd__row {
	display: block;
}

.sehd .sehd__nav .sehd__sub .sehd__link {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
}

.sehd .sehd__nav .sehd__sub .sehd__link:hover,
.sehd .sehd__nav .sehd__sub .sehd__link:focus-visible {
	background: var(--sehd-dropdown-hover, #F3F4F6);
}

.sehd .sehd__nav .sehd__sub .is-current > .sehd__row > .sehd__link {
	color: var(--sehd-nav-active, #C8102E);
	font-weight: 600;
}

.sehd__nav .sehd__sub--3 {
	padding: 0 0 4px 12px;
}

.sehd .sehd__nav .sehd__sub--3 .sehd__link {
	padding: 7px 14px;
	font-size: 14px;
	color: var(--sehd-muted, #4A5565);
}

/* Phone number in the bar */
.sehd .sehd__bar-phone {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--sehd-nav, #0E1B2C);
	font-size: var(--sehd-nav-size, 15px);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.sehd .sehd__bar-phone svg {
	width: 18px;
	height: 18px;
}

.sehd .sehd__bar-phone:hover,
.sehd .sehd__bar-phone:focus-visible {
	color: var(--sehd-nav-active, #C8102E);
}

/* ---------- Buttons ---------- */
.sehd .sehd__book {
	flex: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: var(--sehd-btn-radius, 8px);
	background: var(--sehd-accent, #C8102E);
	color: var(--sehd-btn-text, #FFFFFF);
	font-weight: 600;
	font-size: var(--sehd-nav-size, 16px);
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: filter 0.15s ease;
}

.sehd .sehd__book:hover,
.sehd .sehd__book:focus-visible {
	filter: brightness(0.9);
	color: var(--sehd-btn-text, #FFFFFF);
}

.sehd .sehd__call {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 20px;
	border-radius: var(--sehd-btn-radius, 8px);
	border: 1.5px solid var(--sehd-nav, #0E1B2C);
	color: var(--sehd-nav, #0E1B2C);
	font-weight: 600;
	text-decoration: none;
}

.sehd .sehd__icon-btn {
	width: 44px;
	height: 44px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--sehd-nav, #0E1B2C);
	cursor: pointer;
}

.sehd .sehd__icon-btn--menu {
	background: var(--sehd-menu-btn-bg, #F3F4F6);
}

.sehd a:focus-visible,
.sehd button:focus-visible {
	outline: 3px solid var(--sehd-accent, #C8102E);
	outline-offset: 2px;
}

.sehd__mobile-actions {
	align-items: center;
	gap: 4px;
}

/* ---------- Mobile panel ---------- */
.sehd__panel {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	background: var(--sehd-panel-bg, #FFFFFF);
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.sehd__panel.is-open {
	transform: none;
}

.sehd__panel-head {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	background: var(--sehd-panel-bg, #FFFFFF);
	border-bottom: 1px solid var(--sehd-border, #E3E6EA);
}

.sehd__panel-head .sehd__logo-text {
	font-size: var(--sehd-logo-size-m, 18px);
}

.sehd__panel-head .sehd__logo-img {
	height: var(--sehd-logo-h-m, 36px);
}

.sehd__panel-head .sehd__mark {
	width: 34px;
	height: 34px;
	border-radius: 10px;
}

.sehd .sehd__panel-nav {
	padding: 4px 16px 8px;
}

.sehd__panel-nav .sehd__item--1 {
	border-bottom: 1px solid var(--sehd-border, #E3E6EA);
}

.sehd__panel-nav .sehd__row {
	justify-content: space-between;
	gap: 8px;
}

.sehd .sehd__panel-nav .sehd__item--1 > .sehd__row > .sehd__link {
	flex: 1 1 auto;
	padding: 14px 0;
	font-family: var(--sehd-font-logo, inherit);
	font-size: var(--sehd-panel-size, 22px);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.sehd .sehd__panel-nav .sehd__link--btn {
	justify-content: space-between;
	width: 100%;
	text-align: left;
}

/* Heading-type items: make the chevron match the separate toggle buttons */
.sehd .sehd__panel-nav .sehd__link--btn .sehd__chev {
	box-sizing: content-box;
	flex: none;
	padding: 14px;
	border-radius: 12px;
	background: var(--sehd-menu-btn-bg, #F3F4F6);
}

.sehd .sehd__panel-nav .sehd__toggle {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--sehd-menu-btn-bg, #F3F4F6);
}

.sehd__panel-nav .sehd__sub {
	padding: 0 0 12px 2px;
}

.sehd .sehd__panel-nav .sehd__sub .sehd__link {
	flex: 1 1 auto;
	display: block;
	padding: 10px 0;
	font-size: 17px;
	font-weight: 500;
}

.sehd__panel-nav .sehd__sub--3 {
	padding: 0 0 6px 14px;
}

.sehd .sehd__panel-nav .sehd__sub--3 .sehd__link {
	padding: 8px 0;
	font-size: 16px;
	color: var(--sehd-muted, #4A5565);
}

.sehd .sehd__panel-nav .is-current > .sehd__row > .sehd__link {
	color: var(--sehd-nav-active, #C8102E);
}

.sehd__panel-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
}

.sehd .sehd__book--block,
.sehd .sehd__call--block {
	width: 100%;
	min-height: 52px;
}

.sehd__panel-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 16px;
	font-size: 15px;
	color: var(--sehd-muted, #4A5565);
}

/* ---------- Sticky bottom bar (mobile) ---------- */
.sehd__bottom {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900;
	gap: 10px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	background: var(--sehd-header-bg, #FFFFFF);
	border-top: 1px solid var(--sehd-border, #E3E6EA);
	box-shadow: 0 -8px 24px rgba(14, 27, 44, 0.08);
}

.sehd .sehd__bottom .sehd__call {
	flex: 1 1 0;
}

.sehd .sehd__bottom .sehd__book {
	flex: 1.6 1 0;
	min-height: 52px;
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.sehd__panel,
	.sehd__chev,
	.sehd .sehd__book {
		transition: none;
	}
}
