/* Styles de base essentiels de la popup */
.maplibregl-popup {
    width: 320px !important;
    height: 380px !important;
}

.maplibregl-popup-tip {
    display: none !important;
}

/* Scrollbar styles */
.maplibregl-popup * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.maplibregl-popup *::-webkit-scrollbar {
    width: 6px;
}

.maplibregl-popup *::-webkit-scrollbar-track {
    background: transparent;
}

.maplibregl-popup *::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}






/* Bouton de fermeture des popups */
.maplibregl-popup {
    overflow: visible !important;
}

.maplibregl-popup-content {
    overflow: visible !important;
}

/* Style pour le bouton de fermeture principal des popups MapLibre */
.popup-close-button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99999 !important;
    border: none;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

/* Surcharge spécifique pour assurer la visibilité dans toutes les popups */
.maplibregl-popup-content .popup-close-button {
    z-index: 99999 !important;
    position: absolute !important;
}

.nichoir-popup .popup-close-button,
.parcelle-popup .popup-close-button,
.cluster-popup .popup-close-button {
    z-index: 99999 !important;
    position: absolute !important;
}

.popup-close-button:hover {
    background-color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.popup-close-button:active {
    transform: scale(0.95);
}

.popup-close-button svg {
    width: 10px;
    height: 10px;
    stroke: #444;
    stroke-width: 2;
}

.popup-close-button:hover svg {
    stroke: #000;
}

/* Styles pour les boutons de fermeture des modales (uniformisés) */
.comment-modal-close,
.legend-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10001 !important;
}

.comment-modal-close:hover,
.legend-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.comment-modal-close svg,
.legend-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
}