.filter-global-block {
    display: none;
    flex-direction: column;
    background: white;
    width: 510px;
    padding: 20px;
    position: absolute;
    right: 0;
    top: 84px;
    z-index: 1;
    gap: 20px;
    box-shadow: 0px 21px 19px -1px rgba(0, 0, 0, 0.12);
}

.filter-global-block.active {
    display: flex;
}

.filter-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-title {
    color: var(--violet-text-color);
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
}

.filter-variant-block {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-variant input[type="checkbox"] {
    display: none;
}

.filter-variant.hide {
    display: none;
}

.show-all-button {
    display: flex;
    align-items: center;
    color: var(--orange-text-color);
    cursor: pointer;
    user-select: none;
    justify-content: center;
    padding: 0 10px;
    height: 28px;
    width: max-content;
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
}

.filter-variant input[type="number"] {
    padding: 12px 10px;
    height: 46px;
    background: var(--gray2-color);
    border: none;
}

.filter-variant input[type="number"]::placeholder {
    color: var(--gray7-text-color);
    font-size: 16px;
    line-height: 140%;
}

.filter-variant label {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    height: 28px;
    width: max-content;
    color: var(--gray6-text-color);
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
    background: var(--gray2-color);
    border-radius: 100px;
    cursor: pointer;
    user-select: none;
}

.filter-variant.price {
    width: calc(50% - 4px);
}

input[type="checkbox"]:checked + label {
    color: white;
    background: var(--violet-color);
}


input[type="number"] {
    appearance: textfield;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    width: 100%;
}

.filter-title-block {
    display: flex;
    justify-content: space-between;
    height: 24px;
}

.filter-count {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    background: var(--violet-color);
    border-radius: 28px;
    color: var(--white-text-color);
    line-height: 140%;
    user-select: none;
}

.o-button.filter-apply {
    width: 100%;
}

.o-button.show-filter {
    height: 44px;
    border-radius: 0;
    align-items: center;
    user-select: none;
}

.show-filter-block {
    padding: 20px 20px 20px 0;
    background: white;
}

.show-filter.active {
    color: var(--white-text-color);
    background: var(--violet-color);
}

.total-count {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 24px;
    color: var(--orange-text-color);
    margin-left: 10px;
}

.show-filter.active .total-count {
    color: var(--violet-text-color);
}

.filter-button-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
}

.filter-button-block.active {
    position: sticky;
    bottom: 0;
}

.clear-count {
    display: flex;
    cursor: pointer;
    align-items: center;
}

.clear-count:hover .clear-filter-block.hide {
    display: block;
}

.clear-filter-block.hide {
    display: none;
}

.clear-filter-block {
    padding-right: 5px;
}

@media (max-width: 780px) {
    .show-filter-block {
        padding: 0;
        background: none;
    }

    .filter-global-block {
        width: 100%;
        top: 128px;
    }

    .clear-filter-block.hide {
        display: flex;
    }
}