/* Grundlegendes Kalenderlayout */
.buka-cal-wrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 10px;
    font-weight: bold;
}

/* Navigation */
.buka_pager_nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Monatskalender Container */
.y-wrapper {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: calc(100% - 10px);
    border: 1px solid #999999;
    padding: 2px;
    gap: 1px;
    background: white;
    list-style: none; /* Listenpunkte entfernen */
    margin: 0; /* Standardabstand entfernen */
    padding-left: 0; /* Linken Einzug entfernen */
}

/* Listen-Reset für alle li Elemente im Kalender */
.y-wrapper li {
    text-align: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Monatstitel */
.y-wrapper .bk_month_title {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    background: #f5f5f5;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Wochentage */
.bk-weekday {
    padding: 5px 0;
    font-weight: bold;
    background: #f0f0f0;
}

/* Kalendertage */
.bk-day {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    font-weight: bold;
    border: 1px solid white;
    box-sizing: border-box;
    z-index: 1;
}

/* Buchungsstatus Styles */
.bk-day.bookable {
    cursor: pointer;
    pointer-events: all;
}

.fix-booked {
    background-color: #bf0000;
}

.free {
    background-color: #337b33;
}

/* Spezielle Tagesmarkierungen */
.fix-booked-end:before {
    background-color: #bf0000;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.fix-booked-end:not(.fix-booked-start):after {
    background-color: #337b33;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.fix-booked-start:not(.fix-booked-end):before {
    background-color: #337b33;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.fix-booked-start:after {
    background-color: #bf0000;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

/* Reservierungsstatus */
.reserve-start {
    background-color: transparent;
}

.reserve-start:after {
    background-color: #1e66d7;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.reserve-start.free:before {
    background-color: #337b33;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.add-reserve.reserve-end {
    background-color: transparent !important;
}

.add-reserve.reserve-end:before {
    background-color: #1e66d7;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.add-reserve.reserve-end:after {
    background-color: #337b33;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    z-index: -1;
}

.add-reserve:not(.reserve-start) {
    background-color: #1e66d7;
}

/* Formulare und Buttons */
.mind_booking_message {
    display: none;
}

#bookingform-step2 {
    display: none;
}

button#to-step-1 {
    margin-left: 20px;
}

/* Responsive Design */
@media screen and (min-width: 640px) {
    .y-wrapper {
        width: calc(50% - 20px);
    }
}

@media screen and (min-width: 960px) {
    .y-wrapper {
        width: calc(33.3333% - 20px);
    }
}

@media screen and (min-width: 1200px) {
    .y-wrapper {
        width: calc(25% - 20px);
    }
}

/* Mobile Optimierung */
@media screen and (max-width: 639px) {
    .buka-cal-wrapper {
        gap: 10px;
    }
    
    .y-wrapper {
        width: 100%;
    }
    
    .bk-day {
        min-height: 40px;
        font-size: 14px;
    }
    
    .buka_pager_nav {
        font-size: 14px;
        padding: 0 10px;
    }
}

/* Barrierefreiheit */
.bk-day:focus {
    outline: 2px solid #1e66d7;
    outline-offset: -2px;
}

.bk-day.bookable:hover {
    opacity: 0.9;
}

/* Hilfeklassen */
.bk-dummy {
    background: transparent;
    pointer-events: none;
}

/* Kalenderlegende (falls benötigt) */
.calendar-legend {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
}

/* Übergangsanimationen */
.bk-day {
    transition: opacity 0.2s ease;
}