/* ==========================================================================
   Dancefest Mapbox Events - styles
   ========================================================================== */

/* --- Liste de suggestions d'adresses (formulaire de création/édition) --- */
.dme-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.dme-suggestions.is-open {
    display: block;
}

.dme-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #222;
}

.dme-suggestion-item:hover {
    background-color: #f0f4f9;
}

/* --- Lien "Location" cliquable sur les pages de listing --- */
.dme-map-link {
    color: #1976d2;
    text-decoration: underline;
    cursor: pointer;
}
.dme-map-link:hover {
    color: #0d47a1;
}

/* --- Bouton "Open the map" affiché à côté de l'adresse --- */
.dme-map-open-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
    color: #1976d2;
    background: #eaf2fb;
    border: 1px solid #b9d6f2;
    border-radius: 999px;
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
}
.dme-map-open-btn:hover {
    background: #d9e9fa;
    border-color: #1976d2;
}

/* --- Mini-carte sur la fiche événement publique --- */
.dme-single-map {
    width: 100%;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #eee; /* le temps que le tuiles Mapbox se chargent */
}

/* --- Pop-up modale (pages de listing) --- */
body.dme-modal-open {
    overflow: hidden; /* évite le scroll de la page derrière la modale ouverte */
}

.dme-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    padding: 20px;
    box-sizing: border-box;
}

.dme-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.dme-modal-box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 640px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.dme-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
}
.dme-modal-close:hover {
    color: #111;
}

.dme-modal-address {
    font-weight: 600;
    margin-bottom: 12px;
    padding-right: 30px; /* laisse la place au bouton de fermeture */
    color: #222;
}

.dme-modal-map {
    width: 100%;
    height: 350px;
    border-radius: 6px;
    overflow: hidden;
}

@media (max-width: 480px) {
    .dme-modal-map {
        height: 260px;
    }
}
