.bve-public-events {
    --bve-blue: #4066af;
    --bve-text: #1d2327;
    --bve-muted: #646970;
    --bve-border: #e2e6ec;
    --bve-soft: #f7f8fa;
    width: 100%;
    color: var(--bve-text);
}

.bve-public-events__header {
    margin: 0 0 24px;
}

.bve-public-events__header h2 {
    margin: 0 0 6px;
}

.bve-public-events__header p {
    margin: 0;
    color: var(--bve-muted);
}

.bve-public-events__list {
    display: grid;
    gap: 16px;
}

.bve-public-event {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--bve-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.bve-public-event__date {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    border-right: 1px solid var(--bve-border);
    background: var(--bve-soft);
    text-align: center;
}

.bve-public-event--bve .bve-public-event__date {
    border-top: 4px solid var(--bve-blue);
}

.bve-public-event--sdnet .bve-public-event__date {
    border-top: 4px solid #555;
}

.bve-public-event__day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.bve-public-event__month {
    margin-top: 5px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.bve-public-event__year {
    margin-top: 2px;
    color: var(--bve-muted);
    font-size: .8rem;
}

.bve-public-event__body {
    min-width: 0;
    padding: 20px 22px;
}

.bve-public-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 7px;
}

.bve-public-event__source,
.bve-public-event__type {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.4;
}

.bve-public-event__source {
    background: #edf2fb;
    color: #294b8e;
}

.bve-public-event--sdnet .bve-public-event__source {
    background: #f0f0f1;
    color: #3c434a;
}

.bve-public-event__type {
    background: #f6f7f7;
    color: #50575e;
}

.bve-public-event__title {
    margin: 0 0 10px;
    font-size: 1.22rem;
    line-height: 1.3;
}

.bve-public-event__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.bve-public-event__time::before {
    content: "◷";
    margin-right: 6px;
}

.bve-public-event__location::before {
    content: "⌖";
    margin-right: 6px;
}

.bve-public-event__address {
    margin: 6px 0 10px;
    color: var(--bve-muted);
}

.bve-public-event__description {
    margin-top: 12px;
}

.bve-public-event__description > :first-child {
    margin-top: 0;
}

.bve-public-event__description > :last-child {
    margin-bottom: 0;
}

.bve-public-event__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 14px;
}

.bve-public-event__link {
    color: var(--bve-blue);
    font-weight: 600;
    text-decoration: none;
}

.bve-public-event__link:hover,
.bve-public-event__link:focus {
    text-decoration: underline;
}

.bve-public-event__link--secondary {
    color: #50575e;
}

.bve-public-events__empty {
    padding: 22px;
    border: 1px solid var(--bve-border);
    border-radius: 10px;
    background: var(--bve-soft);
}

