/* Контейнер фильтра тем */

.themes-filter {
    margin-top: 1rem;
}


/* Строка поиска и кнопки сброса */

.themes-search-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Обёртка поля поиска */

.themes-search-row .filter-search-wrapper {
    position: relative;
    height: 1.7rem;
    flex: 1;
    min-width: 0;
}


/* Поле поиска тем */

#themes-search-input {
    width: 100%;
    height: 100%;

    border-radius: 8px;
    border: none;
    background-color: #f2f2f2;

    padding: 0 2.4rem 0 var(--questions-control-text-start, 2.2rem);

    font-size: 0.9rem;
    color: #333333;
    caret-color: auto;
}

#themes-search-input::placeholder {
    color: #787979;
}

#themes-search-input:focus,
#themes-search-input:active {
    outline: none;
    box-shadow: none;
}


/* SVG поиска */

.themes-search-row .filter-search-icon {
    position: absolute;
    top: 50%;
    left: var(--questions-control-icon-left, 0.7rem);
    transform: translateY(-50%);

    width: var(--questions-control-icon-size, 1rem);
    height: var(--questions-control-icon-size, 1rem);

    pointer-events: none;
    z-index: 1;
}

.themes-search-row .filter-search-icon circle,
.themes-search-row .filter-search-icon path {
    stroke: #787979;
}


/* Контейнер чипов */

.themes-chips {
    width: 100%;
    margin-top: 1rem;

    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 0.4rem;

    max-height: 12rem;
    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 0.45rem;

    overscroll-behavior: contain;
    scrollbar-gutter: stable;

    scrollbar-width: thin;
    scrollbar-color: #eeeeee transparent;
}


/* Чипы */

.themes-chips .chip {
    background-color: #f2f2f2;
    border-radius: 8px;

    padding: 0.2rem 0.6rem;

    font-size: 0.85rem;
    white-space: nowrap;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    user-select: none;
}

.themes-chips .chip.active {
    background-color: #3b82f6;
    color: #ffffff;
}


/* Скроллбар Chrome, Edge, Safari */

.themes-chips::-webkit-scrollbar {
    width: 6px;
}

.themes-chips::-webkit-scrollbar-track {
    background: transparent;
}

.themes-chips::-webkit-scrollbar-thumb {
    background-color: #f2f2f2;
    border-radius: 999px;
}

.themes-chips::-webkit-scrollbar-thumb:hover {
    background-color: #9298a1;
}

/* ===== RESPONSIVE PASS ===== */
@media (max-width: 600px) {
    .themes-chips .chip {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .themes-chips {
        max-height: 10rem;
    }
}

