/**
 * Schubfach-Menü für schmale Bildschirme.
 *
 * CI: Main #db2978, Text #181818, Fläche #fff.
 * Fährt von rechts ein, deckt die Seite mit einem dunklen Schleier ab und
 * zeigt die Seiten des Hauptmenüs, darunter die Sprachwahl.
 */

.bul-nav {
	--bul-nav-main: #db2978;
	--bul-nav-dark: #b81f63;
	--bul-nav-ink: #181818;
	--bul-nav-muted: #6b6b70;
	--bul-nav-line: #ececf1;
	position: fixed;
	inset: 0;
	z-index: 100000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bul-nav[hidden] {
	display: none;
}

/* Schleier */
.bul-nav__scrim {
	position: absolute;
	inset: 0;
	background: rgba(14, 10, 18, 0.5);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.26s ease;
}

.bul-nav.is-open .bul-nav__scrim {
	opacity: 1;
}

/* Schubfach */
.bul-nav__drawer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(92vw, 390px);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -18px 0 50px rgba(14, 10, 18, 0.28);
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.22, 0.75, 0.3, 1);
	overscroll-behavior: contain;
}

.bul-nav.is-open .bul-nav__drawer {
	transform: translateX(0);
}

.rtl .bul-nav__drawer {
	right: auto;
	left: 0;
	transform: translateX(-100%);
	box-shadow: 18px 0 50px rgba(14, 10, 18, 0.28);
}

.rtl .bul-nav.is-open .bul-nav__drawer {
	transform: translateX(0);
}

/* Kopf */
.bul-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--bul-nav-line);
}

.bul-nav__logo img {
	display: block;
	max-height: 34px;
	width: auto;
}

.bul-nav__brand {
	font-size: 18px;
	font-weight: 800;
	color: var(--bul-nav-ink);
	text-decoration: none;
}

.bul-nav__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: #f4f4f7;
	color: var(--bul-nav-ink);
	cursor: pointer;
}

.bul-nav__close:hover {
	background: #ececf1;
}

/* Inhalt */
.bul-nav__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px 18px 24px;
}

/* Menü – der einzige Inhalt des Schubfachs. Das Konto hat sein eigenes
   Symbol im Kopfbereich, hier stünde es doppelt. */
.bul-nav__menu {
	margin-top: 2px;
}

/* Hinweis, solange kein Menü hinterlegt ist – nur für die Verwaltung. */
.bul-nav__hint {
	margin: 10px 0 0;
	padding: 14px 16px;
	border-radius: 14px;
	background: #f6f6f8;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bul-nav-muted);
}

.bul-nav__hint a {
	color: var(--bul-nav-main);
	font-weight: 600;
	white-space: nowrap;
}

.bul-nav__list,
.bul-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bul-nav__list > li {
	border-bottom: 1px solid var(--bul-nav-line);
}

.bul-nav__list > li:last-child {
	border-bottom: 0;
}

.bul-nav__list a {
	display: block;
	padding: 14px 2px;
	font-size: 17px;
	font-weight: 600;
	color: var(--bul-nav-ink);
	text-decoration: none;
}

.bul-nav__list a:hover,
.bul-nav__list .current-menu-item > a {
	color: var(--bul-nav-main);
}

/* Untermenüs: zugeklappt, Pfeil zum Aufklappen. */
.bul-nav__list .menu-item-has-children {
	position: relative;
}

.bul-nav__toggle {
	position: absolute;
	top: 6px;
	right: 0;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: none;
	color: var(--bul-nav-muted);
	cursor: pointer;
}

.rtl .bul-nav__toggle {
	right: auto;
	left: 0;
}

.bul-nav__toggle svg {
	transition: transform 0.2s ease;
}

.bul-nav__list .is-open > .bul-nav__toggle svg {
	transform: rotate(180deg);
}

.bul-nav__list .sub-menu {
	display: none;
	padding: 0 0 10px 14px;
	border-left: 2px solid var(--bul-nav-line);
	margin: 0 0 6px;
}

.rtl .bul-nav__list .sub-menu {
	padding: 0 14px 10px 0;
	border-left: 0;
	border-right: 2px solid var(--bul-nav-line);
}

.bul-nav__list .is-open > .sub-menu {
	display: block;
}

.bul-nav__list .sub-menu a {
	padding: 9px 2px;
	font-size: 15px;
	font-weight: 500;
	color: var(--bul-nav-muted);
}

/* Fuß: die Sprachwahl, dasselbe Aufklappmenü wie auf dem Desktop. */
.bul-nav__foot {
	flex: 0 0 auto;
	padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--bul-nav-line);
	background: #fff;
}

.bul-nav__foot .mdc-langsw {
	display: block;
}

.bul-nav__foot .mdc-langsw__btn {
	width: 100%;
	justify-content: space-between;
}

/* Nach oben aufklappen – nach unten läge die Liste außerhalb des Bildes. */
.bul-nav__foot .mdc-langsw__menu {
	top: auto;
	bottom: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: 50vh;
}

/* ------------------------------------------------------------------------ */
/* Knopf                                                                     */
/* ------------------------------------------------------------------------ */

.bul-nav__burger[hidden] {
	display: none !important;
}

.bul-nav__burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: var(--bul-nav-ink, #181818);
	box-shadow: 0 2px 10px rgba(24, 24, 24, 0.12);
	cursor: pointer;
}

.bul-nav__bars {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 20px;
}

.bul-nav__bars i {
	display: block;
	height: 2.5px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.22s ease, opacity 0.18s ease;
}

.bul-nav__bars i:nth-child(2) {
	width: 70%;
	background: #db2978;
}

.bul-nav__burger[aria-expanded="true"] .bul-nav__bars i:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}

.bul-nav__burger[aria-expanded="true"] .bul-nav__bars i:nth-child(2) {
	opacity: 0;
}

.bul-nav__burger[aria-expanded="true"] .bul-nav__bars i:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

/* Schwebender Rückfallknopf: nur, wenn der Shortcode nicht gesetzt ist. */
.bul-nav__burger--float {
	position: fixed;
	top: calc(12px + env(safe-area-inset-top));
	right: 12px;
	z-index: 99995;
	box-shadow: 0 6px 20px rgba(24, 24, 24, 0.18);
}

.rtl .bul-nav__burger--float {
	right: auto;
	left: 12px;
}

/* Die Werkzeugleiste von WordPress liegt für angemeldete Nutzer darüber. */
body.admin-bar .bul-nav__burger--float {
	top: calc(58px + env(safe-area-inset-top));
}

/* Ab welcher Breite alles wieder verschwindet, steht in den Einstellungen.
   Die passende Regel kommt deshalb als eigene Zeile aus dem Plugin – in
   einer Media-Query lässt sich keine Variable verwenden. */

/* Während das Schubfach offen ist, steht die Seite dahinter still. */
html.bul-nav-open,
body.bul-nav-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.bul-nav__drawer,
	.bul-nav__scrim,
	.bul-nav__bars i {
		transition: none;
	}
}
