/* TuttoCapsule archive filter buttons + sort dropdown.
 * Extracted from "Code Snippets" snippet #8.
 */

.filtro-custom-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: 180px;
    margin-right: 30px;
    margin-bottom: 15px;
}

.btn-filtro-custom {
    display: block;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 30px;
    text-decoration: none;
    color: #555;
    text-align: center;
    font-size: 13px;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    line-height: 1.4;
}

.btn-filtro-custom.filter-active {
    background-color: #B64E2B;
    color: #fff !important;
    border: 2px solid #222;
    font-weight: bold;
}

.btn-filtro-custom:hover:not(.filter-active) {
    background-color: #f9f9f9;
    border-color: #999;
    color: #333;
}

.custom-ordering-form {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.custom-ordering-select {
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid #ccc;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    width: 100%;
    max-width: 250px;
}

@media (max-width: 767px) {
    .filtro-custom-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .filtro-custom-wrapper::-webkit-scrollbar {
        display: none;
    }
    .btn-filtro-custom {
        flex: 0 0 auto;
        padding: 6px 16px;
        font-size: 13px;
        display: inline-block;
        white-space: nowrap;
    }
    .custom-ordering-select {
        width: 60%;
        max-width: none;
    }
}
