/*
 * psiformcrm — searchable select (v2.9.89, CI-571)
 *
 * Layout and the look of the phone field's flag list (intl-tel-input:
 * 1px #ccc border, 1px 1px 4px shadow, rgba(0,0,0,.05) highlight, 16px
 * list font, 185px list height) on top of the sitepackage's `span.select`:
 * the trigger button carries the select's own classes (`form-control`), so
 * border, radius, padding and font come from the site; the wrapper's chevron
 * (`.select::after`) stays where it is. The native select is hidden for
 * sighted users only — it is still in the DOM and in the POST.
 */

.select.is-psiSelect {
    position: relative;
}

.select.is-psiSelect > select[data-psi-searchable] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    pointer-events: none;
}

.psiSelect-trigger {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 47px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psiSelect-trigger.is-placeholder {
    color: inherit;
}

/* v2.9.99: look of a text input when no reference input exists in the form
   (the script copies the site's real input style otherwise) */
.psiSelect-trigger.is-fallbackLook {
    background: #fff;
    color: inherit;
    font: inherit;
    border: 2px solid currentColor;
    border-radius: 8px;
    min-height: 3.5rem;
    padding: 0 47px 0 1rem;
}

.psiSelect-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.psiSelect-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, .2);
    font-size: 16px;
    line-height: 1.5;
    color: #202122;
    text-align: left;
}

.psiSelect-search {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

.psiSelect-searchIcon {
    position: absolute;
    left: 10px;
    pointer-events: none;
    stroke: #555;
    fill: none;
    stroke-width: 3;
}

.psiSelect-input {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: max(16px, 1em);
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 3px;
    padding: 10px 36px 10px 34px;
    outline: none;
}

.psiSelect-input:focus-visible {
    box-shadow: inset 0 0 0 2px #0085d2;
}

.psiSelect-clear {
    position: absolute;
    right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.psiSelect-clear:hover {
    background: rgba(0, 0, 0, .05);
}

.psiSelect-clearBg {
    fill: #555;
}

.psiSelect-clearX {
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}

.psiSelect-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 185px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    cursor: pointer;
}

.psiSelect-option {
    display: block;
    padding: 8px 10px;
    margin: 0;
}

.psiSelect-option.is-active {
    background-color: rgba(0, 0, 0, .05);
}

.psiSelect-option[aria-selected="true"] {
    font-weight: 600;
}

.psiSelect-option.is-placeholder {
    color: #6a6b6b;
}

.psiSelect-empty {
    text-align: center;
    padding: 30px 0;
    color: #6a6b6b;
}

@media (max-width: 480px) {
    .psiSelect-list {
        max-height: 40vh;
    }
}
