/**
 * Pendoah header: mega menu (desktop) and drawer (tablet / mobile).
 * Markup: inc/pendoah-header/header.php. Every rule is scoped to #pmm so the
 * theme, Elementor kit and plugin styles cannot leak in (or out).
 * Colours and font come from the Elementor global kit, with fallbacks.
 */

#pmm {
	--pmm-bar: var(--e-global-color-accent, #F3F3F3);
	--pmm-panel: var(--e-global-color-background, #FFFFFF);
	--pmm-accent: var(--e-global-color-primary, #FC3726);
	--pmm-ink: var(--e-global-color-text, #0D0B0B);
	--pmm-body: var(--e-global-color-text_light, #4F4F4F);
	--pmm-line: var(--e-global-color-border, #E0E0E0);
	--pmm-muted: #706B6A;
	--pmm-hover: #F6F4F3;
	--pmm-font: var(--e-global-typography-text-font-family, "Instrument Sans"), "Instrument Sans", sans-serif;

	--pmm-top: 24px;
	--pmm-side: 30px;
	--pmm-bar-h: 70px;
	--pmm-gap: 10px;
	--pmm-max: 1600px;
	--pmm-radius: 15px;

	position: fixed;
	top: var(--pmm-top);
	left: var(--pmm-side);
	right: var(--pmm-side);
	z-index: 990;
	pointer-events: none;
	margin: 0;
	padding: 0;
	font-family: var(--pmm-font);
	font-size: 16px;
	line-height: 1.3;
	color: var(--pmm-ink);
	text-align: left;
	-webkit-font-smoothing: antialiased;
	transition: transform .3s ease;
}

/* Hidden while scrolling down (header.js); slides back on scroll up. */
#pmm.is-hidden {
	transform: translateY(calc(-100% - var(--pmm-top) - 60px));
}

#pmm *,
#pmm *::before,
#pmm *::after {
	box-sizing: border-box;
}

#pmm .pmm-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

body.admin-bar #pmm {
	top: calc(var(--pmm-top) + 32px);
}

/* Bar ------------------------------------------------------------------- */

#pmm .pmm-bar {
	pointer-events: auto;
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	max-width: var(--pmm-max);
	height: var(--pmm-bar-h);
	margin: 0 auto;
	padding: 0 8px 0 24px;
	background: var(--pmm-bar);
	border-radius: var(--pmm-radius);
	box-shadow: 0 14px 36px -18px rgba(13, 11, 11, .45);
}

#pmm .pmm-logo {
	justify-self: start;
	display: flex;
	align-items: center;
	min-width: 0;
	line-height: 0;
}

#pmm .pmm-logo img {
	display: block;
	width: auto;
	height: 30px;
	max-width: 200px;
	margin: 0;
	border: 0;
	box-shadow: none;
}

#pmm .pmm-logo:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 4px;
	border-radius: 6px;
}

/* Lists: neutralise theme list styles. */
#pmm .pmm-menu,
#pmm .pmm-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

#pmm .pmm-menu > li,
#pmm .pmm-list > li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

#pmm .pmm-menu > li::before,
#pmm .pmm-list > li::before {
	content: none;
}

/* Desktop navigation ---------------------------------------------------- */

#pmm .pmm-nav {
	justify-self: center;
	min-width: 0;
}

#pmm .pmm-menu {
	display: flex;
	align-items: center;
	gap: 2px;
}

#pmm .pmm-entry {
	position: static;
}

#pmm .pmm-top,
#pmm .pmm-top:hover,
#pmm .pmm-top:focus,
#pmm .pmm-top:active {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	gap: 6px;
	width: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 10px;
	box-shadow: none;
	outline: none;
	color: var(--pmm-ink);
	font-family: var(--pmm-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease;
}

#pmm .pmm-top {
	background: transparent;
}

#pmm .pmm-top:hover {
	background: rgba(13, 11, 11, .05);
}

