/* Program Search - Clean Modern Design */

.program-search-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-search-form:hover {
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-input-field {
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fafbfc;
    width: 100%;
    color: #1e293b;
}

.search-input-field:hover {
    background: #ffffff;
    border-color: #e2e8f0;
}

.search-input-field:focus {
    border-color: var(--primary-color, #3498db);
    box-shadow: 
        0 0 0 4px rgba(52, 152, 219, 0.08),
        0 2px 8px rgba(52, 152, 219, 0.12);
    outline: none;
    background: #ffffff;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--primary-color, #3498db);
    transform: translateY(-50%) scale(1.1);
}

.search-input-field::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Filter Select Wrapper */
.filter-select-wrapper {
    position: relative;
    width: 100%;
}

.filter-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.filter-select {
    padding: 1rem 3rem 1rem 3.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2394a3b8' d='M11.293 4.293L7 8.586 2.707 4.293A1 1 0 001.293 5.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
}

.filter-select:hover {
    background: #ffffff;
    border-color: #e2e8f0;
}

.filter-select:focus {
    border-color: var(--primary-color, #3498db);
    box-shadow: 
        0 0 0 4px rgba(52, 152, 219, 0.08),
        0 2px 8px rgba(52, 152, 219, 0.12);
    outline: none;
    background: #ffffff;
}

.filter-select-wrapper:focus-within .filter-icon,
.filter-select-wrapper:hover .filter-icon {
    color: var(--primary-color, #3498db);
    transform: translateY(-50%) scale(1.1);
}

/* Select options styling */
.filter-select option {
    background: #ffffff;
    color: #1e293b;
    padding: 0.75rem;
}

/* Active Filter Indicator */
.filter-select:not([value=""]):valid {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.04), rgba(52, 152, 219, 0.02));
    border-color: var(--primary-color, #3498db);
    color: var(--primary-color, #3498db);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 767px) {
    .program-search-form {
        padding: 1.5rem;
        border-radius: 18px;
    }
    
    .search-input-field,
    .filter-select {
        font-size: 0.9rem;
        padding: 0.875rem 2.5rem 0.875rem 3rem;
        border-radius: 14px;
    }
    
    .search-icon,
    .filter-icon {
        left: 1rem;
        font-size: 1rem;
    }
}

/* Loading State */
.htmx-request .program-search-form {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.htmx-request .program-search-form::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-top-color: var(--primary-color, #3498db);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth entrance animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-search-form {
    animation: fadeInUp 0.4s ease-out;
}
