﻿.chip-container {
    /* Use Grid for better overflow handling */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    /* Scroll settings */
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain; /* Prevents scroll chaining to page */

    gap: 12px;
    padding: 10px 0;
    margin-bottom: 1rem;
    /* Ensure it fills the space but doesn't force expansion */
    width: 100%;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

    /* Hide scrollbar */
    .chip-container::-webkit-scrollbar {
        display: none;
    }

.chip-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 8px 16px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--secondary-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    /* Snap alignment */
    scroll-snap-align: start;
    /* Prevent squishing (redundant with grid, but safe) */
    flex-shrink: 0;
}

    .chip:hover {
        background-color: var(--border-color);
        color: var(--primary-text);
    }

    .chip.active {
        background-color: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

.chip-add {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    flex-shrink: 0;
}

