.lgaf-relation__wrap {
    position: relative;
}
.lgaf-relation__menu {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #111;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 9999;
    left: 0;
    right: 0;                 /* span the input instead of calc(100% - 32px) */
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    border-radius: 6px;
}
/* The [hidden] attribute is what your JS toggles — respect it. */
.lgaf-relation__menu[hidden] {
    display: none;
}
.lgaf-relation__menu li {
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    line-height: 1.5;
}
.lgaf-relation__menu li:last-child {
    border-bottom: 0;         /* no divider under the final row */
}
.lgaf-relation__menu li:hover,
.lgaf-relation__menu li:focus {
    background: #f0f0f0;
}