﻿#eventContent {
    padding-left: var(--DefaultMainContainerLeftRightPadding);
    padding-right: var(--DefaultMainContainerLeftRightPadding);
}

.home #eventContent {
    padding-left: 0;
    padding-right: 0;
}

.ModuleQVHEvent #container .blockEditor > .beContainerBlock:last-of-type,
.ModuleQVHEvent #container .blockEditor > .beContainerLayoutContainer:last-of-type,
.ModuleQVHEvent #container .blockEditor > .beContainerRow:last-of-type {
    margin-bottom: 35px;
    padding-bottom: 0;
}

/* ==========================================================
   Filter
   ========================================================== */

#showFilterControls {
    display: none;
    margin-bottom: 20px;
}

#showFilterButton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f4f6f8;
    border: 1px solid #d5dbe0;
    border-radius: 10px;
    cursor: pointer;
}

#filterContainer {
    margin-bottom: 48px;
    padding: 15px 20px;
    background: #f4f6f8;
    border-radius: 15px;
    font-size: 16px;
}

#searchFilter {
    margin-bottom: 28px;
}

#searchTitle,
#categoryTitle,
#organizationTitle {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
}

#searchFilterInput {
    width: 100%;
    max-width: 520px;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 10px;
    font-size: 1rem;
}

    #searchFilterInput:focus {
        border-color: var(--LinkColor);
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 100, 160, .08);
    }

/* Kategorien und Filter zurücksetzen */

#main #categoryFilter ul,
#main #clearFilter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#main #eventContent ul li::before {
    display: none;
}

#main #eventContent ul li {
    margin: 0;
    padding: 0;
}

#categoryFilter li span,
#clearFilter li span {
    display: inline-flex;
    align-items: center;
    padding: 7px 8px;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

    #categoryFilter li span:hover,
    #clearFilter li span:hover {
        border-color: var(--LinkColor);
    }

#categoryFilter li.enabled span,
#categoryFilter li.enabledAll span {
    background: var(--LinkColor);
    border-color: var(--LinkColor);
    color: #fff;
}

#clearFilter {
    margin-top: 20px;
}

/* ==========================================================
   Veranstalterfilter
   ========================================================== */

#organizationFilter {
    margin-top: 28px;
}

#organizationCombobox {
    position: relative;
    width: 100%;
    max-width: 520px;
}

#organizationInputContainer {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 10px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#organizationCombobox.isOpen #organizationInputContainer {
    border-color: var(--LinkColor);
    box-shadow: 0 0 0 3px rgba(0, 100, 160, .08);
}

#organizationInputContainer > i {
    position: absolute;
    left: 15px;
    z-index: 2;
    color: #65717d;
    pointer-events: none;
}

#organizationFilterInput {
    width: 100%;
    min-width: 0;
    padding: 13px 46px 13px 42px;
    background: transparent;
    border: 0;
    outline: none;
    font: inherit;
}

    #organizationFilterInput::placeholder {
        color: #7b858f;
    }

#organizationDropdownButton {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #4e5964;
    cursor: pointer;
}

    #organizationDropdownButton i {
        transition: transform .2s ease;
    }

#organizationCombobox.isOpen #organizationDropdownButton i {
    transform: rotate(180deg);
}

#organizationDropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 100;
    display: none;
    width: 100%;
    padding: 6px;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

#organizationCombobox.isOpen #organizationDropdown {
    display: block;
}

#organizationOptions {
    max-height: 230px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.organizationOption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .organizationOption:hover,
    .organizationOption:focus {
        background: #f2f6f9;
        outline: none;
    }

    .organizationOption.selected {
        background: #e7f2f9;
        font-weight: 600;
    }

    .organizationOption span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .organizationOption i {
        display: none;
        color: var(--LinkColor);
    }

    .organizationOption.selected i {
        display: block;
    }

#organizationNoResults {
    display: none;
    padding: 14px 10px;
    color: #707982;
    font-size: 14px;
}

/* Gewählter Veranstalter als Chip */

