/* ==========================================================================
   Gallery Filter Bar Styles
   ========================================================================== */

/* Gallery header layout for title + filter */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.gallery-title-section {
    flex: 1;
    min-width: 0;
}

.gallery-title-section h2 {
    margin-top: 0;
}

#gallery-filter-mount {
    flex-shrink: 0;
}

.gallery-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.filter-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover:not(.disabled) {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--link-color);
    border-color: var(--link-color);
    color: var(--bg-primary);
}

.filter-btn.active:hover {
    background: var(--link-hover);
    border-color: var(--link-hover);
}

.filter-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.filter-label {
    font-weight: 500;
    display: none; /* Hide labels for compact view */
}

/* Show labels on hover for better UX */
.filter-btn:hover .filter-label {
    display: inline;
}

.filter-count {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 2px;
    font-weight: 600;
}

.filter-btn.active .filter-count {
    opacity: 1;
}


/* Desktop - show labels on larger screens */
@media (min-width: 1200px) {
    .filter-label {
        display: inline;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .gallery-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    #gallery-filter-mount {
        width: 100%;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    .gallery-filter-bar {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filter-buttons {
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .filter-icon {
        font-size: 0.8rem;
    }
    
    .filter-count {
        font-size: 0.7rem;
    }
}