/* Modern Calendar Popup Styles */

.date-picker-wrapper {
    position: relative;
    width: 100%;
}

.date-picker-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.date-picker-input:hover {
    border-color: #ff6600;
}

.date-picker-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.date-picker-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 18px;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1000;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    min-width: 320px;
    display: none;
    animation: fadeInUp 0.3s ease;
}

.calendar-popup.active {
    display: block;
}

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

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.calendar-nav-btn {
    background: #f8f9fa;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    font-size: 14px;
}

.calendar-nav-btn:hover {
    background: #e9ecef;
    color: #ff6600;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: #adb5bd;
    cursor: default;
}

.calendar-day.other-month:hover {
    background: transparent;
}

.calendar-day.today {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 700;
}

.calendar-day.selected {
    background: #ff6600;
    color: #ffffff;
    font-weight: 700;
}

.calendar-day.selected-start {
    background: #ff6600;
    color: #ffffff;
    border-radius: 8px 0 0 8px;
}

.calendar-day.selected-end {
    background: #ff6600;
    color: #ffffff;
    border-radius: 0 8px 8px 0;
}

.calendar-day.in-range {
    background: #fff3e0;
    color: #ff6600;
    border-radius: 0;
}

.calendar-day.disabled {
    color: #dee2e6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.disabled:hover {
    background: #f8f9fa;
}

.calendar-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.calendar-clear-btn {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.calendar-clear-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.calendar-apply-btn {
    padding: 8px 16px;
    background: #ff6600;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    flex: 1;
}

.calendar-apply-btn:hover {
    background: #e55a00;
}

.calendar-apply-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
    .calendar-popup {
        left: 50%;
        transform: translateX(-50%);
        min-width: 280px;
        padding: 20px;
    }
    
    .calendar-day {
        font-size: 13px;
    }
}

/* Overlay to close calendar */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
    display: none;
}

.calendar-overlay.active {
    display: block;
}

