.docandtee-header {
	position: relative;
}

.docandtee-mega-menu,
.wp-block-docandtee-mega-menu {
	position: static;
}

.docandtee-header__bar:has(.docandtee-mega-menu__toggle) {
	position: relative;
	/* Beat leftover block inline padding from a customized header template part. */
	padding-block: 0 !important;
	padding-inline-end: calc(2.75rem + var(--wp--preset--spacing--30, 1rem));
}

/* Positioned against the bar and vertically centred with the logo/extras row. */
.docandtee-header__bar .docandtee-mega-menu__toggle {
	top: 50%;
	transform: translateY(-50%);
}

.docandtee-mega-menu__extras {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--40, 1.5rem);
}

.docandtee-mega-menu__extras > * {
	margin-block: 0;
}

/* Social links pattern ships with block padding; strip it in the header. */
.docandtee-mega-menu__extras .wp-block-group:has(.wp-block-social-links) {
	padding-block: 0 !important;
}

@media (min-width: 960px) {
	
	.docandtee-mega-menu__shell:not(.is-overlay-open) .docandtee-mega-menu__extras {
		border: 1px solid var(--wp--preset--color--light);
		gap: 0;
	}

	.docandtee-mega-menu__shell:not(.is-overlay-open) .docandtee-mega-menu__extras > * {
		display: flex;
		align-items: center;
		border: 1px solid var(--wp--preset--color--light);
		padding-left: 1rem;
		padding-right: 1rem;
		box-sizing: border-box;
	}

	.docandtee-mega-menu__shell:not(.is-overlay-open) .docandtee-mega-menu__extras > .wp-block-buttons-is-layout-flex {
		padding-left: 0;
		padding-right: 0;
	}
}

.docandtee-mega-menu__shell.is-overlay-open .docandtee-mega-menu__extras {
	flex-direction: column;
	justify-content: center;
	margin-top: var(--wp--preset--spacing--50, 2rem);
	text-align: center;
}

/* Wide screens: while closed, the overlay shows only its extras, inline in the header. */
@media (min-width: 960px) {
	.docandtee-mega-menu__shell:not(.is-overlay-open) .docandtee-mega-menu__overlay:has(.docandtee-mega-menu__extras) {
		display: block;
		position: static;
		padding: 0;
		overflow: visible;
		background: none;
		color: inherit;
	}

	.docandtee-mega-menu__shell:not(.is-overlay-open) .docandtee-mega-menu__list {
		display: none;
	}
}

.docandtee-mega-menu__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	width: 100%;
	max-width: var(--wp--style--global--content-size, 960px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.docandtee-mega-menu-item {
	position: static;
	width: 100%;
	margin: 0;
	text-align: center;
}

/* Fill backwards only: a transform kept after the animation would make the item the containing block for its panel. */
.docandtee-mega-menu__list > .docandtee-mega-menu-item {
	animation: docandtee-mega-menu-slide-up 0.3s ease-out backwards;
}

.docandtee-mega-menu__list > .docandtee-mega-menu-item:nth-child(2) {
	animation-delay: 0.1s;
}

.docandtee-mega-menu__list > .docandtee-mega-menu-item:nth-child(3) {
	animation-delay: 0.2s;
}

.docandtee-mega-menu__list > .docandtee-mega-menu-item:nth-child(4) {
	animation-delay: 0.3s;
}

.docandtee-mega-menu__list > .docandtee-mega-menu-item:nth-child(n + 5) {
	animation-delay: 0.4s;
}

.docandtee-mega-menu-item__toggle,
.docandtee-mega-menu-item__link,
.docandtee-mega-menu-item__label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	width: 100%;
	padding: 0.85rem 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--light);
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	text-transform: uppercase;
}

.docandtee-mega-menu-item__icon {
	display: block;
	flex-shrink: 0;
	width: 0.85em;
	height: 0.85em;
	fill: currentColor;
	transform: rotate(0deg);
	transition: transform 0.2s ease;
}

.docandtee-mega-menu-item.is-open > .docandtee-mega-menu-item__toggle .docandtee-mega-menu-item__icon {
	transform: rotate(180deg);
}

.docandtee-mega-menu-item__link:hover,
.docandtee-mega-menu-item__link:focus-visible,
.docandtee-mega-menu-item__toggle:hover,
.docandtee-mega-menu-item__toggle:focus-visible {
	color: var(--wp--preset--color--primary);
}

.docandtee-mega-menu-item__panel {
	position: static;
	left: auto;
	width: 100%;
	margin: 0;
	padding: 0 0 1rem;
	border: 0;
	box-sizing: border-box;
	background: transparent;
	box-shadow: none;
}

