/* Active Filters Styles */
.active-filters-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    transition: all 0.3s ease;
}

.active-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.active-filters-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.clear-all-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-all-filters:hover {
    background: #c82333;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    background: #007cba;
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    transition: all 0.2s ease;
}

.active-filter-tag:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.active-filter-remove {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.active-filter-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Different colors for different filter types */
.active-filter-tag.filter-language {
    background: #28a745;
}

.active-filter-tag.filter-language:hover {
    background: #1e7e34;
}

.active-filter-tag.filter-status {
    background: #ffc107;
    color: #212529;
}

.active-filter-tag.filter-status:hover {
    background: #e0a800;
}

.active-filter-tag.filter-country {
    background: #6f42c1;
}

.active-filter-tag.filter-country:hover {
    background: #5a32a3;
}

.active-filter-tag.filter-search {
    background: #17a2b8;
}

.active-filter-tag.filter-search:hover {
    background: #138496;
}

/* Animation for adding/removing filters */
.active-filter-tag {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.active-filter-tag.removing {
    animation: fadeOutScale 0.2s ease forwards;
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Filters dropdown styles */
.filters-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    margin-top: 4px;
}

.filters-dropdown.hidden {
    display: none;
}

.filters-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Use same classes as Popular Tags */
.tags-dropdown.hidden {
    display: none;
}

.tags-dropdown.show {
    display: block !important;
}

.filters-dropdown-content {
    max-height: 200px;
    overflow-y: auto;
}

/* Selected Filters Section */
.selected-filters-section {
    position: relative !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .active-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .active-filter-tag {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* Additional Selected Filters Dropdown Content */
.filters-dropdown-content {
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* More specific rule for selected filters dropdown */
.selected-filters-section .filters-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
}

/* Selected Filters Dropdown - simple approach like Popular Tags */
#selected-filters-dropdown {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #2A2428;
	border: 0px solid #2A2428;
	border-radius: 10px;
	box-shadow: 0 0 0 0;
	z-index: 9999;
	margin-top: 0;
	transform: translateY(13px) translateX(20px);
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.2s, opacity 0.2s;
}

#selected-filters-dropdown.show {
    visibility: visible;
    opacity: 1;
}