/* ============================================================
   Fluent Forms Addons Immo – Champ Adresse BAN
   ============================================================ */

.ffai-address-wrapper {
    position: relative;
}

.ffai-input-wrap {
    position: relative;
    width: 100%;
}

/* ---- Zone de suggestions ---- */
.ffai-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ffai-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ffai-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.ffai-suggestion-item:last-child {
    border-bottom: none;
}

.ffai-suggestion-item:hover,
.ffai-suggestion-item.ffai-active {
    background: #f0f7ff;
    color: #1d4ed8;
}

/* Icône localisation */
.ffai-suggestion-item::before {
    content: "📍";
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.ffai-suggestion-label {
    font-weight: 600;
}

.ffai-suggestion-context {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1px;
}

/* ---- Indicateur de chargement ---- */
.ffai-input-wrap.ffai-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: ffai-spin 0.7s linear infinite;
}

@keyframes ffai-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ---- Badge "données récupérées" ---- */
.ffai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #15803d;
    margin-top: 6px;
    padding: 3px 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
}

.ffai-badge.ffai-badge-error {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

/* ---- Erreur de champ ---- */
.ffai-address-wrapper.has-error .ff-el-form-control {
    border-color: #f87171;
}
