/* Promenade Fullscreen Menu
 * Colours and sizes come from CSS variables printed by the plugin. The
 * fallbacks here match the plugin defaults.
 */

:root {
	--pfm-button-size: 70px;
}

/* ---------- Button ---------- */

.pfm-toggle {
	position: fixed;
	top: var(--pfm-top, 65px);
	/* Phones and tablets: button centre sits 90% across the window. */
	left: calc(90% - 35px);
	z-index: 2147483647;
	display: block;
	box-sizing: border-box;
	width: var(--pfm-button-size);
	min-width: 0;
	max-width: none;
	height: var(--pfm-button-size);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--pfm-button, #182549);
	box-shadow: none;
	text-shadow: none;
	font-size: 14px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	transform: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.3s;
}

/* "Stays in the header": the button is placed on the page, not on the
 * window, so it scrolls away with the header. */
.pfm-toggle--in-header {
	position: absolute;
}

/* Inside the theme's header slot: the button is an ordinary item in the
 * header, centred in the slot, so it moves with the header whether that is
 * sticky, sliding or still. */
.pfm-toggle.pfm-toggle--slotted {
	position: relative;
	top: auto;
	left: auto;
	z-index: 2;
	flex: 0 0 auto;
	margin-right: auto;
	margin-left: auto;
}

/* Wide screens: line the button up with the right edge of the content area. */
@media (min-width: 1200px) {
	.pfm-toggle {
		left: calc(50% + var(--pfm-half-container, 550px) - var(--pfm-button-size));
	}
}

.pfm-toggle:hover,
.pfm-toggle:focus {
	background: var(--pfm-button, #182549);
	outline: 0;
}

.pfm-toggle:focus-visible {
	outline: 2px solid var(--pfm-bar, #fff);
	outline-offset: 2px;
}

.pfm-bar {
	position: absolute;
	left: 12.5px;
	width: 45px;
	height: 3px;
	border-radius: 8px;
	background: var(--pfm-bar, #fff);
	transition: transform 0.6s ease-in-out, opacity 0.3s ease-in-out, top 0.6s ease-in-out;
}

.pfm-bar--top { top: 22px; }
.pfm-bar--mid { top: 33.5px; }
.pfm-bar--bot { top: 45px; }

/* Open: the three lines become an X. */
.pfm-toggle.is-open .pfm-bar--top {
	top: 33.5px;
	transform: rotate(45deg);
}

.pfm-toggle.is-open .pfm-bar--mid {
	opacity: 0;
}

.pfm-toggle.is-open .pfm-bar--bot {
	top: 33.5px;
	transform: rotate(-45deg);
}

/* "MENU" under the button, wide screens only, hidden while the menu is open. */
.pfm-label {
	display: none;
	position: absolute;
	top: calc(100% + 9px);
	left: 0;
	width: 100%;
	color: var(--pfm-label, #2ac5f4);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 14px;
	text-align: center;
	letter-spacing: normal;
	text-transform: none;
	transition: opacity 0.3s;
}

@media (min-width: 980px) {
	.pfm-label {
		display: block;
	}
}

.pfm-toggle.is-open .pfm-label {
	opacity: 0;
}

/* ---------- Overlay ---------- */

.pfm-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9999999;
	display: flex;
	background: var(--pfm-overlay, #2cc4f2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.6s ease-out, visibility 0s linear 0.6s;
}

.pfm.is-open .pfm-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.6s ease-out, visibility 0s;
}

.pfm-nav {
	display: flex;
	width: 100%;
	height: 100%;
	padding: 100px 0;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

/* Links fade in a moment after the background. */
.pfm.is-open .pfm-nav {
	opacity: 1;
	transition: opacity 1s ease-in-out 0.5s;
}

.pfm-scroll {
	width: -moz-max-content;
	width: max-content;
	min-width: 350px;
	max-width: 100%;
	min-height: 75vh;
	max-height: 80vh;
	margin: 0 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---------- Menu list ---------- */

.pfm-menu,
.pfm-menu ul {
	margin: 0;
	padding: 0;
	list-style: none !important;
}

.pfm-menu {
	text-align: left;
}

@media (min-width: 768px) {
	.pfm-menu {
		columns: var(--pfm-columns, 2);
	}
}

.pfm-menu li {
	position: relative;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--pfm-text, #fff);
}

/* Some themes add their own bullets or arrows to list items. */
.pfm-menu li::before,
.pfm-menu li::after,
.pfm-menu a::after {
	content: none;
}

.pfm-menu a {
	position: relative;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--pfm-text, #fff) !important;
	font-family: inherit;
	font-weight: var(--pfm-weight, 100) !important;
	letter-spacing: normal;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	transition: padding 0.3s, color 0.3s;
}

.pfm-menu a:focus {
	outline: 0;
}

.pfm-menu a:focus-visible {
	outline: 2px solid var(--pfm-text, #fff);
	outline-offset: 3px;
}

/* Top level */
.pfm-menu > li > a {
	display: inline-block;
	font-size: 42px;
	line-height: 51px;
}

/* A line slides in beside a top-level item on hover. */
.pfm-menu > li > a::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 0;
	height: 3px;
	background: var(--pfm-text, #fff);
	transform: translateY(-50%);
	transition: width 0.3s;
}

@media (hover: hover) {
	.pfm-menu > li:hover > a {
		padding-left: 70px;
	}

	.pfm-menu > li:hover > a::before {
		width: 50px;
	}
}

/* Second and third levels, always open. */
.pfm-menu .sub-menu {
	margin: 14px 30px;
}

.pfm-menu .sub-menu li {
	line-height: 30px;
}

.pfm-menu .sub-menu a {
	font-size: 20px;
	line-height: normal;
}

.pfm-menu .sub-menu a:hover,
.pfm-menu .sub-menu a:focus {
	text-decoration: underline;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 1024px) {
	.pfm-scroll {
		max-height: 65vh;
	}
}

@media (max-width: 768px) {
	.pfm-nav {
		margin-top: 50px;
		padding: 30px 0;
	}

	.pfm-menu li {
		padding: 0 20px;
	}

	.pfm-menu > li {
		line-height: 45px;
	}

	.pfm-menu > li > a,
	.pfm-menu .sub-menu a {
		font-size: 23px;
	}

	.pfm-menu > li > a {
		line-height: 45px;
	}
}

@media (max-width: 400px) {
	.pfm-scroll {
		min-width: 0;
		width: 100%;
	}
}

/* ---------- Page behind the menu ---------- */

body.pfm-lock {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.pfm-toggle,
	.pfm-bar,
	.pfm-label,
	.pfm-overlay,
	.pfm.is-open .pfm-overlay,
	.pfm-nav,
	.pfm.is-open .pfm-nav,
	.pfm-menu a,
	.pfm-menu > li > a::before {
		transition: none;
	}
}
