/* HelloFlex – live organization search (taxonomy: hf_healthscan_organization)
   Styles for the dropdown rendered by resources/js/hf-organization-search.js */

/* Full-screen dimmed backdrop shown while the dropdown is open.
   Everything sits beneath it except the search widget, which we elevate. */
.hf-org-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hf-org-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Lift the search widget above the backdrop while results are open so the
   input and the dropdown stay fully visible and interactive. */
#org-search.hf-org-active {
    position: relative;
    z-index: 99991;
}

/* Never animate the input's corner change between active/non-active. */
#org-search .e-search-input,
#org-search .elementor-search-form__input,
#org-search input[type="search"] {
    transition: none !important;
}

/* While the dropdown is open, flatten the input's bottom corners so it
   connects visually with the dropdown. Top corners keep their rounding. */
#org-search.hf-org-active .e-search-input,
#org-search.hf-org-active .elementor-search-form__input,
#org-search.hf-org-active input[type="search"] {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* The results dropdown itself. */
.hf-org-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 0;
    padding-bottom: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.hf-org-results.is-open {
    display: block;
}

.hf-org-results__item,
.hf-org-results__item:visited {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease, color 0.15s ease;
}

.hf-org-results__item:last-child {
    border-bottom: none;
}

.hf-org-results__item:hover,
.hf-org-results__item:focus {
    background: #f5f7f8;
    color: #1b8597;
}

.hf-org-results__empty {
    padding: 10px 14px;
    color: #878787;
    font-style: italic;
}