#selectedOrganizationContainer {
    display: none;
    margin-top: 9px;
}

    #selectedOrganizationContainer.isVisible {
        display: block;
    }

#selectedOrganization {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 520px;
    padding: 6px 8px 6px 11px;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 9px;
    font-size: 14px;
}

#selectedOrganizationName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#removeOrganizationFilter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #59636d;
    cursor: pointer;
}

    #removeOrganizationFilter:hover {
        background: #edf1f4;
        color: #222;
    }

/* Ladezustand */

#eventContainer.isLoading {
    opacity: .5;
    pointer-events: none;
}

/* ==========================================================
   Event-Liste
   ========================================================== */

#eventContainer {
    width: 100%;
    margin-bottom: 50px;
}

.eventMonthContainer {
    margin-bottom: 70px;
}

.eventMonth h2 {
    margin: 0 0 24px;
}

.eventGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.eventItem {
    border: 1px solid #f4f6f8;
    position: relative;
    overflow: hidden;
    background: #f4f6f8;
    transition: box-shadow .2s ease, background-color .2s ease;
}

.eventItemLink {
    position: absolute;
    inset: 0;
    z-index: 10;
}

.eventItem:hover {
    background: #f7f8fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    cursor: pointer;
}

.eventItem::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .2s ease;
    pointer-events: none;
}

.eventItem:hover::after {
    background: rgba(255, 255, 255, .08);
}

.eventItemContent {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eventItemContentImage {
    position: relative;
}

#main #eventContainer img {
    border-radius: 0;
}


.eventImage {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
}

.eventItemContent.noImage .eventImage {
    background: #E0E1E2;
}

.eventImage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s ease;
}

.eventImage.isLogoLike {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eventImage.isLogoLike img {
    box-sizing: border-box;
    padding: 18px;
    object-fit: contain;
}

.eventItem:hover .eventImage img {
    opacity: .95;
}

/* Datums-Badge */

.eventItemDate {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 20;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    text-align: center;
}

.eventItemDateDate {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.eventItemDateTime {
    font-size: 11px;
    font-weight: 400;
    text-align: left;
}

/* Event-Text */

.eventItemContentText {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 24px 15px 24px 15px;
    text-align: center;
    font-size: 16px;
}

.eventItemTitle {
    margin-bottom: 18px;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--HeadingColor);
}

.eventItemOrganizationWrapper {
    min-width: 0;
    margin-top: auto;
}

.eventItemOrganizationTitle {
    color: #65717d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.eventItemOrganization {
    display: block;
    overflow: hidden;
    margin: 0;
    color: #65717d;
    font-size: 14px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eventPreviewContent {
    color: #555;
    line-height: 1.45;
    margin-bottom: 15px;
    white-space: pre-line;
}

.eventPreviewContent p {
    margin: 0;
}

.eventItemAdditionalInfo {
    font-size: .95rem;
}

.eventItemDateInfoText {
    display: none;
}

.eventItemReadOn {
    margin-top: 20px;
}

@media screen and (max-width: 1023.9px) {

    #eventContent,
    .home #eventContent {
        padding-left: 0;
        padding-right: 0;
    }
}



/* ==========================================================
   Event-Detailseite
   ========================================================== */

.eventDetail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.eventDetailGrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 70px;
    align-items: start;
}

.eventDetailLeftColumn,
.eventDetailMain {
    min-width: 0;
}

.eventDetailDateContainer {
    margin-bottom: 10px;
}

.eventDetailDate {
    color: var(--area-color);
    font-family: 'Oswald', sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
}

.eventDetailTime {
    margin-top: 4px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.eventDetailContent {
    color: var(--CSSColor);
    font-size: 1.05rem;
    line-height: 1.75;
}

    .eventDetailContent > :first-child {
        margin-top: 0;
    }

    .eventDetailContent > :last-child {
        margin-bottom: 0;
    }

/* Sidebar */

.eventDetailSidebar {
    width: 100%;
}

/* Event-Karte */

.eventDetailCard {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .04);
}

#main .eventDetailCardImage {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

