/* Mega menu (Terrifico Pro). Desktop navigation only; the mobile drawer keeps its nested lists. */

/* The panel spans the header row (content width) or the whole header (full width). */
.tf-mega-content .tf-header__row {
	position: relative;
}

.tf-mega-full .tf-header__main {
	position: relative;
}

.tf-nav .tf-mega {
	position: static;
}

.tf-nav .tf-mega > .sub-menu {
	display: grid;
	grid-template-columns: repeat(var(--tf-mega-cols, 3), minmax(0, 1fr));
	gap: 12px 32px;
	inset-inline: 0;
	width: auto;
	min-width: 0;
	padding: var(--tf-mega-padding, 28px);
}

.tf-mega-full .tf-nav .tf-mega > .sub-menu {
	border-radius: 0;
	border-inline: 0;
}

.tf-nav .tf-mega--cols-2 > .sub-menu { --tf-mega-cols: 2; }
.tf-nav .tf-mega--cols-3 > .sub-menu { --tf-mega-cols: 3; }
.tf-nav .tf-mega--cols-4 > .sub-menu { --tf-mega-cols: 4; }
.tf-nav .tf-mega--cols-5 > .sub-menu { --tf-mega-cols: 5; }

/* Auto: one column per submenu item, up to five. */
.tf-nav .tf-mega--cols-auto > .sub-menu {
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* Column headings. */
.tf-nav .tf-mega__col {
	position: static;
	min-width: 0;
}

.tf-nav .tf-mega__col > a {
	padding: 0 0 10px;
	font-weight: 700;
	font-size: 0.85em;
	letter-spacing: 0.04em;
	text-transform: var(--tf-mega-heading-case, uppercase);
	color: var(--tf-color-heading);
	background: none;
}

.tf-nav .tf-mega__col > a:hover {
	background: none;
	color: var(--tf-menu-hover);
}

.tf-nav .tf-mega__col > a[href="#"] {
	pointer-events: none;
}

/* Column links: the third level is always open, in place. */
.tf-nav .tf-mega__col > .sub-menu {
	position: static;
	display: block;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: none;
}

.tf-nav .tf-mega__col > .sub-menu a {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 8px 10px;
	margin-inline: -10px;
	border-radius: var(--tf-radius-sm);
}

.tf-nav--dividers .tf-mega__col > .sub-menu li + li {
	border-top: 0;
}

.tf-nav .tf-mega .sub-menu .tf-submenu-toggle {
	display: none;
}

.tf-mega__desc {
	display: block;
	font-size: 0.85em;
	font-weight: 400;
	line-height: 1.4;
	color: var(--tf-color-text);
	opacity: 0.8;
}

/* Admin: the Menus screen box. */
.tf-mega-field select {
	margin-top: 2px;
}