.docandtee-mega-menu-item__panel[hidden],
.docandtee-mega-menu-item__panel:not(.is-open) {
	display: none;
}

.docandtee-mega-menu-item__panel.is-open {
	display: block;
	animation: docandtee-mega-menu-fade-in 0.3s ease;
}

@keyframes docandtee-mega-menu-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column {
	animation: docandtee-mega-menu-slide-up 0.3s ease-out both;
	animation-delay: 0.5s;
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column:nth-child(1) {
	animation-delay: 0s;
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column:nth-child(2) {
	animation-delay: 0.1s;
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column:nth-child(3) {
	animation-delay: 0.2s;
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column:nth-child(4) {
	animation-delay: 0.3s;
}

.docandtee-mega-menu-item__panel.is-open .wp-block-column:nth-child(5) {
	animation-delay: 0.4s;
}

@keyframes docandtee-mega-menu-slide-up {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.docandtee-mega-menu-item__panel-inner {
	max-width: none;
	margin-inline: auto;
	padding-inline: 0;
	box-sizing: border-box;
	text-align: center;
}

.docandtee-mega-menu-item__panel-inner .wp-block-paragraph {
	margin: 0 !important;
}

.docandtee-mega-menu__list a {
	color: var(--wp--preset--color--light);
}

.docandtee-mega-menu__list a:hover,
.docandtee-mega-menu__list a:focus-visible {
	color: var(--wp--preset--color--primary);
}

.docandtee-mega-menu-item__panel-inner .wp-block-columns {
	display: block;
}

.docandtee-mega-menu-item__panel-inner .wp-block-column {
	width: 100%;
	margin: 0 0 1rem;
}

.wp-block-heading {
	margin: 0 0 1rem;
}

.docandtee-mega-menu__toggle {
	position: absolute;
	top: var(--wp--preset--spacing--30, 1rem);
	right: 0;
	z-index: 100001;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}

.docandtee-mega-menu__toggle:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 4px;
}

.docandtee-mega-menu__toggle[aria-expanded="true"] {
	color: var(--wp--preset--color--light);
}

.docandtee-mega-menu__burger {
	position: relative;
	display: block;
	width: 1.5rem;
	height: 1rem;
}

.docandtee-mega-menu__burger-line {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transition: translate 0.15s ease 0.15s, rotate 0.15s ease, opacity 0s linear 0.15s;
}

.docandtee-mega-menu__toggle[aria-expanded="true"] .docandtee-mega-menu__burger-line {
	transition: translate 0.15s ease, rotate 0.15s ease 0.15s, opacity 0s linear 0.15s;
}

.docandtee-mega-menu__burger-line:nth-child(1) {
	top: 0;
}

.docandtee-mega-menu__burger-line:nth-child(2) {
	top: 7px;
}

.docandtee-mega-menu__burger-line:nth-child(3) {
	top: 14px;
}

.docandtee-mega-menu__toggle[aria-expanded="true"] .docandtee-mega-menu__burger-line:nth-child(1) {
	translate: 0 7px;
	rotate: 45deg;
}

.docandtee-mega-menu__toggle[aria-expanded="true"] .docandtee-mega-menu__burger-line:nth-child(2) {
	opacity: 0;
}

.docandtee-mega-menu__toggle[aria-expanded="true"] .docandtee-mega-menu__burger-line:nth-child(3) {
	translate: 0 -7px;
	rotate: -45deg;
}

.docandtee-mega-menu__overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	padding: calc(var(--docandtee-header-height, 4.5rem) + var(--wp--preset--spacing--40, 1.5rem)) var(--wp--preset--spacing--40, 1.5rem) var(--wp--preset--spacing--60, 3rem);
	overflow: auto;
	background: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--light);
}

.docandtee-mega-menu__shell.is-overlay-open .docandtee-mega-menu__overlay {
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: docandtee-mega-menu-fade-in 0.3s ease;
}

.docandtee-mega-menu__overlay :focus-visible {
	outline-color: currentColor;
}

body:has(.docandtee-mega-menu__shell.is-overlay-open) {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.docandtee-mega-menu-item__panel {
		box-shadow: none;
	}

	.docandtee-mega-menu__shell.is-overlay-open .docandtee-mega-menu__overlay,
	.docandtee-mega-menu__list > .docandtee-mega-menu-item,
	.docandtee-mega-menu-item__panel.is-open,
	.docandtee-mega-menu-item__panel.is-open .wp-block-column {
		animation: none;
	}

	.docandtee-mega-menu-item__icon {
		transition: none;
	}

	.docandtee-mega-menu__burger-line,
	.docandtee-mega-menu__toggle[aria-expanded="true"] .docandtee-mega-menu__burger-line {
		transition: none;
	}
}
