/*!
 * coc/unit-picker — searchable unit combobox on condo address-profile pages.
 *
 * Sibling stylesheet to address-actions.css; both attach to single
 * address-profile pages via functions.php enqueue. Kept separate from
 * address-landing.css (which is gated to is_page('address') — widening that
 * gate would be a regression risk for the discovery landing page).
 *
 * Task: wdu9v75whw
 */

.coc-unit-picker {
    position: relative;
    margin: 1rem 0 1.25rem;
    max-width: 28rem;
}

.coc-unit-picker__banner {
    /* Amber, NOT brand red (#cf2627) — red reads as error. This is a soft
       recovery surface, not a failure state. */
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    color: #78350f;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.coc-unit-picker__banner strong {
    font-weight: 600;
}

.coc-unit-picker__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.35rem;
}

.coc-unit-picker__row {
    position: relative;
}

.coc-unit-picker__input {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    font-size: 1rem;
    line-height: 1.3;
    border: 1px solid #c4c4c4;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.coc-unit-picker__input:focus,
.coc-unit-picker__input:focus-visible {
    outline: none;
    border-color: var(--color-primary, #cf2627);
    box-shadow: 0 0 0 2px var(--color-primary, #cf2627);
}

.coc-unit-picker__suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 18rem;
    overflow-y: auto;
    z-index: 10;
}

.coc-unit-picker__option {
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
    line-height: 1.35;
}

.coc-unit-picker__option.is-active,
.coc-unit-picker__option:hover {
    background: #f5f5f5;
    border-left-color: var(--color-primary, #cf2627);
}

.coc-unit-picker__more,
.coc-unit-picker__empty {
    padding: 0.5rem 0.85rem;
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
    pointer-events: none;
}

@media (max-width: 640px) {
    .coc-unit-picker {
        max-width: none;
    }
    /* Listbox stays absolutely positioned so it overlays rather than pushing
       the rest of the page down on mobile. */
}
