/* Grundlayout */
.c2tm-termine {
    margin: 3rem 0;
    font-family: inherit;
}

/* ================= FILTER-BUTTONS ================= */

.c2tm-termine__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.c2tm-termine__filter-button {
    border: none;
    border-radius: var(--c2tm-filter-radius, 999px);
    padding: 0.4rem 1rem;
    background-color: #444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.c2tm-termine__filter-button .c2tm-termine__filter-icon {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 0;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.c2tm-termine__filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.c2tm-termine__filter-button.is-active {
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}
/* "Alle"-Button – eigene Farben via CSS-Variablen */
.c2tm-termine__filter-button--all {
    background-color: var(--c2tm-allfilter-bg, #444);
    color: var(--c2tm-allfilter-color, #fff);
}
.c2tm-termine__filter-button--all:hover {
    opacity: 0.95;
}

.c2tm-termine__filter-button--all i,
.c2tm-termine__filter-button--all svg {
    color: inherit;
}
/* ================= MONATS-NAVIGATION ================= */

.c2tm-termine__months-nav {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.c2tm-termine__months-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0 0 0.4rem;
}

.c2tm-termine__months-nav li {
    margin: 0;
}

.c2tm-termine__months-nav button {
    background-color: var(--c2tm-months-bg, transparent);
    border: none;
    border-radius: var(--c2tm-months-radius, 999px);
    padding: 0.3rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--c2tm-months-color, #555);
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.c2tm-termine__months-nav button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.c2tm-termine__months-nav button.is-active {
    background-color: var(--c2tm-months-bg-active, var(--c2tm-months-bg, #111));
    color: var(--c2tm-months-color-active, #fff);
}

.c2tm-termine__months--flat .c2tm-termine__month-heading--inline {
    width: 100%;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    padding: 0 0.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
}

/* ================= MONATS-PANEEL ================= */

.c2tm-termine__month-panel {
    display: none;
}

.c2tm-termine__month-panel.is-active {
    display: block;
}

.c2tm-termine__month-heading {
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

/* ================= GRID & KARTEN ================= */

/* Basis: Mobile = immer 1 Spalte */
.c2tm-termine__grid {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

/* clearfix für float-Layout */
.c2tm-termine__grid::after {
    content: "";
    display: block;
    clear: both;
}

/* ================= SPALTEN-LOGIK (data-columns) ================= */

/* Basis: 3 Spalten */
.c2tm-termine .c2tm-termine__item {
    width: 33.3333%;
}

/* dynamisch via data-columns */
.c2tm-termine[data-columns="1"] .c2tm-termine__item { width: 100%; }
.c2tm-termine[data-columns="2"] .c2tm-termine__item { width: 50%; }
.c2tm-termine[data-columns="3"] .c2tm-termine__item { width: 33.3333%; }
.c2tm-termine[data-columns="4"] .c2tm-termine__item { width: 25%; }
.c2tm-termine[data-columns="5"] .c2tm-termine__item { width: 20%; }
.c2tm-termine[data-columns="6"] .c2tm-termine__item { width: 16.6667%; }

/* ================= RESPONSIVE ================= */

.c2tm-termine__item {
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

/* Ab Tablet / Desktop: Spalten nach data-columns */
@media (min-width: 768px) {

    /* 🔧 SPEZIAL: 1-Spalten-Layout → begrenzt + zentriert */
    .c2tm-termine[data-columns="1"] .c2tm-termine__item {
        width: 100%;
        max-width: 720px;          /* "Komfort-Breite" bei mittleren Viewports */
        margin-left: auto;
        margin-right: auto;        /* zentrieren im Parent-Container */
    }

    .c2tm-termine[data-columns="2"] .c2tm-termine__item,
    .c2tm-termine[data-columns="3"] .c2tm-termine__item,
    .c2tm-termine[data-columns="4"] .c2tm-termine__item,
    .c2tm-termine[data-columns="5"] .c2tm-termine__item,
    .c2tm-termine[data-columns="6"] .c2tm-termine__item {
        width: 50%;
    }
}

/* Ab Tablet / Desktop: Spalten nach data-columns */
@media (min-width: 1440px) {

    /* 🔧 SPEZIAL: 1-Spalten-Layout → begrenzt + zentriert */
    .c2tm-termine[data-columns="1"] .c2tm-termine__item {
        width: 100%;
        max-width: 720px;          /* "Komfort-Breite" bei mittleren Viewports */
        margin-left: auto;
        margin-right: auto;        /* zentrieren im Parent-Container */
    }

    .c2tm-termine[data-columns="2"] .c2tm-termine__item {
        width: 50%;
    }

    .c2tm-termine[data-columns="3"] .c2tm-termine__item {
        width: calc(100% / 3);
    }

    .c2tm-termine[data-columns="4"] .c2tm-termine__item {
        width: 25%;
    }

    .c2tm-termine[data-columns="5"] .c2tm-termine__item {
        width: 20%;
    }

    .c2tm-termine[data-columns="6"] .c2tm-termine__item {
        width: calc(100% / 6);
    }
}

/* 🔧 Ab ~1200px darf 1-Spalten-Layout wirklich volle Containerbreite nutzen */
@media (min-width: 1200px) {
    .c2tm-termine[data-columns="1"] .c2tm-termine__item {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Tablet: für mehrere Spalten auf 2 Spalten runter, aber NICHT für data-columns="1" */
@media (max-width: 960px) {
    .c2tm-termine[data-columns]:not([data-columns="1"]) .c2tm-termine__item {
        width: 100% !important;
    }
}

@media (max-width: 640px) {
/*
    .c2tm-termine[data-columns] .c2tm-termine__item {
        width: 100% !important;
    }
*/
    .c2tm-termine__item-inner {
        flex-direction: row;
    }

    .c2tm-termine__date-indicator {
        flex-basis: 4rem;
    }
}


.c2tm-termine__item-inner {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    background-color: #fff;
    border-radius: var(--c2tm-card-radius, 0.75rem);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.c2tm-termine__item:hover .c2tm-termine__item-inner {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.c2tm-termine__item-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.c2tm-termine__item-link:hover {
    text-decoration: none;
}

/* ================= DATUMS-INDIKATOR ================= */

.c2tm-termine__date-indicator {
    flex: 0 0 5rem;
    min-height: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem;
}

.c2tm-termine__day-name {
    font-size: 0.8rem;
    font-weight: bold;
}

.c2tm-termine__day {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.c2tm-termine__month-short {
    font-size: 0.85rem;
    font-weight: bold;
}

/* ================= INHALT ================= */

.c2tm-termine__content {
    flex: 1;
    padding: 0.6rem 0.9rem 0.7rem 0.3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Titel nach oben */
}

.c2tm-termine__title {
    font-size: 1rem;
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.c2tm-termine__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: #666;
    align-items: center;
    margin-top: auto; /* Meta nach unten schieben */
}

.c2tm-termine__time i,
.c2tm-termine__place i {
    margin-right: 0.2rem;
}

/* "klickbar"-Icon */
.c2tm-termine__link a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.c2tm-termine__link a:hover {
    color: #111;
}

/* "klickbar"-Indikator (kein eigener Link mehr) */
.c2tm-termine__link-indicator {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.c2tm-termine__link-indicator i {
    margin-left: 0.25rem;
}

/* ================= LEERZUSTAND ================= */

.c2tm-termine--empty {
    margin: 2rem 0;
    padding: 1.5rem 1.25rem;
    border-radius: 0.75rem;
    background-color: #fafafa;
    border: 1px dashed rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: #666;
}

/* ================= MORE BUTTON ================= */

.c2tm-termine__more {
    text-align: center;
    margin-top: 1.75rem;
}

.c2tm-termine__more-button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.c2tm-termine__more-button:hover {
    text-decoration: none;
    opacity: 0.9;
    color: #fff;
}

.c2tm-termine__no-results {
    display: none;
    text-align: left;
    margin: 1.5rem 0 5rem 0;
    color: #666;
    font-size: 0.9rem;
}