/* Modern Filter Styles for AixFlow Plugin */

.filter-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-select {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.filter-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.filter-select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    max-width: 140px;
}

.filter-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.filter-btn:hover:before {
    left: 100%;
}

.filter-btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.filter-btn-primary:hover {
    background: linear-gradient(135deg, #3d8bfe 0%, #00d4fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.filter-btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.filter-btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.filter-btn-success:hover {
    background: linear-gradient(135deg, #4a9629 0%, #96d4c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.filter-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading state */
.filter-btn.loading {
    position: relative;
    color: transparent;
}

.filter-btn.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .filter-container {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .filter-title {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .filter-container {
        padding: 12px;
        border-radius: 8px;
    }
    
    .filter-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .filter-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        max-width: none;
        flex: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .filter-select {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .filter-select:focus {
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    }
    
    .filter-select:hover {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Animation for form appearance */
.filter-container {
    animation: slideInDown 0.6s ease-out;
}

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

/* Subtle pulse animation for active filters */
.filter-group.active .filter-select {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(79, 172, 254, 0.1);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}
