/*
 * Event pages and archive, including the JP Events blocks used on them.
 * Shared by the frontend and the iframed editor; tokens come from design.css.
 */

/* ---------- Single event ---------- */
.ts-event-single { padding-block: 0 4rem !important; }

/*
 * The head: a cover in the style "Leuchten" (the featured image, blurred, behind the head),
 * a layout section, and core columns with the images and the event's blocks
 * (templates/single-jp_events_event.html). The columns use the highlight's grid (.hero__grid).
 */
.wp-block-cover.is-style-leuchten { display: block; min-height: 0; padding: 0; overflow: visible; isolation: isolate; z-index: 1; }
.wp-block-cover.is-style-leuchten > .wp-block-cover__image-background { z-index: 0; inset: -10%; width: 120%; height: 120%; filter: blur(70px) saturate(130%); opacity: 0.45; clip-path: inset(8.3333% 8.3333% calc(8.3333% + 2px)); }
/* The fades into the page lie over the image, whichever comes first in the markup. */
.wp-block-cover.is-style-leuchten > span.wp-block-cover__background.has-background-dim {
	z-index: 1;
	opacity: 1;
	background:
		linear-gradient(180deg, var(--bg) 6%, rgba(10, 12, 16, 0) 35%),
		linear-gradient(90deg, rgba(10, 12, 16, 0.35) 0%, rgba(10, 12, 16, 0.85) 55%, var(--bg) 100%),
		linear-gradient(180deg, rgba(10, 12, 16, 0) 50%, var(--bg) 94%);
}
/* Light text on the dark head, also when the editor judges the image under the fades as light (is-light). */
.wp-block-cover.is-style-leuchten > .wp-block-cover__inner-container, .wp-block-cover.is-style-leuchten.is-light > .wp-block-cover__inner-container { z-index: 2; color: var(--text); }
/* The subtitle is the excerpt without a "read more" link; the editor would offer one. */
.hero__subtitle :is(.wp-block-post-excerpt__more-text, .wp-block-post-excerpt__more-link) { display: none; }
.ts-event-head .hero__grid { gap: clamp(2rem, 4vw, 4.5rem); }
.ts-event-head .hero__body > * { margin-block: 0; }
.ts-event-head .hero__when-text { margin: 0; }
/* Status: the chips above the notice. */
.wp-block-theaterstuebchen-event-status { display: grid; gap: 1rem; }

/* Descriptions: links, images and emphasis as in the site's text. */
.ts-event-body a:not(.wp-block-button__link) { color: var(--blue-hi); text-underline-offset: 3px; }
.ts-event-body img { height: auto; }
.ts-event-body strong { color: var(--text); }
/* Migrated descriptions open with a row of link icons (website, YouTube, tickets). They keep
   working, sized as a quiet row of buttons instead of floated pictures in the first paragraph. */
