/* Container for the dropdown */
.custom-dropdown {
    position: relative;
    display: inline-block;
    float: right; /* Aligns the dropdown to the right */
}

/* The main button for language selection */
#selectedLanguage {
    background-color: #383838;
    color: #fff;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    outline: none;
    box-shadow: none;
    white-space: nowrap; /* Prevent line breaks */
}

/* Flag in the button */
#selectedLanguage img {
    width: 20px;
    height: 15px;
    margin-right: 10px;
}

/* Arrow on the right side inside the button */
#selectedLanguage .arrow {
    margin-left: auto;
}

/* The dropdown menu itself */
.lang-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    min-width: 240px; /* Increased width to avoid wrapping */
    white-space: nowrap; /* Prevent line breaks in menu items */
    background-color: #383838;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 100;
}

/* Individual list items */
.lang-dropdown-menu li {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    color: #fff;
}

/* Hover state */
.lang-dropdown-menu li:hover {
    background-color: #5b79a1;
}

/* Selected language in dropdown: bold + checkmark on same line */
.lang-dropdown-menu li.selected-language span {
    font-weight: bold;
}

/* Flag images in dropdown items */
.lang-dropdown-menu li img {
    width: 20px;
    height: 15px;
    margin-right: 10px;
}

/* Make the dropdown visible when triggered */
.lang-dropdown-menu.show {
    display: block;
}