#pmm .pmm-entry.is-open > .pmm-top {
	background: rgba(13, 11, 11, .07);
}

#pmm .pmm-top:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 2px;
}

#pmm .pmm-caret {
	flex: none;
	width: 11px;
	height: 11px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	opacity: .55;
	transition: transform .18s ease, opacity .18s ease;
}

#pmm .pmm-entry.is-open > .pmm-top .pmm-caret {
	transform: rotate(180deg);
	opacity: 1;
}

/* Panels ---------------------------------------------------------------- */

#pmm .pmm-panel {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + var(--pmm-gap));
}

/* Invisible bridge over the gap so the pointer can travel from bar to panel. */
#pmm .pmm-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: calc(var(--pmm-gap) + 8px);
}

#pmm .pmm-entry.is-open > .pmm-panel {
	display: block;
}

#pmm .pmm-card {
	display: grid;
	align-items: start;
	column-gap: 32px;
	row-gap: 26px;
	padding: 28px 30px 30px;
	background: var(--pmm-panel);
	border-radius: 20px;
	box-shadow: 0 28px 60px -22px rgba(13, 11, 11, .45);
	max-height: calc(100vh - var(--pmm-top) - var(--pmm-bar-h) - var(--pmm-gap) - 24px);
	max-height: calc(100dvh - var(--pmm-top) - var(--pmm-bar-h) - var(--pmm-gap) - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

#pmm .pmm-entry.is-open > .pmm-panel .pmm-card {
	animation: pmm-in .18s ease-out;
}

@keyframes pmm-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

#pmm .pmm-c1 { grid-template-columns: minmax(0, 1fr) 320px; }
#pmm .pmm-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)) 320px; }
#pmm .pmm-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)) 320px; }

#pmm .pmm-group { min-width: 0; }
#pmm .pmm-gc1 { grid-column: 1; }
#pmm .pmm-gc2 { grid-column: 2; }
#pmm .pmm-gc3 { grid-column: 3; }
#pmm .pmm-gr1 { grid-row: 1; }
#pmm .pmm-gr2 { grid-row: 2; }

#pmm .pmm-rail {
	grid-column: -2;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

#pmm .pmm-rows2 .pmm-rail { grid-row: 1 / span 2; }

/* Group headings */
#pmm .pmm-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: var(--pmm-body);
	font-family: var(--pmm-font);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
}

#pmm .pmm-label--spacer {
	height: calc(12px * 1.4);
}

#pmm a.pmm-label-link:hover,
#pmm a.pmm-label-link[aria-current="page"] {
	color: var(--pmm-accent);
}

#pmm a.pmm-label-link:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Links */
#pmm .pmm-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0 -10px;
	padding: 7px 10px;
	border-radius: 10px;
	color: var(--pmm-ink);
	text-decoration: none;
	transition: background-color .15s ease;
}

#pmm .pmm-item.is-compact {
	padding-top: 5px;
	padding-bottom: 5px;
}

#pmm .pmm-item:hover {
	background: var(--pmm-hover);
	color: var(--pmm-ink);
}

#pmm .pmm-item:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: -2px;
}

#pmm .pmm-ico {
	flex: none;
	width: 21px;
	height: 21px;
	margin-top: 1px;
	fill: none;
	stroke: var(--pmm-body);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke .15s ease;
}

#pmm .pmm-txt {
	display: block;
	min-width: 0;
}

#pmm .pmm-t {
	display: block;
	color: var(--pmm-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	transition: color .15s ease;
}

#pmm .pmm-item.is-compact .pmm-t {
	font-size: 15px;
	font-weight: 500;
}

#pmm .pmm-d {
	display: block;
	margin-top: 2px;
	color: var(--pmm-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
}

#pmm .pmm-item:hover .pmm-t,
#pmm .pmm-item[aria-current="page"] .pmm-t {
	color: var(--pmm-accent);
}

