/* ==========================================
   FARBSCHEMA MIT MODERNEM FLAT 3D EFFEKT
   ========================================== */
:root {
    --primary-color: #00a3e0;       /* Auswahl-Blau für Start & Ende */
    --primary-text: #ffffff;        
    --range-bg: #d0f0fd;            /* Hellblau für den gezogenen Zeitraum */
    --range-text: #006699;          
    --range-border: #a1e0f7;        
    
    --booked-bg: #fba1a1;           /* Pastell-Rot für belegte Tage */
    --booked-text: #7d1f1f;         
    
    --free-bg: #cbf2d6;             /* Pastell-Grün für freie Tage */
    --free-text: #1e5a2e;           
    
    --hover-single-bg: #e6f7ff;     
}

body { font-family: Arial, sans-serif; margin: 30px; background-color: #f5f5f5; }
.booking-container { max-width: 100%; width: 980px; margin: 0 auto; box-sizing: border-box; }

/* Kalender-Außenrahmen (Ebenfalls im Flat 3D Look angehoben) */
.calendar-grid-container {
    display: flex; 
    flex-wrap: wrap; 
    background: #f5f5f5; /* Hintergrundfarbe leicht angepasst für 3D-Effekt */
    border: 1px solid rgba(255,255,255,0.7); 
    border-radius: 16px; 
    padding: 22px; 
    box-shadow: 6px 6px 16px rgba(163, 177, 198, 0.4), -6px -6px 16px rgba(255, 255, 255, 0.8);
    gap: 30px;
}

.month-wrapper { flex: 1 1 30%; min-width: 260px; }
.month-wrapper h3 { text-align: center; margin-top: 0; margin-bottom: 15px; color: #444; font-size: 16px; font-weight: bold; }
.weekdays-grid, .days-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.weekdays-grid div { color: #888; font-size: 13px; padding-bottom: 8px; font-weight: bold; }

/* 🌟 DIE FLAT 3D TAGES-KACHELN (NEUMORPHIC LOOK) */
.day-cell {
    aspect-ratio: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 14px; 
    font-weight: bold;
    user-select: none; 
    box-sizing: border-box;
    border-radius: 8px; 
    margin: 4px; 
    border: 1px solid rgba(255, 255, 255, 0.6); 
    
    /* Der 3D-Hervorhebungs-Effekt */
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.8) !important;
    transition: all 0.15s ease-in-out;
}

.day-cell.empty { border: none; cursor: default; background: transparent !important; box-shadow: none !important; }
.day-cell.past { color: #bbb; cursor: not-allowed; background: #eaeaea; box-shadow: none !important; }

/* REIN FREIER TAG IM RUHEZUSTAND (Pastell-Grün) */
.day-cell.free-day { background: var(--free-bg); color: var(--free-text); }

/* REIN BESETZTER TAG (Pastell-Rot) */
.day-cell.full { background: var(--booked-bg) !important; color: var(--booked-text) !important; cursor: not-allowed; box-shadow: none !important; }

/* WECHSELSTAGE UNSELEKTIERT (Schnitt Rot / Grün) */
.day-cell.checkout { background: linear-gradient(135deg, var(--booked-bg) 50%, var(--free-bg) 50%) !important; color: #333 !important; }
.day-cell.checkin { background: linear-gradient(135deg, var(--free-bg) 50%, var(--booked-bg) 50%) !important; color: #333 !important; }

/* 🌟 DYNAMISCHER 3D-DRUCK-EFFEKT BEIM HOVERN & ANKLICKEN */
.day-cell.free-day:hover { 
    background: var(--hover-single-bg) !important; 
    color: #006699 !important; 
    /* Schatten kehrt sich um -> Kachel drückt sich rein */
    box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.3), inset -2px -2px 5px rgba(255, 255, 255, 0.7) !important;
    transform: scale(0.97);
}

/* ------------------------------------------
   VOLLSTÄNDIGE HOVER-AUSWAHL (DAS BAND WIRD REINGEDRÜCKT)
   ------------------------------------------ */
.day-cell.hover-in-range,
.day-cell.selected-range {
    background: var(--range-bg) !important; 
    color: var(--range-text) !important;
    border-color: var(--range-border) !important;
    /* Der gesamte ausgewählte Zeitraum wirkt flach eingestanzt */
    box-shadow: inset 2px 2px 4px rgba(0, 90, 150, 0.15) !important;
}

.day-cell.hover-in-range.checkout,
.day-cell.hover-in-range.checkin,
.day-cell.selected-range.checkout,
.day-cell.selected-range.checkin {
    background: var(--range-bg) !important;
    color: var(--range-text) !important;
}

/* ------------------------------------------
   FESTE SELEKTIONS-MUSTER (DIE HOCHGEHOBENEN FIXPUNKTE)
   ------------------------------------------ */
/* Starttag (Anreise): Rechts wird intensiv CYAN-BLAU, Kachel bleibt leicht erhaben für Signalwirkung */
.day-cell.range-edge-start.checkout {
    background: linear-gradient(135deg, var(--booked-bg) 50%, var(--primary-color) 50%) !important;
    color: var(--primary-text) !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* Endtag (Abreise) oder aktuelle Mausposition auf einem Wechseltag -> Links wird CYAN-BLAU */
.day-cell.range-edge-end.checkin, 
.day-cell.hover-edge-end.checkin {
    background: linear-gradient(135deg, var(--primary-color) 50%, var(--booked-bg) 50%) !important;
    color: var(--primary-text) !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* Anreisetag wird beim Ziehen der Maus überflogen */
.day-cell.hover-edge-end.checkout {
    background: linear-gradient(135deg, var(--booked-bg) 50%, var(--primary-color) 50%) !important;
    color: var(--primary-text) !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* GANZ FREIER TAG ALS FESTE AUSWAHL ODER HOVER-ZIELPUNKT (Komplett Cyan-Blau erhaben) */
.day-cell.range-edge-start, 
.day-cell.range-edge-end, 
.day-cell.hover-edge-end {
    background: var(--primary-color) !important; 
    color: var(--primary-text) !important; 
    border-color: var(--primary-color) !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15) !important;
}

/* UI Sonstige Elemente */
.status-text { font-size: 16px; font-weight: bold; margin: 20px 0 10px 0; color: #333; }
.error-text { color: #cc0000; } .success-text { color: #008000; }
.price-box { display: none; padding: 15px; background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; margin-top: 15px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.price-box p { margin: 5px 0; font-size: 15px; } .total-price-text { font-weight: bold; color: var(--primary-color); font-size: 18px; }
.btn-reset { padding: 10px 20px; background: #555; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 15px; }

@media (max-width: 850px) {
    .calendar-grid-container { flex-direction: column; padding: 10px; gap: 20px; border-radius: 0; box-shadow: none; }
    .month-wrapper { width: 100%; } .day-cell { margin: 1px; } .btn-reset { width: 100%; text-align: center; }
}