.eventDetailCardHeader {
    padding: 20px 23px 16px;
}

.eventDetailCardDate {
    color: var(--area-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.2;
}

.eventDetailCardTime {
    margin-top: 4px;
    color: #555;
    font-size: 16px;
    font-weight: 600;
}

.eventDetailCardHeader h2 {
    margin: 16px 0 0;
    color: var(--ThemeColorBlue);
    font-size: 1.5rem;
    line-height: 1.25;
}

/* Informationszeilen */

.eventDetailInfoRow {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 18px;
    padding: 13px 23px;
    border-top: 1px solid #e3e8ee;
}

    .eventDetailInfoRow:last-child {
        padding-bottom: 24px;
    }

    .eventDetailInfoRow > i {
        margin-top: 3px;
        color: var(--ThemeColorBlue);
        font-size: 1.2rem;
        line-height: 1.2;
        text-align: center;
    }

    .eventDetailInfoRow strong {
        display: block;
        margin-bottom: 2px;
        color: #555;
        font-size: 15px;
        font-weight: 600;
    }

    .eventDetailInfoRow span,
    .eventDetailInfoRow a {
        display: block;
        font-size: 15px;
        line-height: 1.5;
    }

    .eventDetailInfoRow a {
        color: var(--ThemeColorBlue);
        text-decoration: none;
        overflow-wrap: anywhere;
    }

        .eventDetailInfoRow a:hover {
            text-decoration: underline;
        }

/* Weitere Termine */

.eventDetailOtherDate {
    padding: 8px 0;
    border-bottom: 1px solid #edf0f3;
}

    .eventDetailOtherDate:first-of-type {
        padding-top: 4px;
    }

    .eventDetailOtherDate:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .eventDetailOtherDate span {
        font-weight: 500;
    }

    .eventDetailOtherDate small {
        display: block;
        margin-top: 1px;
        color: #666;
        font-size: 14px;
    }

/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 1100px) {
    .eventGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .eventDetail {
        padding: 0 0 60px;
    }

    .eventDetailGrid {
        display: flex;
        flex-direction: column;
        gap: 28px;
    }

    .eventDetailLeftColumn {
        display: contents;
    }

    .eventDetailMain {
        order: 1;
    }

    .eventDetailSidebar {
        order: 2;
        width: 100%;
        max-width: 450px;
    }
}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 700px) {
    #showFilterControls {
        display: block;
    }

    #filterContainer {
        display: none;
        margin-bottom: 32px;
        padding: 22px;
    }

        #filterContainer.isOpen {
            display: block;
        }

    #searchFilterInput {
        max-width: none;
    }

    #categoryFilter ul,
    #clearFilter ul {
        display: block;
    }

    #categoryFilter li,
    #clearFilter li {
        margin-bottom: 10px !important;
    }

        #categoryFilter li span,
        #clearFilter li span {
            width: 100%;
            justify-content: center;
        }

    /* Veranstalterfilter mobil */

    #organizationCombobox {
        max-width: none;
    }

    #organizationDropdown {
        position: static;
        margin-top: 5px;
    }

    #organizationOptions {
        max-height: 200px;
    }

    #selectedOrganization {
        max-width: 100%;
    }

    /* Event-Liste mobil */

    .eventGrid {
        grid-template-columns: 1fr;
    }

    .eventItemContentText {
        padding: 20px;
    }
}

@media (max-width: 580px) {
    .eventDetailSidebar {
        max-width: none;
    }

    .eventDetailCard {
        border-radius: 14px;
    }

    .eventDetailCardHeader {
        padding: 17px 20px 15px;
    }

    .eventDetailCardDate {
        font-size: 1.5rem;
    }

    .eventDetailCardHeader h2 {
        font-size: 1.4rem;
    }

    .eventDetailInfoRow {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 14px;
        padding: 16px 20px;
    }

        .eventDetailInfoRow:last-child {
            padding-bottom: 22px;
        }

        .eventDetailInfoRow > i {
            font-size: 1.1rem;
        }
}
