/* Container for the dropdown/list */
.dropdown {
    position: relative;
    width: 200px;
    font-family: Arial, sans-serif;
}

/* Selected item display (for dropdown) */
.dropdown-selected {
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dropdown list */
.dropdown-menu {
    list-style: none;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--basic-Crimson-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    z-index: 1;
    border-radius: 0.8125rem;
}

/* Show dropdown on hover or focus (for <800px) */
/*.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    max-height: 400px;
    overflow-y: hidden;
}*/

.open .dropdown-menu{
    max-height: 400px;
    overflow-y: hidden;
}
.open .dropdown-selected::after {
    transform: rotate(180deg);
}

/* Style for each li item */
.dropdown-menu li {

    font-family: 'Inter Light 18pt';
    font-weight: 600;
    font-size: 0.875rem;
    leading-trim: Cap height;
    line-height: 125%;
    letter-spacing: 0%;
    vertical-align: bottom;
    text-transform: uppercase;
    color: var( --basic-black2-color);
    padding: 1.125rem 1.56rem;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: 0.3s ease;

}

.dropdown-menu li:hover {
    color:var( --basic-Crimson-color);
    transition: 0.3s ease;
}

/* Arrow for dropdown */
.dropdown-selected::after {
    content:  url("data:image/svg+xml,%3Csvg width='13' height='8' viewBox='0 0 13 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.07141 1.00012L5.99992 6.07088L11.0713 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    transform: rotate(0deg);
    font-size: 12px;
    transition: transform 0.3s ease;
}



.wrap-arrow-r {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    cursor: pointer;
    font-size: 12px;
    z-index: 2;
    user-select: none;
    right: 0;
}
.wrap-arrow-r .item-arrow{
    display: flex;
}
.wrap-arrow-r .item-arrow:nth-child(2){
    background-color: #fff;

    height: 54px;
    width: 54px;
    align-items: center;
    justify-content: center;


}
.wrap-arrow-r .item-arrow:nth-child(1){
    width: 54px;
    height: 54px;
    background-color: #fff;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}



.wrap-arrow-l {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    cursor: pointer;
    font-size: 12px;
    z-index: 2;
    user-select: none;
    left: 0;
}
.wrap-arrow-l .item-arrow{
    display: flex;
}
.wrap-arrow-l .item-arrow:nth-child(1){
    background-color: #fff;

    height: 54px;
    width: 54px;
    align-items: center;
    justify-content: center;


}
.wrap-arrow-l .item-arrow:nth-child(2){
    width: 54px;
    height: 54px;
    background-color: #fff;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

/* Media query for screens 800px and wider */
@media (min-width: 767px) {
    .dropdown {
        width: 100%;
        overflow: hidden; /* Hide items outside visible area */
    }

    .dropdown-selected {
        display: none; /* Hide the selected item */
    }

    .dropdown-menu {
        position: static; /* Remove absolute positioning */
        max-height: none; /* Always visible */
        border: none; /* Remove border */
        display: flex; /* Display items in a row */
        background-color: transparent; /* No background */
        transition: none; /* Disable max-height transition */
    }

    .dropdown-menu li {

        white-space: nowrap; /* Prevent text wrapping */


    }

    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        max-height: none; /* Ensure no height restriction */
    }

    .dropdown-selected::after {
        content: none; /* Remove arrow */
    }
}

/* Media query for screens between 800px and 900px */
@media (min-width: 767px) and (max-width: 1439px) {
    .dropdown {
        max-width: 100%; /* Ensure container doesn't exceed viewport */
        position: relative; /* For positioning arrows */
        overflow: hidden; /* Hide items outside visible area */
    }

    .dropdown-menu {
        width: max-content; /* Allow full width of content */
        overflow: visible; /* Prevent clipping of items */
        white-space: nowrap; /* Keep items in a single row */
        flex-wrap: nowrap; /* Prevent wrapping */
        transform: translateX(0); /* Initial position */
        transition: transform 0.3s ease; /* Smooth sliding */
    }

    /* Arrow buttons */
    .arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: var(--basic-gray-color);
        padding: 7px 10px;
        cursor: pointer;
        font-size: 12px;
        z-index: 2;
        user-select: none;

    }

    .arrow-left {
        left: 0;

    }
    .arrow-left svg{
        transform: rotate(180deg);
    }

    .arrow-right {
        right: 0;
    }

    /* .arrow:hover {
         background-color: #f0f0f0;
     }*/

    /* Hide arrows by default */
    .arrow {
        display: none;
    }

    /* Show arrows when needed (controlled by JS) */
    .dropdown.overflow .arrow {
        display: flex;
    }
}

@media (max-width: 767px) {
    .dropdown {
        width: 100%; /* Ensure container doesn't exceed viewport */
    }
    .dropdown-selected{
        height: 2.6875rem;
        width: 100%;
        font-weight: 600;
        font-size: 0.75rem;
        leading-trim: Cap height;
        line-height: 0.9375rem;
        letter-spacing: 0%;
        font-family: 'Inter Light 18pt';
        font-weight: 600;
        background: var(--basic-Graphite-color);
        width: var(--_office_list_width);
        border-radius: 0.8125rem;
        color: #fff;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        padding: 1.4375rem;
        position: relative;
        cursor: pointer;
    }
    .open .dropdown-menu{
        display: block;
    }
    .dropdown-menu {
        margin-top: 15px;
        padding: 17px 15px;
        display: none;
    }
    .dropdown-menu li{
        border-radius: 0!important;
        color: var( --basic-white-color);
    }

    .dropdown-menu li:hover {
        color:var(--basic-white-color);
        background: var(--basic-Crimson2-color);
        transition: 0.5s ease;
    }

    .dropdown-menu li.selected {
        color: var(--basic-white-color);
        background: var(--basic-Crimson2-color);
    }
}