/* Styles for language filters in the search bar */
.search-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.search-input-container input[type="text"] {
    flex: 1;
    padding-right: 90px;
}

.language-filters {
    position: absolute;
    left: 0px;
    display: flex;
    gap: 1px;
    z-index: 10; /* Ensure it stays above other elements */
    border-radius: 20px;
    border: 1px solid rgba(155, 155, 155, 0.2);
    margin-top: -3px;
}

.language-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    margin: 3px;
    cursor: pointer;
}

.language-options {    
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    margin: 0;
    top: 5px;
    border-radius: 20px;
    border: 1px solid rgba(155, 155, 155, 0.2);
    float: right;
}
.language-options label {
    margin-bottom: 0;
}

.language-option:hover {
    opacity: 1;
}

.language-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.language-option img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    transform-origin: center;
}

/* Style when checkbox is checked */
.language-option input[type="checkbox"]:checked + img {
    opacity: 1;
}

/* Style when checkbox is not checked */
.language-option input[type="checkbox"]:not(:checked) + img {
    opacity: 0.3;
}

/* Add indicator for selected language */
.language-option input[type="checkbox"]:checked + img::after {

    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateX(-50%);
}

.language-badge {    
    float: right;
    margin: 0 5px 0 -8px;
}

.categories .language-badge {
    margin: 0;
}

.categories ul.category-listing {
    display: inline-block;
}

.category-listing li {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

.language-badge img {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.language-badge.pt-br {
    border: 1px solid #008837;
}

.language-badge.eng {
    border: 1px solid #00247d;
}

/* Style for the flags in search results */
.badge-flag {
    width: 16px !important;
    height: 16px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {

    .language-badge {    
        position: absolute;
        top: -38px;
        right: 0;
    }
    .language-option img {
        width: 26px;
        height: 26px;
    }
    
    /* Further adjust in mobile to avoid overlap */
    .language-filters {
        right: 50px;
    }
    
    .badge-flag {
        width: 10px;
        height: 7px;
    }
    
    /* Specific selector for mobile */
    #search-bar .container ul li a img.badge-flag,
    #search-bar .container ul li a img:not(:first-child) {
        width: 10px !important;
        height: 7px !important;
    }
}