#pmm .pmm-item:hover .pmm-ico,
#pmm .pmm-item[aria-current="page"] .pmm-ico {
	stroke: var(--pmm-accent);
}

/* Rail: CTA card */
#pmm .pmm-cta {
	display: block;
	padding: 20px 22px;
	border-radius: 18px;
	background: var(--pmm-accent);
	color: #FFFFFF;
	text-decoration: none;
	transition: background-color .2s ease;
}

#pmm .pmm-cta:hover {
	background: var(--pmm-ink);
	color: #FFFFFF;
}

#pmm .pmm-cta:focus-visible {
	outline: 2px solid var(--pmm-ink);
	outline-offset: 3px;
}

#pmm .pmm-k {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .9;
}

#pmm .pmm-h {
	display: block;
	margin-top: 8px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
}

#pmm .pmm-s {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 500;
}

/* Rail: offers */
#pmm .pmm-offers {
	padding: 4px 16px 4px;
	border-radius: 18px;
	background: var(--pmm-bar);
}

#pmm .pmm-offers .pmm-label {
	margin: 0;
	padding: 12px 0 2px;
}

#pmm .pmm-offer {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(13, 11, 11, .07);
	color: var(--pmm-ink);
	text-decoration: none;
}

#pmm .pmm-offers li:last-child .pmm-offer {
	border-bottom: 0;
}

#pmm .pmm-offer .pmm-ico {
	width: 19px;
	height: 19px;
	margin-top: 0;
}

#pmm .pmm-offer-t {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	transition: color .15s ease;
}

#pmm .pmm-offer-a {
	flex: none;
	width: 13px;
	height: 13px;
	fill: none;
	stroke: var(--pmm-accent);
	stroke-width: 2.2;
}

#pmm .pmm-offer:hover {
	color: var(--pmm-ink);
}

#pmm .pmm-offer:hover .pmm-offer-t {
	color: var(--pmm-accent);
}

#pmm .pmm-offer:hover .pmm-ico {
	stroke: var(--pmm-accent);
}

#pmm .pmm-offer:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 2px;
	border-radius: 6px;
}

/* Actions: site button + burger ----------------------------------------- */

#pmm .pmm-actions {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

/* Matches the site's theme button: white pill, dark text, red arrow tile. */
#pmm .pmm-btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 5px 5px 5px 22px;
	border: 0;
	border-radius: 16px;
	background: #FFFFFF;
	box-shadow: inset 0 0 0 1px var(--pmm-line);
	color: var(--pmm-ink);
	font-family: var(--pmm-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
}

#pmm .pmm-btn:hover,
#pmm .pmm-btn:focus {
	background: #FFFFFF;
	color: var(--pmm-ink);
}

#pmm .pmm-btn:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 2px;
}

#pmm .pmm-btn-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 30%;
	background: var(--pmm-accent);
	overflow: hidden;
}

#pmm .pmm-arrow {
	display: flex;
	transition: transform .35s linear;
}

#pmm .pmm-arrow svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: #FFFFFF;
}

#pmm .pmm-arrow--in {
	position: absolute;
	transform: translate3d(-26px, 26px, 0) scale(.2);
}

#pmm .pmm-btn:hover .pmm-arrow:not(.pmm-arrow--in),
#pmm .pmm-btn:focus-visible .pmm-arrow:not(.pmm-arrow--in) {
	transform: translate3d(26px, -26px, 0) scale(.2);
}

#pmm .pmm-btn:hover .pmm-arrow--in,
#pmm .pmm-btn:focus-visible .pmm-arrow--in {
	transform: translate3d(0, 0, 0) scale(1);
}

/* Only shown inside the mobile drawer. */
#pmm .pmm-btn--drawer {
	display: none;
}

