/* Date Range Picker Styles */

/* Date Range Input Styling */
.date-range-container {
    position: relative;
}

.date-range-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
}

.date-range-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.date-range-input::placeholder {
    color: #999;
}

.date-range-input:hover {
    border-color: #007bff;
}

/* Date Range Modal */
.date-range-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.date-range-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.date-range-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-range-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-range-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #333;
    background: #f8f9fa;
}

.date-range-body {
    padding: 20px;
}

.date-input-group {
    margin-bottom: 15px;
}

.date-input-group:last-child {
    margin-bottom: 0;
}

.date-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.modal-date-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.modal-date-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.date-range-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-clear, .btn-apply {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-clear {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-clear:hover {
    background: #e9ecef;
    color: #495057;
}

.btn-apply {
    background: #007bff;
    color: white;
}

.btn-apply:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .date-range-modal-content {
        width: 95%;
        margin: 20px;
    }

    .date-range-header {
        padding: 15px;
    }

    .date-range-header h4 {
        font-size: 16px;
    }

    .date-range-body {
        padding: 15px;
    }

    .modal-date-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }

    .date-range-footer {
        padding: 15px;
        flex-direction: column;
        gap: 8px;
    }

    .btn-clear, .btn-apply {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .date-range-modal-content {
        width: 98%;
        margin: 10px;
    }

    .date-range-header {
        padding: 12px;
    }

    .date-range-body {
        padding: 12px;
    }

    .date-range-footer {
        padding: 12px;
    }
}

/* Integration with existing filter styles */
.search-filter-inner .date-range-container {
    width: 100%;
}

.search-filter-inner .date-range-input {
    height: auto;
    min-height: 45px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .date-range-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }

    .date-range-header {
        border-bottom-color: #4a5568;
    }

    .date-range-header h4 {
        color: #e2e8f0;
    }

    .close-modal {
        color: #a0aec0;
    }

    .close-modal:hover {
        color: #e2e8f0;
        background: #4a5568;
    }

    .date-input-group label {
        color: #e2e8f0;
    }

    .modal-date-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .modal-date-input:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 2px rgba(99, 179, 237, 0.25);
    }

    .date-range-footer {
        border-top-color: #4a5568;
    }

    .btn-clear {
        background: #4a5568;
        color: #a0aec0;
        border-color: #718096;
    }

    .btn-clear:hover {
        background: #2d3748;
        color: #e2e8f0;
    }
}
