/*
 * Restore clickable dropdowns for the modernized Nemrud menu.
 * Presentation only. Does not change markup or destinations.
 */

#access {
	position: relative;
	z-index: 50;
}

#access > .menu {
	display: block;
}

#access > .menu > ul {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

#access ul ul {
	position: absolute;
	z-index: 4000;
	display: none;
	flex-direction: column;
	align-items: stretch;
	width: min(300px, 88vw);
	max-height: min(70vh, 560px);
	overflow-x: hidden;
	overflow-y: auto;
	pointer-events: auto;
}

#access ul ul ul {
	position: static;
	z-index: auto;
	display: block;
	width: 100%;
	max-height: none;
	overflow: visible;
	pointer-events: auto;
}

#access li:hover > ul,
#access li:focus-within > ul {
	display: flex;
	flex-direction: column;
}

#access ul ul li:hover > ul,
#access ul ul li:focus-within > ul {
	display: block;
}

#access ul ul li,
#access ul ul a {
	position: relative;
	z-index: 1;
	float: none;
	width: 100%;
	pointer-events: auto;
}

#content,
#contentColumn,
#colRight,
#flags {
	z-index: 0;
}

@media (max-width: 760px) {
	#access > .menu > ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
