/* Searchable dropdowns on the admin screens (js/searchable-select.js), in the admin colour scheme. */

.hf-ss {
    --hf-ss-accent: var(--wp-admin-theme-color, #2271b1);
    background: #fff;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    box-sizing: border-box;
    color: #1d2327;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.4;
    max-height: min(360px, calc(100vh - 16px));
    overflow: hidden;
    position: fixed;
    z-index: 160000; /* above the admin bar, media modals and the builder */
}

.hf-ss *,
.hf-ss *::before,
.hf-ss *::after {
    box-sizing: border-box;
}

.hf-ss .hf-ss-search {
    border: 0;
    border-bottom: 1px solid #dcdcde;
    border-radius: 0;
    box-shadow: none;
    flex: 0 0 auto;
    font-size: 13px;
    margin: 0;
    min-height: 36px;
    padding: 6px 10px;
    width: 100%;
}

.hf-ss .hf-ss-search:focus {
    border-bottom-color: var(--hf-ss-accent);
    box-shadow: inset 0 -1px 0 var(--hf-ss-accent);
    outline: none;
}

.hf-ss-list {
    flex: 1 1 auto;
    list-style: none;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 0;
}

.hf-ss-option {
    cursor: pointer;
    margin: 0;
    padding: 6px 10px;
    overflow-wrap: anywhere;
}

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

.hf-ss-option.is-active {
    background: var(--hf-ss-accent);
    color: #fff;
}

.hf-ss-option[aria-disabled="true"] {
    color: #a7aaad;
    cursor: default;
}

.hf-ss-option[aria-disabled="true"].is-active {
    background: #f0f0f1;
    color: #a7aaad;
}

.hf-ss-group {
    color: #646970;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
    padding: 8px 10px 4px;
    text-transform: uppercase;
}

.hf-ss-empty {
    color: #646970;
    margin: 0;
    padding: 10px;
}

.hf-ss-status {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.hf-ss [hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
    .hf-ss {
        animation: hf-ss-in 0.08s ease-out;
    }

    @keyframes hf-ss-in {
        from {
            opacity: 0;
            transform: translateY(-2px);
        }
    }
}
