/* Progressive Filter Panel Styles */
/* Enhanced category display with two-tier system */

.progressive-filter-container {
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.progressive-filter-container.collapsed {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Category Search */
.category-search-wrapper {
    margin-bottom: 16px;
}

.category-search {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.category-search:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.category-search i {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 8px;
    font-size: 14px;
}

.category-filter-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.category-filter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clear-search {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: #fff;
}

/* Trending Categories Pills */
.quick-categories {
    margin-bottom: 16px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    display: block;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    outline: none;
}

.pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pill.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: #4a9eff;
    color: #4a9eff;
}

.pill-count {
    font-size: 11px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

.more-btn {
    background: transparent;
    border-style: dashed;
}

/* Sort Options */
.sort-options {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sort-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

.sort-btn.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: #4a9eff;
    color: #4a9eff;
}

.sort-btn i {
    font-size: 12px;
}

/* Progressive Categories */
.progressive-categories {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 8px;
}

.progressive-categories::-webkit-scrollbar {
    width: 6px;
}

.progressive-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.progressive-categories::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.progressive-categories::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Category Groups */
.category-group {
    margin-bottom: 8px;
}

.category-group:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.category-group-header {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    user-select: none;
}

.category-group-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.expand-icon {
    font-size: 10px;
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.5);
}

.category-group-icon {
    font-size: 16px;
    margin-right: 8px;
}

.category-group-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #fff;
}

.category-group-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Category Children */
.category-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-children.expanded {
    max-height: 500px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 32px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 13px;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.category-item.selected {
    background: rgba(74, 158, 255, 0.1);
}

.category-checkbox {
    margin-right: 8px;
    cursor: pointer;
}

.trending-badge {
    font-size: 11px;
    margin-right: 4px;
}

.category-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
}

.category-item.selected .category-name {
    color: #4a9eff;
}

.category-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.category-item.popular .category-name {
    font-weight: 500;
}

/* View All Categories Button */
.view-all-categories-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-all-categories-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Floating Filter Button */
.floating-filter-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.floating-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.active-filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progressive-categories {
        max-height: 300px;
    }

    .sort-options {
        flex-direction: column;
    }

    .sort-btn {
        width: 100%;
    }

    .category-pills {
        justify-content: flex-start;
    }

    .floating-filter-btn {
        bottom: 70px; /* Account for mobile navigation */
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .progressive-filter-container {
        background: rgba(255, 255, 255, 0.95);
    }

    .category-filter-input,
    .category-group-name,
    .category-name {
        color: #1a1a1a;
    }

    .category-search {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .pill,
    .sort-btn,
    .view-all-categories-btn {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
        color: #1a1a1a;
    }
}