/* Global einheitliche Schriftart für den kompletten Kalender-Inhalt */
body, button, a, h2, div { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Kalender Überschrift Anpassung */
.calendar-navigation h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600; /* Harmonischer, moderner Schriftschnitt */
    color: #222;
}

/* Button Schriften anpassen */
.btn-nav, .btn-close {
    font-family: inherit; /* Erzwingt die globale Schriftart */
    font-weight: 600;
}



/* ==========================================
   THE CALENDAR LIGHTBOX LAYOUT INTERIORS
   ========================================== */
.calendar-lightbox {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 850px;
    border: none;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    margin: 5vh auto;
}

/* Clear standard display overrides when modal closed */
.calendar-lightbox:not([open]) {
    display: none !important;
}

/* Standard transparent dialog backdrop layout overrides since index.html wrapper renders backdrop filter tint layer */
.calendar-lightbox::backdrop {
    background: transparent;
    backdrop-filter: none;
}

/* Close Control Button Bar Area Layout styling */
.lightbox-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.btn-close {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-close:hover {
    background: #bd2130;
}

/* Interior scroll wrapper frame controls */
.lightbox-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
}

/* ==========================================
   NAVIGATION DESIGNS
   ========================================== */
.calendar-navigation { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}
.calendar-navigation h2 {
    margin: 0;
    font-size: 1.5rem;
}
.btn-nav { 
    background: #007bff; 
    color: #fff; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 4px; 
    font-weight: bold; 
    transition: background 0.2s;
}
.btn-nav:hover { 
    background: #0056b3; 
}

/* ==========================================
   GRID DEFINITION: EXACTLY 3 COLUMNS SIDE-BY-SIDE
   ========================================== */
.calendar-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* 3 columns next to each other on desktop */
    gap: 20px; /* Slightly reduced gap to give columns more breathing room */
}

.month-box { 
    background: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    padding: 12px; /* Marginally reduced padding for ideal layout fitting */
    box-shadow: 0 2px 8px rgba(0,0,0,0.02); 
}

.month-title { 
    text-align: center; 
    font-weight: bold; 
    margin-bottom: 15px; 
    font-size: 1.2rem; 
    color: #222;
}
.days-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    text-align: center; 
    gap: 5px; 
}
.day-name { 
    font-weight: bold; 
    color: #777; 
    font-size: 0.85rem; 
    padding-bottom: 8px; 
}

/* Day Item Elements Status Layout Styling rules */
.day { 
    padding: 10px 0; 
    border-radius: 4px; 
    font-size: 0.9rem; 
}
.day.empty { background: transparent; }
.day.free { background: #e2f0d9; color: #385723; }
.day.booked { 
    background: #fce4d6; 
    color: #c65911; 
    text-decoration: line-through; 
    font-weight: bold; 
}

/* ==========================================
   MOBILE & TABLET BREAKPOINTS (RESPONSIVE)
   ========================================== */

/* 1. Medium viewports (Tablets / small laptops) */
@media (max-width: 1024px) {
    .calendar-grid { 
        grid-template-columns: repeat(2, 1fr); /* Seamlessly drops to 2 columns */
        gap: 20px;
    }
}

/* 2. Small viewports (Smartphones) */
@media (max-width: 680px) {
    .calendar-grid { 
        grid-template-columns: 1fr; /* Stacks into a clean 1-column mobile column view */
        gap: 15px;
    }
}
