/* Listenansicht der Events auf der Startseite (public/js/events-list.js).
   Vorbild: Kalender von serbska.app - Schnellwahl als Pillen, Suche mit
   Filter, Termine nach Tagen als kompakte Zeilen (kleines Bild, Uhrzeit,
   Titel, Ort). Mobile first; ab 834px zwei, ab 1200px drei Spalten.
   Farben nur ueber die Tokens aus tokens.css, damit die Ansicht jedem
   Farbmodus folgt. */

/* Umschalter Kacheln/Liste ------------------------------------------------ */

.evl-kopf {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 8px;
}

.evl-umschalter {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
}

.evl-umschalter__knopf {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.evl-umschalter__knopf svg {
    width: 18px;
    height: 18px;
}

.evl-umschalter__knopf:hover {
    color: var(--text);
}

.evl-umschalter__knopf[aria-pressed='true'] {
    background: var(--accent);
    color: var(--accent-contrast);
}

.evl-umschalter__knopf:focus-visible,
.evl-chip:focus-visible,
.evl-knopf:focus-visible,
.evl-filter__knopf:focus-visible,
.evl-zeile__link:focus-visible,
.evl-zeile__merken:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

/* In der Listenansicht ruhen die Kachel-Reihen. */
.events-view-list > .carousel-container,
.events-view-list > #category-sections,
.events-view-list > #events-loading-skeleton {
    display: none;
}

.evl[hidden],
.evl [hidden] {
    display: none;
}

.evl {
    color: var(--text);
    margin-bottom: 28px;
}

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

/* Leiste: Zeitraum, Datum, Suche, Filter ---------------------------------- */

.evl-leiste {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.evl-zeitraum {
    display: grid;
    gap: 6px;
    min-width: 0;
}

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

.evl-zeitraum__chips {
    display: flex;
    gap: 8px;
    padding: 2px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.evl-zeitraum__chips::-webkit-scrollbar {
    display: none;
}

@media (min-width: 769px) {
    .evl-zeitraum {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .evl-zeitraum__label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
        color: var(--accent-text);
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .evl-zeitraum__chips {
        flex-wrap: wrap;
        overflow: visible;
    }
}

.evl-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.evl-chip:hover {
    background: var(--surface-2);
}

.evl-chip[aria-pressed='true'] {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
}

.evl-datum {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 480px;
}

.evl-feld {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.evl-feld__label {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.evl-feld__hinweis {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.evl-eingabe {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    color-scheme: var(--color-scheme, dark);
}

.evl-eingabe::placeholder {
    color: var(--muted);
}

.evl-eingabe:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 1px;
}

.evl-suche {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.evl-suche__feld {
    position: relative;
    flex: 1;
    min-width: 0;
}

.evl-suche__symbol {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.evl-suche__eingabe {
    padding-left: 42px;
    border-radius: 999px;
}

.evl-filter__knopf {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.evl-filter__symbol {
    display: inline-grid;
}

.evl-filter__symbol svg {
    width: 18px;
    height: 18px;
}

.evl-filter__knopf[aria-expanded='true'] {
    border-color: var(--accent-text);
    color: var(--accent-text);
}

.evl-filter__zahl {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 0.75rem;
    font-weight: 700;
    box-sizing: border-box;
}

@media (max-width: 429px) {
    .evl-filter__text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .evl-filter__knopf {
        padding: 0 13px;
    }
}

.evl-filter {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.evl-filter .evl-eingabe,
.evl-filter .evl-chip {
    background: var(--bg);
}

.evl-filter .evl-chip[aria-pressed='true'] {
    background: var(--accent);
}

.evl-kategorien {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.evl-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.evl-knopf:hover {
    background: var(--surface-2);
}

.evl-knopf--leise {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    padding: 0 4px;
    text-decoration: underline;
}

.evl-knopf--leise:hover {
    background: transparent;
    color: var(--text);
}

/* Tage ---------------------------------------------------------------------- */

.evl-tage {
    display: grid;
    gap: 18px;
}

.evl-tag {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.evl-tag__titel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
}

.evl-tag--heute .evl-tag__titel {
    color: var(--accent-text);
}

.evl-tag__marke {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.evl-tag__marke--heute {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* Zeilen ---------------------------------------------------------------------- */

.evl-zeilen {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 834px) {
    .evl-zeilen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
    }
}

@media (min-width: 1200px) {
    .evl-zeilen {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.evl-zeilen > li {
    min-width: 0;
}

.evl-zeile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
    min-width: 0;
    height: 100%;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}

.evl-zeile__link {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-height: 44px;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
}

.evl-zeile__link:hover .evl-zeile__titel {
    text-decoration: underline;
}

.evl-zeile__bild {
    position: relative;
    display: block;
    width: 64px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-2);
}

.evl-zeile__bild img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evl-zeile__ersatz {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
}

.evl-zeile__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.evl-zeile__zeit {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    margin: 0;
    color: var(--accent-text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.evl-zeile__kategorie {
    color: var(--muted);
    font-weight: 500;
}

.evl-zeile__uhr + .evl-zeile__kategorie::before {
    content: '·';
    margin-right: 8px;
}

.evl-zeile__titel {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.evl-zeile__ort {
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evl-zeile--abgesagt .evl-zeile__titel {
    text-decoration: line-through;
}

.evl-zeile__marken {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.evl-zeile__marke {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.evl-zeile__marke--tickets {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.evl-zeile__marke--abgesagt,
.evl-zeile__marke--hinweis {
    background: var(--danger-soft);
    color: var(--danger-text);
}

/* Merken: derselbe Knopf wie auf den Kacheln (bookmarks.js findet ihn ueber
   .bookmark-btn[data-event-id]), hier aber im Zeilenfluss statt ueber dem
   Bild. Die Regeln der Kachel werden deshalb ausdruecklich zurueckgesetzt. */
.evl-zeile .evl-zeile__merken {
    position: static;
    inset: auto;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 10px 0 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--muted);
    opacity: 1;
    transform: none;
    cursor: pointer;
}

/* Die Kachel vergroessert ihre Tap-Flaeche ueber ::after (seitlich -3px);
   hier ist der Knopf selbst 44px gross, und die 3px liessen die Seite
   seitlich scrollen. */
.evl-zeile .evl-zeile__merken::after {
    content: none;
}

.evl-zeile .evl-zeile__merken svg,
.evl-zeile .evl-zeile__merken:hover svg,
.evl-zeile .evl-zeile__merken.bookmarked svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.evl-zeile .evl-zeile__merken:hover {
    color: var(--text);
    background: var(--surface-2);
    transform: none;
}

.evl-zeile .evl-zeile__merken.bookmarked {
    color: var(--bookmark, #ff4d6d);
}

/* Hinweise, Leere, Mehr laden ----------------------------------------------- */

.evl-hinweis {
    margin: 0 0 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
}

.evl-laden {
    margin: 0;
    padding: 28px 0;
    color: var(--muted);
}

.evl-leer {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 36px 16px;
    text-align: center;
}

.evl-leer__titel {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
}

.evl-leer__text {
    margin: 0 0 8px;
    color: var(--muted);
}

.evl-mehr {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.evl-mehr__ende {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}
