/* Address Autocomplete — Front-office styles
 * Éléments structurels et typographiques fixes.
 * Les propriétés éditables (couleurs, dimensions, image) sont
 * injectées en CSS inline depuis la configuration back-office.
 */

/* ---- Popup overlay ---- */
.aac-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* ---- Popup box ---- */
.aac-popup {
    padding: 28px 36px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    text-align: center;
    box-sizing: border-box;
}

/* ---- Image ---- */
.aac-popup__img {
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto 16px;
    display: block;
}

/* ---- Message ---- */
.aac-popup__msg {
    margin-bottom: 18px;
}

.aac-popup__msg p {
    font-size: 1rem;
    color: #222;
    margin: 0;
    line-height: 1.6;
}

/* ---- Bouton fermeture ---- */
.aac-popup__btn-wrap {
    text-align: center;
}

.aac-popup__btn {
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    display: inline-block;
}

/* ---- Dropdown suggestions ---- */
.aac-dropdown {
    font-family: inherit;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    z-index: 99998;
    max-height: 300px;
    overflow-y: auto;
    font-size: .9rem;
    display: none;
    box-sizing: border-box;
}

.aac-dropdown li {
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aac-dropdown li:last-child {
    border-bottom: none;
}

.aac-dropdown li:hover,
.aac-dropdown li.aac-dropdown__item--active {
    background: #f0f7ff;
}

/* ---- Hint téléphone (conservé pour rétrocompat) ---- */
.aac-ph {
    display: block;
    margin-top: 4px;
    font-size: .82rem;
    line-height: 1.4;
}

.aac-ph:empty {
    display: none;
}

.aac-ph--err {
    color: #e74c3c !important;
}

/* ---- Masquage champs inutiles ---- */
.id_state-container select:has(option:only-child),
.id_state-container:has(select option:only-child),
#field-id_state:has(option:only-child),
.mb-3:has(#field-id_state option:only-child) {
    display: none !important;
}

.dni-container,
[data-name="dni"] {
    display: none !important;
}