.ts-event-body .wp-block-column > p:first-child:has(> a > img.alignleft) { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ts-event-body .wp-block-column > p:first-child > a:has(> img.alignleft) { display: inline-flex; margin: 0 !important; }
.ts-event-body .wp-block-column > p:first-child > a > img.alignleft { float: none; width: 2.75rem; height: 2.75rem; margin: 0; border-radius: 2px; }

/* ---------- Event head: tickets and calendar ---------- */
:is(.hero--detail, .ts-event-head) .hero__cta { display: grid; gap: 0.75rem; max-width: 28rem; }
.hero__cta .btn--cta { min-height: 3.75rem; padding-inline: 1.75rem; font-size: 1.4rem; }
:is(.hero--detail, .ts-event-head) .facts { padding-top: 0.5rem; }

/* The calendar menu overlays the page below the head: the glow is clipped to the head instead of the head clipping its content. */
.hero--detail { z-index: 1; overflow: visible; }
.hero--detail .hero__glow { clip-path: inset(8.3333%); }

/* JP "add to calendar": the summary is a secondary button, the providers drop down over the content below. */
.hero__calendar { margin: 0; }
.hero__calendar .jp-events-add-to-calendar__details { position: relative; }
.hero__calendar .jp-events-add-to-calendar__details > summary {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0.7rem 1.5rem 0.75rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	font: 700 1.125rem/1 var(--font-display);
	letter-spacing: 0.01em;
	list-style: none;
	cursor: pointer;
	transition: border-color 0.15s;
}
.hero__calendar summary::-webkit-details-marker { display: none; }
.hero__calendar summary:hover, .hero__calendar details[open] > summary { border-color: #fff; }
.hero__calendar summary::before, .hero__calendar summary::after { content: ""; flex: none; background: currentColor; }
.hero__calendar summary::before {
	width: 1.15rem;
	height: 1.15rem;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 1h2v2h6V1h2v2h3v16H2V3h3zM4 8v9h12V8zm2 2h3v3H6z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 1h2v2h6V1h2v2h3v16H2V3h3zM4 8v9h12V8zm2 2h3v3H6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero__calendar summary::after { width: 0.7rem; height: 0.45rem; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform 0.15s; }
.hero__calendar details[open] > summary::after { transform: rotate(180deg); }
.hero__calendar ul { position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; background: var(--line); border: 1px solid var(--line); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8); list-style: none; }
.hero__calendar li { margin: 0; }
.hero__calendar ul a { display: flex; align-items: center; min-height: var(--tap); height: 100%; padding: 0.6rem 0.9rem; background: var(--card); color: var(--text); font-weight: 500; text-decoration: none; }
.hero__calendar ul a:hover { background: var(--card-hover); color: var(--blue-hi); }
.hero__calendar .jp-events-add-to-calendar__note { display: none; }
@media (max-width: 399px) { .hero__calendar ul { grid-template-columns: 1fr; } }

/* ---------- Status notice ---------- */
.ts-event-status__notice { display: grid; gap: 0.35rem; padding: 1rem 1.25rem; border-left: var(--bar) solid var(--blue); background: var(--card); color: var(--text); }
.ts-event-status__notice > * { margin: 0; }
.ts-event-status__notice--cancelled { border-left-color: var(--cancelled); }
.ts-event-status__notice--soldout { border-left-color: var(--soldout); }
.ts-event-status__title strong { font: 700 1.3rem/1.1 var(--font-display); letter-spacing: 0.01em; }
.ts-event-status__text { color: var(--text-2); }

/* ---------- JP Events: venue ---------- */
.wp-block-jp-events-event-venue { display: grid; gap: 0.5rem; padding: 1.25rem 1.5rem 1.5rem; border-top: var(--bar) solid var(--blue); background: var(--card); color: var(--text-2); }
.wp-block-jp-events-event-venue > strong { color: var(--text-3); font: 500 var(--fs-meta)/1 var(--font-body); letter-spacing: 0.01em; }
.wp-block-jp-events-event-venue address { color: var(--text); font: 700 1.375rem/1.2 var(--font-display); font-style: normal; letter-spacing: 0.01em; }

/* ---------- Archive ---------- */
.programme.archive { padding-top: var(--space-page); }
.archive__search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; align-items: center; }
.archive__search input[type="search"], .archive__search select {
	width: 100%;
	min-height: var(--tap);
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--line-strong);
	border-radius: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 1rem/1.2 var(--font-body);
}
.archive__search input[type="search"]::placeholder { color: var(--text-3); }
@media (min-width: 1100px) { .archive__search input[type="search"] { width: 16rem; } }
@media (max-width: 599px) {
	.archive__search { grid-template-columns: minmax(0, 1fr) auto; }
	.archive__search input[type="search"] { grid-column: 1 / -1; }
}
.archive__summary { margin-bottom: 0.75rem; color: var(--text-3); font-size: var(--fs-small); }
.archive__summary a { color: var(--blue-hi); }
.archive .programme__more { gap: 1rem; align-items: center; flex-wrap: wrap; }
.archive .programme__more span { color: var(--text-3); font: 600 var(--fs-label)/1 var(--font-display); letter-spacing: 0.01em; }
.ts-events-archive { padding-block: 0 !important; }
