/* Search: header button, red overlay with live results, search page form and Termine. */

/* Header button, the same size and frame as the language switch. */
.eu-search__toggle {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	box-sizing: border-box;
	border: 2px solid currentColor;
	cursor: pointer;
	list-style: none;
	transition: background .2s, color .2s;
}
.eu-search__toggle::-webkit-details-marker { display: none; }
.eu-search__toggle:hover { background: var(--eu-black); border-color: var(--eu-black); color: #fff; }
.js .has-hero .eu-site-header:not(.is-scrolled) .eu-search__toggle { background: #fff; border-color: #fff; color: var(--eu-black); }
.eu-search__icon { width: 1.1rem; height: 1.1rem; stroke-width: 2.5; }
.eu-search__icon--close,
.eu-search[open] .eu-search__icon:not(.eu-search__icon--close) { display: none; }
.eu-search[open] .eu-search__icon--close { display: block; }

/*
 * Without JavaScript the details element opens the form as a red overlay; the
 * button stays on top of it as the close button. The header must not contain
 * the fixed overlay, so its slide effect pauses meanwhile.
 */
.eu-site-header:has(.eu-search[open]) { transform: none; transition: none; }
.eu-search--toggle[open] > .eu-search__toggle { position: relative; z-index: 2; background: #fff; border-color: #fff; color: var(--eu-black); }
.eu-search--toggle[open] > .eu-search__panel {
	position: fixed;
	inset: 0;
	z-index: 1;
	overflow-y: auto;
	padding-top: calc(var(--eu-header-h) + 2rem);
	background: var(--eu-red);
	color: #fff;
}

/* With JavaScript: a modal dialog in the top layer. */
.eu-search-dialog {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--eu-red);
	color: #fff;
}
.eu-search-dialog::backdrop { background: transparent; }
.has-search-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
	.eu-search-dialog[open] { animation: eu-search-in .5s var(--eu-ease) both; }
}
@keyframes eu-search-in {
	from { clip-path: circle(0 at var(--eu-origin, calc(100% - 3rem) 2rem)); }
	to { clip-path: circle(150vmax at var(--eu-origin, calc(100% - 3rem) 2rem)); }
}
.eu-search-dialog ::selection { background: var(--eu-black); color: #fff; }
.eu-search-dialog__bar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	justify-content: flex-end;
	padding: 1rem var(--eu-pad) 0;
	pointer-events: none;
}
.eu-search-dialog__close {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 2px solid #fff;
	background: var(--eu-red);
	color: #fff;
	cursor: pointer;
	pointer-events: auto;
	transition: transform .3s var(--eu-ease), background .2s, color .2s;
}
.eu-search-dialog__close:hover { background: #fff; color: var(--eu-red-text); transform: rotate(90deg); }
.eu-search-dialog__close .eu-icon { display: block; width: 1.4rem; height: 1.4rem; }
.eu-search-dialog :focus-visible { outline-color: #fff; }

.eu-search__inner {
	box-sizing: border-box;
	width: min(100%, 62rem);
	margin-inline: auto;
	padding: clamp(1rem, 5vh, 3rem) var(--eu-pad) 4rem;
}

/* The field: big white Work Sans Black on red, like a headline. */
.eu-search__label {
	display: flex;
	gap: .75rem;
	align-items: center;
	margin-bottom: .75rem;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.eu-search__label::before { content: ""; width: 2.5rem; height: 3px; background: currentColor; }
.eu-search__field { display: flex; gap: clamp(.75rem, 2vw, 1.25rem); align-items: center; }
.eu-search__input {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: .1em 0 .15em;
	border: 0;
	border-bottom: 4px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	caret-color: currentColor;
	font: 900 clamp(1.9rem, 6vw, 4.25rem)/1.1 var(--eu-display);
	letter-spacing: -.02em;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s;
}
.eu-search__input::placeholder { color: inherit; opacity: .6; }
.eu-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.eu-search__input:focus { outline: none; }
.eu-search__input:focus-visible { border-bottom-color: var(--eu-black); }
.eu-search__submit {
	flex: none;
	display: grid;
	place-items: center;
	width: clamp(3rem, 6vw, 4rem);
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--eu-red-text);
	cursor: pointer;
	transition: background .2s, color .2s, transform .3s var(--eu-ease);
}
.eu-search__submit:hover { background: var(--eu-black); color: #fff; transform: translateX(.2rem); }
.eu-search__submit .eu-icon { width: 45%; height: 45%; stroke-width: 2.5; }

.eu-search__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.eu-search__tabs[hidden] { display: none; }
.eu-search__tab {
	display: inline-flex;
	gap: .5rem;
	align-items: center;
	padding: .45rem .85rem;
	border: 2px solid #fff;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: .9rem;
	font-weight: 800;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.eu-search__tab:hover:not(:disabled) { background: rgb(255 255 255 / 15%); }
.eu-search__tab[aria-pressed="true"] { background: #fff; color: var(--eu-red-text); }
.eu-search__tab:disabled { opacity: .5; cursor: default; }
.eu-search__tab-count { font-size: .75rem; font-variant-numeric: tabular-nums; }

.eu-search__section { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.eu-search__heading {
	display: flex;
	gap: .6rem;
	align-items: baseline;
	margin: 0 0 .9rem;
	color: inherit;
	font: 900 clamp(1.35rem, 2.5vw, 1.75rem)/1.1 var(--eu-display);
	letter-spacing: -.01em;
}
.eu-search__count { font: 800 .85rem/1 var(--wp--preset--font-family--inter, sans-serif); opacity: .8; }
.eu-search__more {
	margin-top: .75rem;
	padding: .3rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .25em;
	cursor: pointer;
}
.eu-search__loading { margin: 2rem 0 0; font-weight: 700; opacity: .85; }

.eu-search__empty { margin-top: 2.5rem; }
.eu-search__empty p { max-width: 36rem; margin: 0 0 1rem; font-size: 1.125rem; line-height: 1.5; }
.eu-search__empty .eu-search__empty-title { margin-bottom: .5rem; font: 900 clamp(1.75rem, 4vw, 2.75rem)/1.05 var(--eu-display); letter-spacing: -.02em; }
.eu-search__ask {
	display: inline-block;
	padding: .8rem 1.4rem;
	background: #fff;
	color: var(--eu-red-text);
	font-weight: 800;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.eu-search__ask:hover { background: var(--eu-black); color: #fff; }

.eu-search__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	justify-content: space-between;
	align-items: center;
	margin-top: 2.25rem;
	font-size: .875rem;
}
.eu-search__foot:empty { display: none; }
.eu-search__keys { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; opacity: .85; }
.eu-search__keys kbd {
	min-width: 1.6em;
	padding: .1em .4em;
	border: 1.5px solid currentColor;
	font: 700 .8rem/1.3 inherit;
	text-align: center;
}
.eu-search__keys kbd + kbd { margin-left: -.1rem; }
@media (hover: none) {
	.eu-search__keys { display: none; }
}
.eu-search__all {
	padding-left: .6rem;
	border-left: 2px solid currentColor;
	color: inherit;
	font-weight: 800;
	text-decoration: none;
}
.eu-search__all:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }

/* Results: white cards; Termine show a date tile in violet (coming) or dark green (past). */
.eu-hits { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.eu-hit { margin: 0; }
.eu-hit__link {
	position: relative;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
	padding: .85rem;
	background: #fff;
	color: var(--eu-black);
	text-decoration: none;
	box-shadow: var(--eu-shadow);
	transition: transform .25s var(--eu-ease), box-shadow .25s;
}
.eu-hit__link:hover,
.eu-hit__link:focus-visible {
	transform: translateX(.35rem);
	box-shadow: -.35rem 0 0 var(--eu-black), var(--eu-shadow-lift);
}
.eu-hit__link:focus-visible { outline: 3px solid var(--eu-black); outline-offset: 3px; }
.eu-hit__media,
.eu-hit__tile {
	display: grid;
	place-content: center;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--eu-light);
	color: #fff;
	text-align: center;
}
.eu-hit__media img { display: block; width: 4.5rem; height: 4.5rem; object-fit: cover; }
.eu-hit__media.is-empty { background: var(--eu-darkred); font: 900 2rem/1 var(--eu-display); text-transform: uppercase; }
.eu-hit__tile { background: var(--eu-violet); }
.eu-hit--past .eu-hit__tile { background: var(--eu-darkgreen); }
.eu-hit__day { font: 900 1.85rem/1 var(--eu-display); }
.eu-hit__month { margin-top: .15rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eu-hit__body { display: grid; gap: .2rem; min-width: 0; }
.eu-hit__kicker {
	display: flex;
	flex-wrap: wrap;
	gap: .15rem .6rem;
	align-items: center;
	color: var(--eu-grey);
	font-size: .75rem;
	font-weight: 600;
}
.eu-hit__type { color: var(--eu-red-text); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.eu-hit--upcoming .eu-hit__type { color: var(--eu-violet); }
.eu-hit--past .eu-hit__type { color: var(--eu-darkgreen); }
.eu-hit__lobby { padding: .1em .5em; background: #67249a; color: #fff; font-weight: 800; }
.eu-hit__title { font: 900 clamp(1.05rem, 1.6vw, 1.2rem)/1.2 var(--eu-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.eu-hit__text {
	display: -webkit-box;
	overflow: hidden;
	color: var(--eu-grey);
	font-size: .875rem;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.eu-hit mark { background: none; color: inherit; box-shadow: inset 0 -.42em 0 rgb(255 0 0 / 22%); }
@media (max-width: 599px) {
	.eu-hit__link { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .8rem; padding: .7rem; }
	.eu-hit__media img { width: 3.5rem; height: 3.5rem; }
	.eu-hit__day { font-size: 1.45rem; }
}

/* Search page: the field sits in the coloured box under the title. */
.eu-search--page {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	max-width: var(--eu-wide);
	margin: 0 auto !important;
	padding: calc(var(--eu-overlap, 2rem) + 1.25rem) clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.25rem);
	background: var(--eu-box, var(--eu-red-text));
	color: #fff;
}
.eu-search--page .eu-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.eu-search--page .eu-search__input { font-size: clamp(1.5rem, 4vw, 2.75rem); }
.eu-archive-header:has(.eu-search--page)::after { display: none !important; }

.eu-search-events { margin-bottom: clamp(2.5rem, 6vw, 4rem) !important; }
.eu-search-events__title {
	display: flex;
	gap: .6rem;
	align-items: baseline;
	margin: 0 0 1rem;
	font: 900 clamp(1.5rem, 3vw, 2.25rem)/1.1 var(--eu-display);
}
.eu-search-events__count { font: 800 .9rem/1 var(--wp--preset--font-family--inter, sans-serif); color: var(--eu-grey); }
.eu-search-events .eu-hits { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.eu-search-events .eu-hits + .eu-search-events__title { margin-top: 2rem; }
.eu-search-events .eu-hits + .eu-search-events__title--posts { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.eu-search-events .eu-hit__link { box-shadow: 0 0 0 1px var(--eu-line); }

/* The Termin a search result points to in the Transparenz list. */
.eu-mention:target { animation: eu-target 2.5s var(--eu-ease); }
@keyframes eu-target {
	0%, 40% { box-shadow: -.75rem 0 0 var(--eu-red), inset 0 0 0 999px rgb(255 0 0 / 8%); }
	100% { box-shadow: none; }
}
