/*
 * "Menü" button in the header of all pages (header.php), folding the links out in a panel below
 * it. For now (Dennis, 13.11.2026) at every width instead of the row of links; to bring the row
 * back on wide screens, put the two rules below into "@media (max-width: 700px) { … }" again.
 */

.site-menu {
	/* Height of the lines (Figma "Group 14": 47.28 × 38 px beside the 45 px smiley); smaller with
	   the smiley, see the end of this file and layout.css. */
	--burger-h: 38px;

	/* Not positioned: the open panel takes its place from the header (top right of the window). */
	display: block;
	margin-top: 1rem; /* level with the smiley, which sits 8 px lower (layout.css) */
	margin-left: auto;
}

.site-header-nav {
	display: none;
}

.site-menu-button {
	/* Above the open panel, so the cross stays where the lines were. */
	z-index: 30;
	/* Figma "Group 14" (frame 2014:228): three black lines, 2 px. */
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: calc(var(--burger-h) * 47.28 / 38);
	height: var(--burger-h);
	background: none;
	color: #1e1e1e;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.site-menu-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Number of tickets in the cart, as a badge on the button; 26 px (Dennis, 13.11.), its centre
   where the 20 px badge had it: on the end of the top line. */
.site-menu-count {
	position: absolute;
	top: -0.74rem;
	right: -0.49rem;
	min-width: 1.625rem;
	height: 1.625rem;
	padding: 0 0.375rem;
	box-sizing: border-box;
	border-radius: 999px;
	background: #000;
	color: #fff;
	font-family: "tt-commons-pro", system-ui, sans-serif;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.625rem;
	text-align: center;
}

.site-menu-button::-webkit-details-marker {
	display: none;
}

.site-menu-button::marker {
	content: "";
}

/* Three lines that turn into a cross while open: the middle line fades, the outer two move to
   the middle and turn. */
.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	transform-origin: 50% 50%;
	transition: transform 0.15s ease, background-color 0.1s ease;
}

.site-menu-icon {
	position: relative;
	width: 100%;
}

.site-menu-icon::before,
.site-menu-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.site-menu-icon::before {
	transform: translateY(calc((var(--burger-h) - 2px) / -2));
}

.site-menu-icon::after {
	transform: translateY(calc((var(--burger-h) - 2px) / 2));
}

.site-menu[open]:not(.is-closing) .site-menu-icon {
	background-color: transparent;
}

.site-menu[open]:not(.is-closing) .site-menu-icon::before {
	transform: rotate(39deg); /* corner to corner of the 47 × 38 box */
}

.site-menu[open]:not(.is-closing) .site-menu-icon::after {
	transform: rotate(-39deg);
}

.site-menu-button:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.site-menu[open] .site-menu-panel {
	animation: site-menu-in 0.12s ease-out;
}

/* Closing: site-menu.js sets .is-closing, waits for this animation, then closes <details> */
.site-menu.is-closing .site-menu-panel {
	animation: site-menu-out 0.12s ease-in forwards;
}

@keyframes site-menu-in {
	from {
		opacity: 0;
		transform: translateY(-0.5rem);
	}
}

@keyframes site-menu-out {
	to {
		opacity: 0;
		transform: translateY(-0.5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-menu-icon,
	.site-menu-icon::before,
	.site-menu-icon::after {
		transition: none;
	}

	.site-menu[open] .site-menu-panel,
	.site-menu.is-closing .site-menu-panel {
		animation: none;
	}
}

/* Open: a white box at the top right of the window (Dennis, 13.11.), the cross at its top, the
   links below it, stacked, capitals, right-aligned with the cross, the page shown underlined. */
.site-menu-panel {
	position: absolute;
	z-index: 20;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	box-sizing: border-box;
	padding: calc(1rem + var(--burger-h) + 1.5rem) var(--header-side, var(--text-edge)) 1.5rem 2rem;
	background: #fff;
	font-family: "tt-commons-pro", system-ui, sans-serif;
	font-weight: 500;
}

.site-menu-panel a {
	color: #1e1e1e;
	font-size: clamp(1.375rem, 1.75vw, 1.875rem); /* 30 px at 1728, as in the frame */
	letter-spacing: 0.03em;
	line-height: 1.33;
	text-decoration: none;
	text-transform: uppercase;
}

.site-menu-panel a:hover,
.site-menu-panel a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.site-menu-panel a:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

/* Up to 900 px the smiley is 36 px: the lines in the same proportion. */

@media (max-width: 900px) {
	.site-menu {
		--burger-h: calc(36px * 38 / 45);
	}
}