@media (max-width: 600px) {
    .bve-public-event {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .bve-public-event__date {
        min-height: 120px;
        padding: 14px 6px;
    }

    .bve-public-event__day {
        font-size: 1.65rem;
    }

    .bve-public-event__body {
        padding: 16px;
    }

    .bve-public-event__facts {
        display: grid;
        gap: 5px;
    }
}


.bve-public-event__top {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.bve-public-event__brand {
    display: flex;
    width: 58px;
    min-height: 58px;
    align-items: center;
    justify-content: center;
}

.bve-public-event__brand-image {
    display: block;
    width: auto;
    max-width: 58px;
    height: auto;
    max-height: 58px;
    object-fit: contain;
}

.bve-public-event__brand-fallback {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bve-border);
    border-radius: 10px;
    background: var(--bve-soft);
    color: var(--bve-muted);
    font-size: .78rem;
    font-weight: 700;
}

.bve-public-event--bve .bve-public-event__brand-fallback {
    border-color: #d6e0f3;
    background: #edf2fb;
    color: #294b8e;
}

.bve-public-event__content {
    min-width: 0;
}

@media (max-width: 600px) {
    .bve-public-event__top {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .bve-public-event__brand {
        width: 42px;
        min-height: 42px;
    }

    .bve-public-event__brand-image {
        max-width: 42px;
        max-height: 42px;
    }

    .bve-public-event__brand-fallback {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: .7rem;
    }
}

/* Branding-Feinschliff */
/* 1.9.2: Bildgroessen werden in den BvE-Einstellungen konfiguriert. */
.bve-public-event__top {
    grid-template-columns: var(--bve-brand-area, 48px) minmax(0, 1fr);
}
.bve-public-event__brand {
    width: var(--bve-brand-area, 48px);
    min-height: var(--bve-brand-area, 48px);
}
.bve-public-event--rat .bve-public-event__brand-image,
.bve-public-event--bve .bve-public-event__brand-image {
    width: var(--bve-brand-size, 48px);
    height: var(--bve-brand-size, 48px);
    max-width: var(--bve-brand-size, 48px);
    max-height: var(--bve-brand-size, 48px);
    object-fit: contain;
    object-position: center;
}
@media (max-width: 600px) {
    .bve-public-event__top {
        grid-template-columns: var(--bve-brand-mobile-area, 48px) minmax(0, 1fr);
    }
    .bve-public-event__brand {
        width: var(--bve-brand-mobile-area, 48px);
        min-height: var(--bve-brand-mobile-area, 48px);
    }
    .bve-public-event--rat .bve-public-event__brand-image,
    .bve-public-event--bve .bve-public-event__brand-image {
        width: var(--bve-brand-mobile-size, 48px);
        height: var(--bve-brand-mobile-size, 48px);
        max-width: var(--bve-brand-mobile-size, 48px);
        max-height: var(--bve-brand-mobile-size, 48px);
    }
}

/* BvE-Termin Detailansicht */
.bve-termin-detail{max-width:900px;padding:26px;border:1px solid var(--bve-border);border-radius:12px;background:#fff}
.bve-termin-detail__back{display:inline-block;margin-bottom:22px;text-decoration:none}
.bve-termin-detail__header{display:flex;gap:18px;align-items:center;margin-bottom:24px}
.bve-termin-detail__header h2{margin:7px 0 0}
.bve-termin-detail__logo{width:auto;max-width:85px;max-height:58px;object-fit:contain}
.bve-termin-detail__facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;padding:18px 0;border-top:1px solid var(--bve-border);border-bottom:1px solid var(--bve-border)}
.bve-termin-detail__facts>div{display:grid;gap:3px}
.bve-termin-detail__description{margin-top:22px}
.bve-termin-detail__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.bve-termin-button{display:inline-flex;align-items:center;min-height:40px;padding:7px 14px;border:1px solid #4066af;border-radius:6px;text-decoration:none;font-weight:600}
.bve-termin-button--primary{background:#4066af;color:#fff}
.bve-termin-button--disabled{border-color:#dcdcde;background:#f6f7f7;color:#646970;cursor:not-allowed}
.bve-termin-detail-empty{padding:18px;border:1px solid var(--bve-border);border-radius:8px;background:#fff}
@media(max-width:600px){.bve-termin-detail{padding:18px}.bve-termin-detail__header{align-items:flex-start}.bve-termin-detail__logo{max-width:60px;max-height:46px}.bve-termin-detail__facts{grid-template-columns:1fr}.bve-termin-detail__actions{flex-direction:column;align-items:stretch}.bve-termin-button{justify-content:center}}

.bve-termin-detail__actions .bve-termin-button:hover{background:#f0f4fb}
.bve-termin-detail__actions .bve-termin-button--primary:hover{background:#31518f;color:#fff}

/* 1.2.0 Ansichten & Filter */
.bve-termine-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:18px 0;padding:14px;border:1px solid var(--bve-border);border-radius:10px;background:#fff}.bve-termine-search{flex:1 1 230px}.bve-termine-search input,.bve-termine-toolbar select{width:100%;min-height:40px;padding:7px 10px;border:1px solid #c3c4c7;border-radius:6px;background:#fff}.bve-termine-source-filter,.bve-termine-view-switch{display:flex;gap:4px}.bve-termine-source-filter button,.bve-termine-view-switch button,.bve-termine-calendar__nav button{min-height:40px;padding:7px 12px;border:1px solid #c3c4c7;border-radius:6px;background:#fff;cursor:pointer}.bve-termine-source-filter button.is-active,.bve-termine-view-switch button.is-active{border-color:#4066af;background:#4066af;color:#fff}.bve-termine-type-filter,.bve-termine-range-filter{flex:0 1 180px}.bve-termine-no-results{padding:18px;border:1px solid var(--bve-border);border-radius:8px;background:#fff}.bve-termine-calendar{margin-top:14px;border:1px solid var(--bve-border);border-radius:10px;background:#fff;overflow:hidden}.bve-termine-calendar__nav{display:grid;grid-template-columns:auto auto 1fr auto;gap:8px;align-items:center;padding:12px;border-bottom:1px solid var(--bve-border)}.bve-termine-calendar__nav strong{text-align:center;font-size:1.1rem}.bve-termine-calendar__grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.bve-cal-weekday{padding:9px 6px;text-align:center;font-weight:700;background:#f6f7f7;border-bottom:1px solid var(--bve-border)}.bve-cal-day{min-height:112px;padding:7px;border-right:1px solid var(--bve-border);border-bottom:1px solid var(--bve-border);min-width:0}.bve-cal-day--empty{background:#fafafa}.bve-cal-day__num{font-weight:700;margin-bottom:5px}.bve-cal-day.is-today .bve-cal-day__num{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:27px;border-radius:50%;background:#4066af;color:#fff}.bve-cal-event{display:block;margin:4px 0;padding:4px 6px;border-left:3px solid #777;border-radius:3px;background:#f6f7f7;font-size:.78rem;line-height:1.25;text-decoration:none;overflow:hidden;text-overflow:ellipsis}.bve-cal-event--bve{border-left-color:#4066af;background:#edf2fb}@media(max-width:700px){.bve-termine-toolbar{align-items:stretch}.bve-termine-source-filter,.bve-termine-view-switch{width:100%}.bve-termine-source-filter button,.bve-termine-view-switch button{flex:1}.bve-termine-type-filter,.bve-termine-range-filter{flex:1 1 45%}.bve-termine-calendar{overflow-x:auto}.bve-termine-calendar__grid,.bve-termine-calendar__nav{min-width:720px}.bve-cal-day{min-height:95px}}


/* 1.2.1: hidden muss gegenüber den Komponenten-Layouts immer Vorrang haben. */
.bve-public-events [hidden] {
    display: none !important;
}

/* Kalender: lange Titel kompakt und lesbar halten. */
.bve-cal-event {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}
.bve-cal-event:hover,
.bve-cal-event:focus {
    white-space: normal;
    overflow: visible;
    position: relative;
    z-index: 2;
}

/* Filterstatus klarer erkennbar. */
.bve-termine-source-filter button.is-active,
.bve-termine-view-switch button.is-active {
    font-weight: 600;
}

/* 1.3.0 Pagination */
.bve-termine-page-size{flex:0 1 135px}.bve-termine-pagination{display:flex;justify-content:center;align-items:center;gap:14px;margin:18px 0 4px}.bve-termine-pagination button{min-height:38px;padding:6px 12px;border:1px solid #c3c4c7;border-radius:6px;background:#fff;cursor:pointer}.bve-termine-pagination button:disabled{opacity:.45;cursor:default}.bve-termine-pagination span{font-weight:600}@media(max-width:700px){.bve-termine-page-size{flex:1 1 45%}.bve-termine-pagination{justify-content:space-between;gap:8px}.bve-termine-pagination button{flex:1}.bve-termine-pagination span{white-space:nowrap;font-size:.9rem}}