#pmm .pmm-burger,
#pmm .pmm-burger:hover,
#pmm .pmm-burger:focus,
#pmm .pmm-burger:active {
	-webkit-appearance: none;
	appearance: none;
	display: none;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #FFFFFF;
	box-shadow: inset 0 0 0 1px var(--pmm-line);
	outline: none;
	line-height: 0;
	cursor: pointer;
}

#pmm .pmm-burger:focus-visible {
	outline: 2px solid var(--pmm-accent);
	outline-offset: 2px;
}

#pmm .pmm-burger svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--pmm-accent);
	stroke-width: 2;
	stroke-linecap: round;
}

#pmm .pmm-burger-close,
#pmm .pmm-burger[aria-expanded="true"] .pmm-burger-open {
	display: none;
}

#pmm .pmm-burger[aria-expanded="true"] .pmm-burger-close {
	display: block;
}

/* Desktop only ---------------------------------------------------------- */

@media (min-width: 1026px) {
	/* Without JavaScript, panels still open on hover and keyboard focus. */
	#pmm:not(.pmm-js) .pmm-entry:hover > .pmm-panel,
	#pmm:not(.pmm-js) .pmm-entry:focus-within > .pmm-panel {
		display: block;
	}
}

@media (min-width: 1026px) and (max-width: 1320px) {
	#pmm .pmm-c1 { grid-template-columns: minmax(0, 1fr) 280px; }
	#pmm .pmm-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)) 280px; }
	#pmm .pmm-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)) 280px; }
	#pmm .pmm-card { column-gap: 24px; padding: 24px 24px 26px; }
	#pmm .pmm-top { padding: 10px 11px; font-size: 15px; }
	#pmm .pmm-t,
	#pmm .pmm-item.is-compact .pmm-t { font-size: 14px; }
}

@media (min-width: 1026px) and (max-width: 1180px) {
	#pmm { --pmm-side: 20px; }
	#pmm .pmm-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)) 250px; }
	#pmm .pmm-card { column-gap: 20px; padding: 22px 20px 24px; }
	#pmm .pmm-top { padding: 9px 8px; font-size: 14.5px; gap: 5px; }
	#pmm .pmm-btn { padding-left: 16px; gap: 10px; font-size: 15px; }
	#pmm .pmm-logo img { height: 26px; }
}

/* Tablet and mobile: drawer --------------------------------------------- */

