/* Custom Flatpickr Light Theme for Rentabilidad V2 */

.flatpickr-light-custom.flatpickr-calendar {
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    width: 320px !important; /* Fixed width for consistency */
    padding: 10px;
}

.flatpickr-light-custom .flatpickr-months {
    padding: 0.5rem 0 1rem 0;
}

.flatpickr-light-custom .flatpickr-month {
    color: #1a1d23;
    fill: #1a1d23;
}

.flatpickr-light-custom .flatpickr-current-month {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1d23;
    padding: 0.25rem 0;
}

.flatpickr-light-custom .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #f1f3f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #1a1d23;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.flatpickr-light-custom .flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: #ffffff;
}

.flatpickr-light-custom .numInputWrapper {
    background: #f1f3f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.25rem;
}

.flatpickr-light-custom .numInputWrapper input.cur-year {
    color: #1a1d23;
    font-weight: 600;
}

.flatpickr-light-custom .flatpickr-weekdays {
    background: transparent;
    margin: 0.5rem 0;
}

.flatpickr-light-custom .flatpickr-weekday {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flatpickr-light-custom .flatpickr-days {
    background: transparent;
}

.flatpickr-light-custom .flatpickr-day {
    color: #1a1d23;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease;
    margin: 2px;
}

.flatpickr-light-custom .flatpickr-day:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1a1d23;
}

.flatpickr-light-custom .flatpickr-day.today {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #2563eb;
    font-weight: 600;
}

.flatpickr-light-custom .flatpickr-day.today:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.flatpickr-light-custom .flatpickr-day.selected {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.flatpickr-light-custom .flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.flatpickr-light-custom .flatpickr-day.prevMonthDay,
.flatpickr-light-custom .flatpickr-day.nextMonthDay {
    color: #c0c5cc;
}

.flatpickr-light-custom .flatpickr-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.flatpickr-light-custom .flatpickr-day.inRange {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    box-shadow: none;
}

/* Navigation Arrows */
.flatpickr-light-custom .flatpickr-prev-month,
.flatpickr-light-custom .flatpickr-next-month {
    fill: #6b7280;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.flatpickr-light-custom .flatpickr-prev-month:hover,
.flatpickr-light-custom .flatpickr-next-month:hover {
    fill: #1a1d23;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
}

.flatpickr-light-custom .flatpickr-prev-month svg,
.flatpickr-light-custom .flatpickr-next-month svg {
    stroke: currentColor;
}

/* Input styling enhancement */
.rentabilidad-v2 .input-minimalist.flatpickr-input {
    cursor: pointer;
}

.rentabilidad-v2 .input-minimalist.flatpickr-input:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(0, 0, 0, 0.02);
}

/* Animation */
.flatpickr-light-custom {
    animation: flatpickrFadeIn 0.2s ease;
}

@keyframes flatpickrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Week numbers (if enabled) */
.flatpickr-light-custom .flatpickr-weekwrapper .flatpickr-weeks {
    box-shadow: none;
}

.flatpickr-light-custom .flatpickr-weekwrapper .flatpickr-weekday {
    color: #9ca3af;
}

.flatpickr-light-custom .flatpickr-weekwrapper span.flatpickr-day {
    color: #9ca3af;
    font-size: 0.75rem;
}
