/* Custom Date Picker Styles */
.date-input-wrapper {
    position: relative;
    width: 100%;
}

.date-input-display {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* padding: 10px 15px; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 45px;
    transition: border-color 0.2s ease;
}

.date-input-display:hover {
    border-color: #007bff;
}

.date-text {
    color: #666;
    font-size: 14px;
}

.date-picker-popup {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    min-width: 300px;
}

.date-picker-popup.show {
    display: block;
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.date-picker-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    color: #007bff;
    transition: background-color 0.2s ease;
}

.date-picker-nav:hover {
    background: #e9ecef;
}

.date-picker-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.date-picker-months {
    display: flex;
    padding: 15px;
    gap: 20px;
}

.calendar-month {
    flex: 1;
    min-width: 250px;
}

.calendar-month-header {
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 5px;
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    text-align: center;
    padding: 8px 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    background: #e3f2fd;
    border-color: #2196f3;
}

.calendar-day.today {
    background: #2196f3;
    color: white;
    font-weight: 600;
}

.calendar-day.selected {
    background: #ff9800;
    color: white;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.calendar-day.in-range {
    background: #fff3e0;
    color: #ff9800;
    border-color: #ff9800;
}

.form-field-icon {
    position: relative;
}

.form-field-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
    pointer-events: none;
}

/* Modal overlay for mobile */
.date-picker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.date-picker-overlay.show {
    /* display: block; */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .date-picker-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 95vw !important;
        max-width: 380px !important;
        max-height: 85vh !important;
        overflow-y: auto;
        margin-top: 0 !important;
        z-index: 1001;
    }

    .date-picker-months {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    .calendar-month {
        min-width: auto;
        width: 100%;
    }

    /* Hide second month on mobile */
    .calendar-month:last-child {
        display: none;
    }

    .date-picker-header {
        padding: 10px;
    }

    .date-picker-title {
        font-size: 13px;
    }

    .calendar-day {
        padding: 10px 4px;
        font-size: 13px;
    }

    .calendar-weekday {
        font-size: 11px;
        padding: 4px;
    }

    .date-picker-nav {
        padding: 5px 12px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .date-picker-popup {
        width: 98vw !important;
        max-width: none !important;
    }

    .calendar-day {
        padding: 8px 2px;
        font-size: 12px;
    }

    .calendar-weekday {
        font-size: 10px;
        padding: 3px;
    }

    .date-picker-nav {
        padding: 3px 10px;
        font-size: 18px;
    }

    .calendar-month-header {
        font-size: 13px;
    }
}

/* Prevent body scroll when datepicker is open on mobile */
@media (max-width: 768px) {
    body.datepicker-open {
        overflow: hidden;
    }
}