@media (max-width: 1025px) {
	#pmm {
		--pmm-top: 16px;
		--pmm-side: 2.5%;
		--pmm-bar-h: 66px;
	}

	#pmm .pmm-bar {
		grid-template-columns: 1fr auto;
		padding: 0 8px 0 20px;
	}

	#pmm .pmm-burger,
	#pmm .pmm-burger:hover,
	#pmm .pmm-burger:focus,
	#pmm .pmm-burger:active {
		display: flex;
	}

	#pmm .pmm-btn--bar {
		padding: 4px 4px 4px 18px;
	}

	#pmm .pmm-btn--bar .pmm-btn-icon {
		width: 40px;
		height: 40px;
	}

	#pmm .pmm-nav {
		display: none;
		justify-self: stretch;
		position: absolute;
		left: 0;
		right: 0;
		top: calc(100% + var(--pmm-gap));
		padding: 6px 0 4px;
		background: var(--pmm-panel);
		border-radius: 20px;
		box-shadow: 0 28px 60px -22px rgba(13, 11, 11, .5);
		max-height: calc(100vh - var(--pmm-top) - var(--pmm-bar-h) - var(--pmm-gap) - 16px);
		max-height: calc(100dvh - var(--pmm-top) - var(--pmm-bar-h) - var(--pmm-gap) - 16px);
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	#pmm.is-drawer-open .pmm-nav {
		display: block;
	}

	#pmm .pmm-menu {
		display: block;
	}

	#pmm .pmm-menu > li {
		border-bottom: 1px solid var(--pmm-line);
	}

	#pmm .pmm-top,
	#pmm .pmm-top:hover,
	#pmm .pmm-top:focus,
	#pmm .pmm-top:active {
		justify-content: space-between;
		width: 100%;
		padding: 17px 20px;
		border-radius: 0;
		background: transparent;
		font-size: 16px;
		font-weight: 600;
	}

	#pmm .pmm-entry.is-open > .pmm-top {
		background: transparent;
		color: var(--pmm-accent);
	}

	#pmm .pmm-caret {
		width: 13px;
		height: 13px;
	}

	#pmm .pmm-top:focus-visible {
		outline-offset: -2px;
	}

	#pmm .pmm-panel {
		position: static;
		padding: 0 20px 14px;
	}

	#pmm .pmm-panel::before {
		content: none;
	}

	#pmm .pmm-card {
		display: block;
		padding: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		max-height: none;
		overflow: visible;
	}

	#pmm .pmm-entry.is-open > .pmm-panel .pmm-card {
		animation: none;
	}

	#pmm .pmm-rail,
	#pmm .pmm-label--spacer {
		display: none;
	}

	#pmm .pmm-group + .pmm-group {
		margin-top: 14px;
	}

	/* A group without a heading continues the list above it. */
	#pmm .pmm-group + .pmm-group--cont {
		margin-top: 0;
		border-top: 1px solid rgba(13, 11, 11, .06);
	}

	#pmm .pmm-label {
		margin: 6px 0 2px;
	}

	/* Category headings that are links: bold, dark, with an arrow, so they read
	   as tappable and stand apart from plain grey section titles. */
	#pmm a.pmm-label-link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 8px 0 0;
		padding: 10px 0;
		color: var(--pmm-ink);
		font-size: 16px;
		font-weight: 700;
		letter-spacing: normal;
		text-transform: none;
	}

	#pmm a.pmm-label-link::after {
		content: "\2192";
		flex: none;
		color: var(--pmm-accent);
		font-size: 18px;
		font-weight: 600;
		line-height: 1;
	}

	#pmm a.pmm-label-link:hover,
	#pmm a.pmm-label-link[aria-current="page"] {
		color: var(--pmm-accent);
	}

	#pmm .pmm-item,
	#pmm .pmm-item.is-compact {
		margin: 0;
		padding: 11px 0;
		border-radius: 0;
		border-bottom: 1px solid rgba(13, 11, 11, .06);
	}

	#pmm .pmm-item:hover {
		background: transparent;
	}

	#pmm .pmm-list > li:last-child .pmm-item {
		border-bottom: 0;
	}

	#pmm .pmm-item .pmm-ico,
	#pmm .pmm-d {
		display: none;
	}

	#pmm .pmm-t,
	#pmm .pmm-item.is-compact .pmm-t {
		font-size: 15px;
		font-weight: 500;
	}

	#pmm .pmm-btn--drawer {
		display: flex;
		justify-content: space-between;
		margin: 12px 16px 14px;
	}
}

@media (max-width: 782px) {
	body.admin-bar #pmm {
		top: calc(var(--pmm-top) + 46px);
	}
}

@media (max-width: 767px) {
	#pmm {
		--pmm-top: 12px;
		--pmm-bar-h: 62px;
	}

	#pmm .pmm-btn--bar {
		display: none;
	}

	#pmm .pmm-bar {
		padding: 0 7px 0 16px;
	}

	#pmm .pmm-logo img {
		height: 26px;
		max-width: 150px;
	}

	#pmm .pmm-burger,
	#pmm .pmm-burger:hover,
	#pmm .pmm-burger:focus,
	#pmm .pmm-burger:active {
		width: 46px;
		height: 46px;
	}
}

@media (max-width: 380px) {
	#pmm .pmm-logo img {
		height: 23px;
		max-width: 124px;
	}
}

html.pmm-locked,
html.pmm-locked body {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	#pmm,
	#pmm *,
	#pmm *::before,
	#pmm *::after {
		animation: none !important;
		transition: none !important;
	}
}
