/* Customizing the select button */
.ui-selectmenu-button {
    background-color: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 14px;
    cursor: pointer;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    white-space: nowrap; /* Prevent text wrapping */
}

.right-aligned-select .ui-selectmenu-text {
    text-align: right;
    padding-right: 0px;
    margin-right: 0px;
}

.left-aligned-menu .ui-menu-item-wrapper {
    text-align: left;
}

/* .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
  padding: 0px !important;
} */

/* Remove focus and active states background */
.ui-selectmenu-button.ui-state-focus, 
.ui-selectmenu-button.ui-state-active {
    background-color: transparent !important;
    border: none !important;
    color: white !important;
}

/* Adjust width to fit the longest option */
#ks_country_header{
    /* Utilize a hidden container to calculate the width */
    display: inline-block;
    visibility: hidden;
}

/* Remove default arrow in button */
.ui-selectmenu-button .ui-icon {
    display: none;
}

/* No background change on button hover, only text color */
.ui-selectmenu-button:hover {
    background-color: transparent !important;
    border: none !important;
    color: rgb(221, 221, 221) !important; /* darker letter color on hover */
}

/* Customizing the dropdown menu */
.ui-selectmenu-menu {
    max-height: 85vh;
    width: 150px;
    overflow-y: auto;
    border-radius: 4px;
    background-color: rgba(64, 64, 64, 0.8) !important;
    color: white;
    z-index: 999;
    position: fixed !important; /* Change to fixed */
    border: 1px solid white;
    -webkit-overflow-scrolling: touch;
    top: 40px !important; /* Add this to move it down 200px */
}


.ui-selectmenu-menu .ui-menu {
    max-height: 85vh !important; /* Change this to match parent */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 20px;
    padding-bottom: 20px;
}

/* Hide the scrollbars */
.ui-selectmenu-menu::-webkit-scrollbar {
    display: none; /* Webkit browsers */
}

.ui-selectmenu-menu {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Customizing the menu items */
.ui-selectmenu-menu .ui-menu-item-wrapper {
    padding-left: 10px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    line-height: 100%;
}

/* Hover effect for menu items */
/* .ui-selectmenu-menu .ui-menu-item-wrapper:hover {
    background-color: rgb(56, 56, 56)  !important;
    color: white !important;
} */

/* Style for the selected item */
.ui-selectmenu-menu .ui-state-active {
    background-color: rgb(56, 56, 56) !important;
    color: white !important; /* Ensuring text remains white */
}


.ui-menu-item {
    clear: both;
    width: 100%;
    padding: 3px 0;
}

.ui-menu-item-wrapper {
    display: block;
    padding: 5px 10px;
    clear: both;
    font-weight: normal;
    line-height: 1.42857143;
    white-space: nowrap;
}

/* Hover state */
.ui-menu-item:hover,
.ui-menu-item-wrapper:hover {
    background-color: transparent !important;
    color: inherit !important;
}

.ui-menu-item-wrapper.ui-state-active {
    background-color: rgb(56, 56, 56) !important;
    color: white !important;
}

/* Style for selected item */
.ui-selectmenu-text {
    color: white !important;
}

/* Ensure the selected value is visible */
.ui-selectmenu-button .ui-selectmenu-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}