
/* --- Flatpickr Theme Customization --- */

/* 1. Main Calendar Container - Round top corners */
.flatpickr-calendar {
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* 2. Header Area - Full Width & Vertical Centering */
.flatpickr-months {
    background: #043270 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: #fff !important;
    height: 100% !important;
    flex: 1 !important; /* Allows the month container to fill the space */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Centers contents horizontally */
}

/* 3. Centering the Month/Year Dropdowns */
.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Final horizontal centering */
    position: static !important; /* Removes absolute positioning that blocks centering */
    height: auto !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    text-align: center !important;
}

/* 4. Dropdown Styling */
.flatpickr-monthDropdown-months, 
.year-dropdown-custom,
.cur-year {
    background-color: #043270 !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    height: 34px !important; /* Slightly taller for modern look */
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 6px !important;
    margin: 0 4px !important;
    cursor: pointer !important;
    outline: none !important;
    
    appearance: none !important;
    -webkit-appearance: none !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 18px !important;
}

/* FIX: Ensure Month width is wide enough for all months */
.flatpickr-monthDropdown-months {
    padding: 0 30px 0 12px !important;
    width: auto !important;
    min-width: 125px !important; /* Prevents "September" from being cut off */
}

/* 5. Year Specific width */
.numInputWrapper {
    width: 95px !important;
    display: inline-flex !important;
}

.year-dropdown-custom, .cur-year {
    padding: 0 28px 0 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 6. Navigation Arrows - Properly aligned with header */
.flatpickr-prev-month, .flatpickr-next-month {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 15px !important;
    z-index: 5 !important;
}

.flatpickr-prev-month svg, .flatpickr-next-month svg {
    fill: #fff !important;
}

/* 7. Focus/Active states - No white background */
.flatpickr-monthDropdown-months:focus, 
.year-dropdown-custom:focus,
.cur-year:focus {
    background-color: #043270 !important;
    color: #fff !important;
    outline: none !important;
}

/* 8. Weekdays & Days */
span.flatpickr-weekday {
    background: #043270 !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 10px 0 !important;
}

.flatpickr-day.selected {
    background: #043270 !important;
    border-color: #043270 !important;
}
