/*****
Sliding Door image menu
v 3.0

The doors slide using CSS only (flexbox + transitions), so no JavaScript
library is needed. Each door is a normal link, so it works with the
keyboard and on touch screens too.

Based on the look of Image Menu v2.2 by Samuel Birch (phatfusion).
	*****/

#imageMenu {
	height: auto;
	overflow: hidden;
	border-style: none;
	margin: 0 auto;
	width: auto;
	max-width: 100%;
	padding: 8px 0 2px 0;
	container-type: inline-size;
}

#imageMenu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	height: auto;
	display: flex;
	flex-wrap: nowrap;
}

#imageMenu ul li {
	float: none;
	flex: 1 1 0%;
	min-width: 0;
	padding-bottom: 12px;
	padding-top: 12px;
	border-top-style: solid;
	border-top-width: 1px;
	border-bottom-style: solid;
	border-bottom-width: 1px;
	border-color: white;
	transition: flex-basis 0.4s ease-out;
}

#imageMenu ul li a {
	text-indent: -1000px;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: left top;
	background-size: cover;
	border-right: 2px solid #fff;
	cursor: pointer;
	display: block;
	overflow: hidden;
	width: auto;
	/* 200px tall on a full width screen, shrinking in proportion on small screens */
	height: 200px;
	height: min(200px, 21.1cqw);
	margin: 0;
	padding: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

#imageMenu ul li:last-child a {
	border-right-style: none;
}

/* The door under the mouse (or keyboard focus) slides open.
   With seven doors, 22.22% extra makes the open door three times as wide
   as the closed ones. */

#imageMenu ul li:hover,
#imageMenu ul li:focus-within {
	flex-basis: 22.22%;
}

/* "Leave Sliders open" theme option: header.php adds the class sd-open-N
   to #imageMenu and door N stays open until another door is pointed at. */

#imageMenu.sd-open-0 li.bk0,
#imageMenu.sd-open-1 li.bk1,
#imageMenu.sd-open-2 li.bk2,
#imageMenu.sd-open-3 li.bk3,
#imageMenu.sd-open-4 li.bk4,
#imageMenu.sd-open-5 li.bk5,
#imageMenu.sd-open-6 li.bk6 {
	flex-basis: 22.22%;
}

#imageMenu[class*="sd-open-"] ul:hover li:not(:hover),
#imageMenu[class*="sd-open-"] ul:focus-within li:not(:focus-within) {
	flex-basis: 0%;
}

@media (prefers-reduced-motion: reduce) {
	#imageMenu ul li {
		transition: none;
	}
}

.clear {
	clear: both;
}
