/* Improved Select Styling for Better Readability */

select.filter-select {
    padding: 12px 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
    backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    min-width: 160px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Custom dropdown arrow */
select.filter-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

select.filter-select:hover {
    border-color: rgba(102, 126, 234, 0.6) !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

select.filter-select:focus {
    outline: none !important;
    border-color: rgba(102, 126, 234, 0.8) !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 8px 25px rgba(102, 126, 234, 0.25) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

.filter-select option {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 12px 16px;
    font-weight: 500;
    border: none;
}

.filter-select option:hover {
    background: #f5f5f5 !important;
    color: #000000 !important;
}

.filter-select option:checked {
    background: #e8e8e8 !important;
    color: #000000 !important;
    font-weight: 600;
}

/* Enhanced filter group styling */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.filter-group label i {
    color: rgba(102, 126, 234, 0.8);
    font-size: 1rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .filter-select {
        min-width: 140px;
        font-size: 0.9rem;
        padding: 10px 14px;
        padding-right: 36px;
    }
    
    .filter-select {
        background-size: 14px;
        background-position: right 10px center;
    }
}

/* Animation for better UX */
@keyframes selectGlow {
    0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3); }
    100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
}

.filter-select:focus {
    animation: selectGlow 2s ease-in-out;
}

/* Additional cross-browser option styling */
.filter-select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.filter-select option:hover,
.filter-select option:focus,
.filter-select option:active {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
}

.filter-select option:checked,
.filter-select option:selected {
    background-color: #e0e0e0 !important;
    color: #000000 !important;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .filter-select {
        border-color: rgba(255, 255, 255, 0.2);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    }
    
    .filter-select option {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
}