/* =========================
   Basiseinstellungen
   ========================= */
body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 20px;
    color: #333;
}

/* =========================
   Kalender & Verfügbarkeiten
   ========================= */

/* Container für mehrere Kalender nebeneinander */
#multi-calendar-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

/* Einzelner Kalender */
.calendar-container {
    width: 320px;
    flex-basis: 320px;
    flex-grow: 0;
    flex-shrink: 0;
    margin: 0;
    text-align: center;
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Monatstitel */
.month {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    flex-shrink: 0;
    min-height: 1.4em;
}

/* Wochentagszeile (Mo-So) */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Grid für die Tage */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
}

/* Einzelnes Tagesfeld */
.day {
    padding: 8px 4px;
    background-color: #caffca;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    border: 1px solid #ddd;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

/* Heute */
.day.today {
    border: 2px solid black;
}

/* Gebuchte Tage */
.day.booked {
    background-color: #f8d7da;
    color: #721c24;
}

/* Halber Tag: Anreise */
.day.arrival {
    background: linear-gradient(to bottom right, #caffca 50%, #f8d7da 50%);
}

/* Halber Tag: Abreise */
.day.departure {
    background: linear-gradient(to bottom right, #f8d7da 50%, #caffca 50%);
}

/* Wechseltag */
.day.wechseltag {
    background: linear-gradient(-45deg, #f8d7da 48%, #caffca 48%, #caffca 52%, #f8d7da 52%);
}

/* Leere Felder */
.day.empty {
    background-color: transparent;
    border: none;
    cursor: default;
}

.manual-booking {
    background-color: #f8d7da;
    color: #721c24;
}

/* Überschrift für Verfügbarkeitsbereich */
#availability-heading {
    font-size: 28px;
    font-family: Georgia, serif;
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Navigation Buttons */
#prevMonth,
#nextMonth {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    background-color: #d4af37;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#prevMonth:hover,
#nextMonth:hover {
    background-color: #b58f2a;
}

#prevMonth:disabled,
#nextMonth:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Wrapper für Navigation-Buttons */
#nav-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Mobile: Buttons nebeneinander in einer Zeile */
@media (max-width: 768px) {
    #nav-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-direction: column;
    }
    
    #nav-container > h2 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #nav-buttons-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    /* Buttons in einer Zeile */
    #prevMonth,
    #nextMonth {
        white-space: nowrap;
        font-size: 0.9em;
        padding: 8px 12px;
        margin: 0;
        flex: 0 0 auto;
    }
}

/* Button, der das Modal öffnet */
#openPriceCalculatorBtn {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 1.2em;
    background-color: #d4af37;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

/* Mobile: Button-Text nicht umbrechen */
@media (max-width: 768px) {
    #openPriceCalculatorBtn {
        white-space: nowrap;
        font-size: 1em;
        padding: 10px 16px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

#openPriceCalculatorBtn:hover {
    background-color: #b58f2a;
}

/* Buchungsbereich */
.booking-container {
    text-align: center;
    margin: 20px 0;
}

.booking-container h2 {
    font-size: 28px;
    font-family: Georgia, serif;
    color: #555;
    margin-bottom: 15px;
}

.booking-container p {
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
}

.booking-btn {
    display: inline-block;
    text-align: center;
    background-color: #d4af37;
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

/* Mobile: Button-Text nicht umbrechen */
@media (max-width: 768px) {
    .booking-btn {
        white-space: nowrap;
        font-size: 16px;
        padding: 12px 20px;
    }
}

.booking-btn:hover {
    background-color: #b58f2a;
}

/* Responsive: Verstecke zusätzliche Kalender wenn nicht genug Platz */
/* Berechnung: 3 Kalender à 320px + 2 Gaps à 10px + Padding = ~1020px */
@media (max-width: 1020px) {
    #calendar-container-2,
    #calendar-container-3 {
        display: none;
    }
}

/* Mobile: Verstecke zusätzliche Kalender */
@media (max-width: 500px) {
    #calendar-container-2,
    #calendar-container-3 {
        display: none;
    }
}

