/* ================================
   Formations Filter Styles
   ================================ */

/* Filter Widgets */
.filter-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-widget:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-widget .widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4a460;
}

.filter-widget .widget-title i {
    margin-right: 8px;
    color: #f4a460;
}

.filter-widget .widget-body {
    padding: 15px;
}

/* Checkbox and Radio Items */
.checkbox-item,
.radio-item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.checkbox-item:last-child,
.radio-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.checkbox-item label,
.radio-item label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 400;
    color: #555;
    transition: color 0.2s ease;
}

.checkbox-item label:hover,
.radio-item label:hover {
    color: #f4a460;
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"],
.radio-item input[type="checkbox"],
.radio-item input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #f4a460;
}

.checkbox-item span,
.radio-item span {
    flex: 1;
}

/* Search Input */
#search-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px 12px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

#search-input:focus {
    border-color: #f4a460;
    box-shadow: 0 0 5px rgba(244, 164, 96, 0.3);
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-item:hover {
    background: #e8e8e8;
    border-color: #bbb;
    color: #333;
}

.tag-item.active {
    background: #f4a460;
    color: #fff;
    border-color: #f4a460;
}

/* Results Info */
.results-info {
    border-left: 4px solid #f4a460;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-info h5 {
    margin: 0;
    color: #333;
    font-size: 14px;
}

#count-formations {
    font-weight: bold;
    color: #f4a460;
    font-size: 16px;
}

/* Reset Button */
#reset-filters {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    padding: 8px 12px;
    font-size: 12px;
    transition: all 0.2s ease;
}

#reset-filters:hover {
    background: #f4a460;
    border-color: #f4a460;
    color: #fff;
}

/* Formation Items */
.formation-item {
    transition: all 0.3s ease;
    opacity: 1;
}

.formation-item.hidden {
    display: none;
}

.formation-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.formation-search-text {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* Statistics Widget */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stat-label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.stat-value {
    color: #f4a460;
    font-weight: 600;
}

/* No Results Message */
#no-results {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
}

#no-results i {
    color: #bbb;
}

#no-results h4 {
    color: #666;
    font-size: 18px;
    margin: 15px 0 10px 0;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.filter-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f5f5f5;
    border-radius: 50%;
    border-top: 3px solid #f4a460;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Active Filter Indicator */
.active-filters {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #e8f4f8;
    border-left: 3px solid #00bcd4;
    border-radius: 2px;
}

.active-filters h6 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

.active-filter-tag {
    display: inline-block;
    margin: 2px 3px 2px 0;
    padding: 4px 10px;
    background: #00bcd4;
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
}

.active-filter-tag .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-widget {
        margin-bottom: 20px;
    }

    .filter-tags {
        flex-direction: column;
    }

    .tag-item {
        width: 100%;
        text-align: center;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-info .col-sm-4 {
        width: 100%;
        margin-top: 10px;
    }

    #reset-filters {
        width: 100%;
    }
}

/* Animation for filter transitions */
.formation-item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
.checkbox-item input:focus,
.radio-item input:focus,
#search-input:focus,
.tag-item:focus {
    outline: 2px solid #f4a460;
    outline-offset: 2px;
}
