/* Container für Buttons */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Responsive Tabelle */
.calendar-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Basis: Tabelle immer 100% des Containers */
.calendar-table {
    width: 100%;
    /* min-width: 800px;  <-- AUFGELÖST (siehe unten) */
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table td {
    vertical-align: top;
    border: 1px solid #dee2e6;
    padding: 5px;
    height: 120px;
}

.calendar-table .out-month {
    background: #f5f5f5;
    color: #aaa;
}

.termin {
    font-size: 0.85rem;
    background: #e63946;
    padding: 4px;
    margin-bottom: 5px;
    line-height: 1.5em;
    color: #fff;
    border-radius: 4px;
}

/* Desktop: min-width: 800px NUR hier aktivieren */
@media (min-width: 768px) {
    .calendar-table {
        min-width: 800px; /* Jetzt erst ab Tablet/Desktop */
    }
}

/* Mobile Optimierung: Ab unter 768px wird der Kalender zur Liste */
@media (max-width: 767px) {
    .calendar-table, .calendar-table thead, .calendar-table tbody, .calendar-table th, .calendar-table td, .calendar-table tr {
        display: block; 
    }
    .calendar-table thead { display: none; }
    
    .calendar-table td {
        height: auto;
        min-height: 50px;
        border: none;
        border-bottom: 1px solid #eee;
        padding: 10px;
    }
    
    .calendar-table td.out-month { display: none; }
    
    .day-number {
        font-weight: bold;
        background: #eee;
        padding: 2px 10px;
        display: inline-block;
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .calendar-table td:has(.termin) {
        background: #fff;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
    }
}