/* Event Filters Styling - Matching race-header style */
.filters-section {
    background: linear-gradient(135deg, #0066FF 0%, #00CCFF 100%);
    border-radius: 20px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 102, 255, 0.20), 0 2px 12px rgba(255, 107, 0, 0.15);
}

.filters-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(30deg);
    pointer-events: none;
}

.filters-section form {
    position: relative;
    z-index: 1;
}

/* Search Container */
.event-list-page {
    /* Keep content below fixed navbar across breakpoints */
    padding-top: 6rem;
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

#search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    backdrop-filter: blur(10px);
}

#search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.9);
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

#search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.search-spinner {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.search-spinner .spinner-border {
    color: var(--blue-primary) !important;
}

.search-spinner .visually-hidden {
    color: #333;
}

/* Filter Dropdowns */
.filters-section .form-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filters-section .form-label i {
    color: rgba(255, 255, 255, 0.9);
}

.filters-section .form-select {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0.75rem 2.5rem 0.75rem 0.875rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.filters-section .form-select:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filters-section .form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.9);
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

/* Active Filters Display */
.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.active-filters .fw-bold {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.active-filters .badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.active-filters .badge i {
    color: #333;
}

.active-filters .badge a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    margin-left: 0.25rem;
    transition: background-color 0.2s;
    font-size: 1rem;
    line-height: 1;
    color: #333 !important;
    text-decoration: none;
}

.active-filters .badge a:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

.active-filters .btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.active-filters .btn-outline-secondary:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading Indicator */
#loading-indicator {
    display: none;
}

#loading-indicator.htmx-request {
    display: block;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 300ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Empty State */
.no-results-message {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
}

.no-results-message i {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.no-results-message h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.no-results-message p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.alternative-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.alternative-filters .btn {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-section {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    #search-input {
        padding: 0.75rem 2.5rem 0.75rem 2.5rem;
        font-size: 0.95rem;
    }
    
    .filters-section .form-select {
        font-size: 0.9rem;
        padding: 0.625rem 2.5rem 0.625rem 0.75rem;
    }
    
    .filters-section .form-label {
        font-size: 0.875rem;
    }
    
    .active-filters {
        padding: 0.75rem;
    }
    
    .active-filters .fw-bold {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .event-list-page {
        padding-top: 5.25rem;
    }

    .filters-section {
        padding: 1.5rem 1rem;
        border-radius: 14px;
    }
    
    .search-container {
        margin-bottom: 1rem;
    }
    
    #search-input {
        padding: 0.625rem 2rem 0.625rem 2.5rem;
        font-size: 0.875rem;
    }
    
    .filters-section .form-label {
        font-size: 0.85rem;
    }
    
    .filters-section .form-select {
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.625rem;
    }
}
