/**
 * IGSHOP Shop Kit — mega menu, phones and small tablets.
 *
 * Enqueued with media="(max-width: breakpoint)". Each mega item and each
 * column heading becomes a row with an arrow button; the button (added by
 * mega-menu.js) opens and closes the list under it.
 */

.qav-mm,
.qav-mm-heading {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
}

/* The name takes the row; tapping it still opens the page. */
.qav-mm > a,
.qav-mm-heading > a,
.qav-mm-heading > .qav-mm-nolink {
	flex: 1 1 0;
	min-width: 0;
}

/* A heading with no page opens its group when tapped anywhere. */
.qav-mm-heading-only > .qav-mm-nolink {
	cursor: pointer;
}

.qav-mm-toggle {
	display: inline-grid !important;
	place-items: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit !important;
	cursor: pointer;
}

/* The arrow, drawn in CSS so it picks up the menu's text colour. */
.qav-mm-toggle::before {
	content: "";
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
}

.qav-mm-open > .qav-mm-toggle::before {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.qav-mm > .sub-menu,
.qav-mm-heading > .sub-menu {
	display: none !important;
	flex: 0 0 100%;
	width: 100%;
}

.qav-mm.qav-mm-open > .sub-menu,
.qav-mm-heading.qav-mm-open > .sub-menu {
	display: block !important;
}

/* No room above the word on a phone: the top-level badge sits beside it,
   the same size and shape as every other badge. */
.qav-mm-badge--bubble {
	position: static;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.qav-mm-toggle::before {
		transition: none;
	}
}
