/* Destination autocomplete — OTA-style panel (z-index 2000, below modals) */
.dest-ac-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    text-align: left;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.06),
        0 16px 40px -8px rgba(15, 23, 42, 0.18);
    max-height: min(360px, 52vh);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2001;
    display: none;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0;
}

.dest-ac-dropdown.show {
    display: block;
    animation: dest-ac-fade 0.18s ease;
}

.dest-ac-dropdown.flip-up {
    top: auto;
    bottom: calc(100% + 6px);
}

@keyframes dest-ac-fade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dest-ac-loading,
.dest-ac-empty,
.dest-ac-error {
    padding: 16px 18px;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
}

.dest-ac-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
}

.dest-ac-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: dest-ac-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes dest-ac-spin {
    to {
        transform: rotate(360deg);
    }
}

.dest-ac-error {
    color: #b91c1c;
}

.dest-ac-group {
    padding: 4px 0 2px;
}

.dest-ac-group + .dest-ac-group {
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    padding-top: 8px;
}

.dest-ac-group-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 6px 16px 4px;
    text-align: left;
}

.dest-ac-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 14px;
    margin: 0 6px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}

.dest-ac-item:hover,
.dest-ac-item.selected {
    background: #f1f5f9;
}

.dest-ac-item.selected {
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.dest-ac-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.dest-ac-icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.dest-ac-item:hover .dest-ac-icon-wrap,
.dest-ac-item.selected .dest-ac-icon-wrap {
    background: #fff;
    border-color: #bfdbfe;
}

.dest-ac-icon-svg {
    width: 18px;
    height: 18px;
    display: block;
}

.dest-ac-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.dest-ac-main {
    display: block;
    width: 100%;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-ac-main .dest-ac-match {
    font-weight: 700;
    color: #1d4ed8;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.dest-ac-sub {
    display: block;
    width: 100%;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-ac-code {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 3px 6px;
    text-transform: uppercase;
}

/* Legacy class names (older renderers) */
.dest-ac-icon {
    display: none;
}
