﻿/* Visual dropdown */
#autocomplete-menu {
    width: min(400px, calc(100vw - 32px));
    max-width: 100%;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

    /* Set default text color */
    #autocomplete-menu .dropdown-item {
        color: #000; /* black text */
    }

        /* Optional: keep black text on hover/active */
        #autocomplete-menu .dropdown-item:hover,
        #autocomplete-menu .dropdown-item.active {
            color: #000; /* black text on hover/active */
            background-color: #f0f0f0; /* light gray background for hover */
        }

/*.dropdown-item:hover,
.dropdown-item.active {
    background-color: #f0f0f0;
}*/

.sharebtn .dropdown-item:hover,
.sharebtn .dropdown-item:focus,
.sharebtn .dropdown-item:focus-visible,
.sharebtn .dropdown-item.active {
    background-color: #0a58ca;
    color: #fff;
}

.sharebtn .dropdown-item:hover img,
.sharebtn .dropdown-item:focus img,
.sharebtn .dropdown-item:focus-visible img,
.sharebtn .dropdown-item.active img {
    filter: brightness(0) invert(1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.autocomplete-container {
    position: relative;
}
.autocomplete {
    position: absolute;
    z-index: 99;
    /* At least as wide as the field, wider for long job titles, never wider than the screen. */
    width: max-content;
    min-width: 100%;
    max-width: min(520px, calc(100vw - 32px));
    font-size: 1rem;
    line-height: 1.4;
    max-height: min(340px, 50vh);
    overflow-y: auto;
    background: #fff;
    /*border: 1px solid #ddd;*/
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

    .autocomplete > div {
        padding: 10px 12px;
        font-size: 1rem;
        white-space: normal;
        overflow-wrap: anywhere;
        cursor: pointer;
        background: #fff;
        border-bottom: 1px solid #eee;
    }

        .autocomplete > div:hover,
        .autocomplete > div.active {
            background-color: #0c61e7;
            color: #fff;
        }

        .autocomplete > div:last-child {
            border-bottom: none;
        }
/* Visual dropdown */
/* end ported block */

/* Phones: stay exactly as wide as the search field so the list is never pushed past the screen edge. */
@media (max-width: 767.98px) {
    .autocomplete {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}
