/* Full Container */
.mt-btn-dropdown-container {
    position: relative;
    width: 100%;
}

.mt-btn-dropdown {
    display: flex;
    align-items: center;
    font-family: 'Roboto Slab';
    font-size: 16px;
    color: var(--SecondaryText);
    border: 1px solid #efefef;
    border-radius: 12px;
    box-shadow: 3px 3px 6px 0 rgba(0, 0, 0, 0.16);
    cursor: pointer;
    padding: 0px 16px;
    width: 100%;
    height: 40px;
    appearance: none;
    background-color: var(--White);
    background-image: url('/static/images/mt-icons/mt-chevron-down.png');
    background-repeat: no-repeat;
    background-position: right 19px center;
    background-size: 16px 9px;
    margin-bottom: 0px;
}

.mt-btn-dropdown.open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-image: url('/static/images/mt-icons/mt-chevron-up.png');
    box-shadow: 0px 4px 6px rgba(0,0,0,0.16);
    font-weight: 700;
}

.mt-dropdown-options {
    display: none;
    position: absolute;
    top: 41px;
    left: 0;
    width: 100%;
    background-color: var(--White);
    border: 1px solid #efefef;
    border-top: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.16);
    flex-direction: column;
    border-radius: 0px 0px 12px 12px;
    padding: 0px !important;
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--TertiaryText);
}

.mt-dropdown-options.has-search {
    max-height: 288px; /* Increased max-height if search bar is present */
}

.mt-btn-dropdown.has-selection::before {
    content: none !important;
}


/* Individual Options */
.mt-dropdown-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #efefef;
}

.mt-dropdown-options .mt-dropdown-option:first-child {
    border-top: none;
}

.mt-dropdown-option label {
    font-weight: 400;
    font-size: 16px;
    color: var(--SecondaryText);
    font-family: "Roboto Slab";
    margin-bottom: 0px;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 8px 16px;
    transition: background-color 0.2s ease;
}

.mt-dropdown-option input[type="radio"]:checked + label {
    color: var(--Primary);
}

.mt-dropdown-option label:hover {
    background-color: var(--WhiteDark);
}

.mt-dropdown-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mt-dropdown-option input[type="radio"] {
    display: none;
}

.mt-dropdown-option input[type="radio"] + label::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
}

.mt-dropdown-option input[type="radio"]:checked + label::before {
    background-color: var(--White);
    background-image: url('/static/images/mt-icons/mt-checked.png');
    background-size: 18px 15px;
    width: 20px;
    background-repeat: no-repeat;
    background-position: center;
}


/* Search Bar */
.mt-dropdown-search {
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    background-color: var(--White);
    box-shadow: 0px 1px 4px 0px rgba(0,0,0,0.18);
}

.mt-dropdown-search input {
    width: 100%;
    border: none;
    font-family: "Roboto Slab";
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.24);
    background-color: #f5f6fa;
    color: #707070;
}

.mt-dropdown-search .search-icon {
    position: absolute;
    right: 20px;
    font-size: 20px;
    color: var(--SecondaryText);
}


/* Scrollbar */
.mt-dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.mt-dropdown-options::-webkit-scrollbar-track {
    background: var(--White);
}

.mt-dropdown-options::-webkit-scrollbar-thumb {
    background-color: var(--TertiaryText);
    border-radius: 4px;
    border: 2px solid var(--White);
}