@font-face {
    font-family: "Venue Events Headline";
    src: url("../fonts/BigShoulders-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

/* Poster-like overview. The fonts are shown as they are, like on the poster: no bold or italic made up by the
   browser, which would fill in the details of a font. */
.venue-events-overview {
    font-synthesis: none;
    --venue-events-background: #eeeadc;
    --venue-events-text: #111;
    position: relative;
    max-width: 760px;
    margin: 0 auto 2.5rem;
    background: var(--venue-events-background);
    color: var(--venue-events-text);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.venue-events-overview-header {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1080 / 390;
    object-fit: cover;
}

.venue-events-overview-body {
    position: relative;
    container-type: inline-size;
    padding: clamp(1rem, 4vw, 2.5rem);
}

.venue-events-overview.has-watermark .venue-events-overview-body::before {
    content: "";
    /* Like the poster: a centred area of the configured share of the width, the logo fits into it. */
    position: absolute;
    inset: 0 calc((100% - var(--venue-events-watermark-width, 85%)) / 2);
    background: var(--venue-events-watermark) center / contain no-repeat;
    opacity: var(--venue-events-watermark-opacity, 0.2);
    pointer-events: none;
}

.venue-events-overview-body > * {
    position: relative;
}

/*
 * Centred block as wide as the headline; the lists do not widen it (width 0, min-width 100%) and wrap inside it,
 * so they start exactly below the left edge of the headline and end below its right edge.
 */
.venue-events-overview-content {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.venue-events-overview-content > .venue-events-overview-list,
.venue-events-overview-content > .venue-events-overview-notes,
.venue-events-overview-content > p {
    width: 0;
    min-width: 100%;
}

.venue-events-overview-title.is-fitted {
    white-space: nowrap;
}

.venue-events-overview-title {
    margin: 0 0 0.375em;
    font-family: "Venue Events Headline", "Arial Narrow", sans-serif;
    font-size: clamp(1.8rem, 6vw, 3rem);
    /* Slightly wider than the font, so a short headline fills more of the width (counted in OverviewRenderer). */
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.05;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.12em;
    color: inherit;
}

.venue-events-overview-list,
.venue-events-overview-notes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.venue-events-overview-list li {
    display: flex;
    gap: 0.55em;
    font-weight: 700;
    font-size: clamp(1.05rem, 3.4vw, 1.6rem);
    line-height: 1.35;
}

.venue-events-overview-list time {
    flex: 0 0 auto;
    /* Just wider than the widest date ("Fr. 20.11." ≈ 4.72em in Roboto), so the titles form a column. */
    min-width: 4.8em;
    font-variant-numeric: tabular-nums;
}

.venue-events-weekday {
    display: inline-block;
    min-width: 1.6em;
    font-weight: 400;
}

.venue-events-overview-title-cell {
    min-width: 0;
}

/*
 * Like the poster label: the box stands on the baseline of the line (an inline-block with overflow other than
 * visible has its bottom edge as baseline) and the capitals sit centred in it (the text box is trimmed to cap height
 * and baseline, so equal padding means equal space above and below the letters).
 */
.venue-events-sold-out,
.venue-event-badge {
    display: inline-block;
    overflow: hidden;
    padding: 0.35em;
    border-radius: 0.25em;
    background: #c8102e;
    color: #fff;
    font-size: 0.5em;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-transform: uppercase;
    vertical-align: baseline;
    white-space: nowrap;
}

/* Browsers without text-box trimming: padding worked out for Roboto at line-height 1. */
@supports not (text-box: trim-both cap alphabetic) {
    .venue-events-sold-out,
    .venue-event-badge {
        padding: 0.22em 0.35em 0.19em;
    }
}

.venue-event-badge {
    font-size: 0.8em;
}

.venue-events-overview-list a {
    color: inherit;
    text-decoration: none;
}

/*
 * Links in the overview look like the poster text; only a pointer that can hover (and keyboard focus) underlines them.
 * On touch screens the hover state would otherwise stick to a tapped entry.
 */
@media (hover: hover) {
    .venue-events-overview-list a:hover {
        text-decoration: underline;
    }
}

.venue-events-overview-list a:focus-visible {
    text-decoration: underline;
}

.venue-events-overview-notes {
    margin-top: 1.25em;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.4vw, 1.1rem);
    line-height: 1.45;
}

/*
 * Recurring events in two columns of their own (when, what), independent of the event list above;
 * a wrapped title continues in its column.
 */
.venue-events-overview-notes {
    display: grid;
    grid-template-columns: fit-content(50%) minmax(0, 1fr);
    column-gap: 1em;
    /* Lines of one entry stay close, the entries get space between them, so a wrapped time belongs to its line. */
    row-gap: 0.35em;
    line-height: 1.2;
}

.venue-events-overview-notes li,
.venue-events-overview-notes a {
    display: contents;
}

/*
 * Like on the poster a long "when" is broken before its time ("ab 18 Uhr") so it does not widen the column; where
 * the overview is wide enough there is room for it in one line.
 */
@container (min-width: 32em) {
    .venue-events-overview-notes .venue-events-note-break {
        display: none;
    }
}

.venue-events-note-what:only-child {
    grid-column: 1 / -1;
}

.venue-events-overview-notes a {
    color: inherit;
    text-decoration: none;
}

.venue-events-overview-notes a span {
    text-decoration: none;
}

@media (hover: hover) {
    .venue-events-overview-notes a:hover span {
        text-decoration: underline;
    }
}

.venue-events-overview-notes a:focus-visible span {
    text-decoration: underline;
}

.venue-events-overview-disclaimer {
    margin: 1.5em 0 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Event list */
.venue-events-list {
    display: grid;
    gap: clamp(5.75rem, 8vw, 7rem);
}

.venue-event {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    scroll-margin-top: 2rem;
}

@media (min-width: 700px) {
    .venue-event.has-image {
        grid-template-columns: minmax(220px, 2fr) 3fr;
        align-items: start;
    }
}

.venue-event-image {
    display: block;
    width: 100%;
    height: auto;
}

.venue-event-body > * {
    margin-top: 0;
}

.venue-event-date {
    margin-bottom: 0.25em;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.venue-event-title {
    margin: 0 0 0.75em;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.venue-event-description {
    margin-bottom: 1.25rem;
}

.venue-event-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.25rem;
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.05);
}

/* As last block of an entry, the facts end flush like the presale points, so the gap to the next entry is the same. */
.venue-event-details:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.venue-event-details dt {
    font-weight: 700;
}

.venue-event-details dd {
    margin: 0;
}

.venue-event-presale h4 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1rem;
}

.venue-event-presale ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

/* Name as heading; address and opening hours indented like the values above (Beginn, Eintritt, …). */
.venue-event-presale-name,
.venue-event-presale-address,
.venue-event-presale-hours {
    display: block;
}

.venue-event-presale-address,
.venue-event-presale-hours {
    padding-left: 1.25rem;
}

.venue-event-presale-name + .venue-event-presale-address,
.venue-event-presale-name + .venue-event-presale-hours {
    margin-top: 0.2rem;
}

.venue-event-presale-address + .venue-event-presale-hours {
    margin-top: 0.5rem;
}

.venue-events-empty {
    font-style: italic;
}

/* Preview of unpublished events (only visible to editors) */
.venue-event.is-preview {
    outline: 3px dashed #d63638;
    outline-offset: 0.75rem;
}

.venue-event-preview-label {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.2em 0.6em;
    background: #d63638;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.venue-events-overview-list li.is-preview a,
.venue-events-overview-list li.is-preview .venue-events-overview-pending {
    color: #d63638;
}

.venue-events-overview-list li.is-preview a::after,
.venue-events-overview-list li.is-preview .venue-events-overview-pending::after {
    content: " (Vorschau)";
    font-weight: 400;
}

/* Recurring events: days of the coming week on which they do not take place (OverlapFinder::withCancellations()) */
.venue-events-note-cancelled {
    color: #c0161c;
    white-space: nowrap;
}

.venue-event-cancelled {
    margin: 0 0 1em;
    padding: 0.6em 0.9em;
    border-left: 4px solid #c0161c;
    background: rgba(192, 22, 28, 0.08);
}

/* Recurring events still taking place while another event runs (parallel) */
.venue-events-note-parallel {
    color: #1b7a3a;
    white-space: nowrap;
}

.venue-event-parallel {
    margin: 0 0 1em;
    padding: 0.6em 0.9em;
    border-left: 4px solid #1b7a3a;
    background: rgba(27, 122, 58, 0.08);
}

/* The list links title and image to the page of the event (again since 0.50), the title without underline. */
.venue-event-title a,
.venue-event-title a:hover,
.venue-event-title a:focus-visible {
    color: inherit;
    text-decoration: none;
}

.venue-event-media a {
    display: block;
}

/* The page of an event (since 0.40): image beside the text from 800px, the next events below. */
.venue-event-page {
    display: grid;
    gap: 1.5rem 2.5rem;
}

@media (min-width: 800px) {
    .venue-event-page:has(> .venue-event-page-media) {
        grid-template-columns: minmax(260px, 2fr) 3fr;
        align-items: start;
    }

    .venue-event-page > .venue-event-further {
        grid-column: 1 / -1;
    }
}

.venue-event-page-image {
    display: block;
    width: 100%;
    height: auto;
}

.venue-event-page-body > * {
    margin-top: 0;
}

.venue-event-page-title {
    margin: 0 0 0.75em;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.venue-event-past,
.venue-event-rhythm {
    font-weight: 700;
}

.venue-event-venue {
    margin: 2rem 0 1.5rem;
}

.venue-event-venue h2,
.venue-event-further h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.venue-event-venue address {
    font-style: normal;
    margin-bottom: 0.75rem;
}

/* Date at the left, the share button at the right (since 0.43). */
.venue-event-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25em;
}

.venue-event-page-head .venue-event-date {
    margin: 0;
}

.venue-event-share-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
}

.venue-event-share-note {
    font-size: 0.9rem;
}

.venue-event-share {
    display: inline-flex;
    padding: 0.4rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.venue-event-share[hidden] {
    display: none;
}

.venue-event-share:hover,
.venue-event-share:focus-visible {
    background: rgba(127, 127, 127, 0.2);
}

.venue-event-share svg {
    fill: currentColor;
}

/* Date and title in two columns, the titles flush left; only the title underlined (since 0.46.1). */
.venue-event-further ul {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
}

.venue-event-further li,
.venue-event-further li a {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

.venue-event-further li a {
    color: inherit;
    text-decoration: none;
}

.venue-event-further li a > span {
    text-decoration: underline;
}

.venue-event-further time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.venue-event-gone {
    padding-top: var(--wp--preset--spacing--60, 3rem);
    padding-bottom: var(--wp--preset--spacing--60, 3rem);
}

/* "Mehr erfahren" below an entry of the list, and texts only for screen readers (since 0.42). */
.venue-event-more {
    margin: 1.25rem 0 0;
    font-weight: 700;
}

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

/* The image of an event large over the page (since 0.42). */
.venue-event-zoom {
    display: block;
    cursor: zoom-in;
}

.venue-event-lightbox {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-out;
}

.venue-event-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}

.venue-event-lightbox img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2.5rem 0.75rem 0.75rem;
    box-sizing: border-box;
}

.venue-event-lightbox-close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    padding: 0 0.4rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
}

html.venue-event-lightbox-open {
    overflow: hidden;
}
