#tag-container-wrapper {
    position: relative;
    overflow: hidden;
    /* Oculta a área fora do contêiner */
}

#tag-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: -15px;
    width: auto;
    height: auto;
    background-color: transparent;
    scrollbar-width: none;
    /* For Firefox */
}

#tag-container::-webkit-scrollbar {
    display: none;
    /* For Chrome, Safari, and Opera */
}


.tag-item { 
    display: inline-block;
    background-color: #fff;
    border: 1px solid #7EB339;
    margin: 5px 0px 5px 0px;
    padding: 12px 20px; /* mais respirado */
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 18px; /* responsivo, reduzido um pouco */
    color: #242424;
    background: #fff;
    flex: 0 0 auto; /* mantém inline no flex */
    width: auto; /* <<< chave */
    min-width: unset; /* remove limite forçado */
}
.tag-item:hover {
    background-color: #fff;
    transform: scale(1.05);
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1;
    opacity: 0.2;
    /* Diminui a opacidade para indicar que não é uma interação principal */
    transition: opacity 0.3s;
}

.scroll-button:hover {
    background-color: #fff;
    opacity: 0.6;
}

#scroll-left {
    left: 0;
    display: none;
    /* Começa oculto */
}

#scroll-right {
    right: 0;
    display: none;
    /* Começa oculto */
}

#selected-filters {
    background-color: #ffffff;
    /* Fundo branco */
    padding: 2px;
    border-radius: 8px;
    /* Bordas arredondadas */
    margin-top: 2px;
    /* Espaço acima dos filtros selecionados */
}

.filter-item {
    margin: 5px 5px 5px 0px;
    padding: 10px 10px 10px 10px;
    background: #F1F1F1;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    transition: background-color .3s;
}

.filter-item:hover {
    background-color: #fff;
}
.filter-item .remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background-color: #242424; /* bolinha preta */
    color: #fff;              /* X branco */
    font-size: 12px;          /* X menor */
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.filter-item .remove-btn::before,
.filter-item .remove-btn::after {
    content: "";
    position: absolute;
    width: 10px;   /* comprimento do traço */
    height: 1.5px; /* espessura fininha */
    background-color: #fff; /* X branco */
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.filter-item .remove-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.filter-item .remove-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.filter-item .filter-item .remove-btn:hover {
    background-color: #fff;
    border-color: #7EB339;
    color: #7EB339;
}

.row-no-reverse {

    display: flex;
    flex-direction: column;
}

.row-reverse {

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Ajustes adicionais para espaçamento e aparência */

@media (min-width: 576px) {
#ordenartag {
        text-align: center;
        width: 300px;
        height: 50px;
        background: #F2F2F2;
        border-radius: 10.66px;
        border: none;
        font-family: 'Montserrat', sans-serif;
        font-size: 18px;
        font-weight: 500;
        color: #242424;
        padding: 0 40px 0 15px;
        appearance: none;
        -moz-appearance: none;
        -webkit-appearance: none;
        outline: none;
        box-sizing: border-box;
        cursor: pointer;
        position: relative;
}

/* seta customizada */
#ordenartag::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #242424; /* cor da seta */
    transform: translateY(-50%);
}
/* seta */
.select-wrapper .select-arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #242424;
    transform: translateY(-50%);
    pointer-events: none;
}

}

@media (max-width: 576px) {
    #row-no-reverse {
        display: flex;
        flex-direction: column-reverse;
    }
}

@media (max-width: 576px) {
    #column-reverse {
        display: flex;
        flex-direction: column-reverse;
    }
}

@media (min-width: 576px) {
    .m-5p {
        margin-top: 10px;
    }
}