/**
 * Styles pour la carte et les marqueurs
 */

/* Styles pour améliorer le drag/drop de la carte */
#map {
    cursor: grab !important; /* Curseur de main ouverte pour indiquer que la carte est draggable */
}

#map:active {
    cursor: grabbing !important; /* Curseur de main fermée lors du drag */
}

/* S'assurer que la carte est draggable */
.gm-style {
    cursor: inherit !important;
}

/* Styles pour les infowindows */
.map-box {
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    width: 270px;
}

.map-box .listing-img-container {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.map-box .listing-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}

.map-box h4 {
    margin: 0;
    padding: 0;
}

.map-box h4 a {
    padding: 0 0 2px 0;
    font-size: 17px;
    line-height: 25px;
    transition: all 0.2s ease-in-out;
    display: inline-block;
    color: #333;
    text-decoration: none;
}

.map-box h4 a:hover {
    color: #66676b;
}

.map-box p {
    padding: 0;
    line-height: 25px;
    margin: 2px 0 0 0;
    font-size: 14px;
    color: #777;
}

.listing-badge {
    position: absolute;
    top: 15px;
    /* right: 15px; */
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.listing-badge.now-open {
    background-color: #7BC67B;
}

.listing-badge.now-closed {
    background-color: #e91721;
}

/* Bouton de fermeture de l'infowindow */
.infoBox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    z-index: 999;
    text-align: center;
    line-height: 29px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    height: 29px;
    width: 29px;
    background-color: #fff;
    color: #333;
    transition: all 0.2s ease-in-out;
    font-family: "FontAwesome";
    border-radius: 50%;
    -webkit-text-stroke: 1px #fff;
}

.infoBox-close:hover {
    color: #fff;
    background-color: #66676b;
    -webkit-text-stroke: 1px #66676b;
}

/* Animation pour l'infowindow */
.gm-style-iw {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les marqueurs personnalisés */
.map-marker-container {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 1;
    pointer-events: auto; /* S'assurer que les événements sont capturés uniquement sur le marqueur */
    width: 45px; /* Augmenter la largeur de la zone cliquable (30 * 1.5) */
    height: 60px; /* Augmenter la hauteur de la zone cliquable (40 * 1.5) */
}

/* Style pour le marqueur avec l'image SVG */
.marker-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease-out, filter 0.2s ease;
    will-change: transform;
    transform-origin: center bottom;
}

/* Style pour l'icône SVG */
.marker-pin-icon {
width: 45px; /* Augmenter la taille de l'icône (30 * 1.5) */
height: auto;
    transition: filter 0.2s ease;
    pointer-events: auto; /* S'assurer que les événements sont capturés uniquement sur l'icône */
}

/* Animation au survol */
.marker-container:hover,
.hovered .marker-container {
    transform: translateY(-6px) scale(1.05);
    filter: brightness(1.1);
    z-index: 100;
}

/* Style pour le marqueur actif */
.map-marker-container.clicked .marker-container,
.map-marker-container.infoBox-opened .marker-container {
    transform: translateY(-6px) scale(1.05);
    filter: brightness(1.1);
    z-index: 100;
}

/* Styles pour les différents états - conservés pour compatibilité */
.marker-container.open .marker-pin-icon {
    filter: hue-rotate(0deg); /* Couleur originale */
}

.marker-container.closed .marker-pin-icon {
    filter: hue-rotate(270deg); /* Teinte rouge */
}

.marker-container.pharmacollect .marker-pin-icon {
    filter: hue-rotate(30deg); /* Teinte orange */
}

/* Styles pour l'autocomplétion personnalisée */
.custom-suggestions-container {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    width: 100%; /* Prend la largeur du parent (.input-with-icon) */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
}

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

/* Ajustement pour le positionnement relatif du parent */
.input-with-icon.customListDropDown {
    position: relative; /* Nécessaire pour le positionnement absolu de l'enfant */
}

/* Assurer la visibilité du curseur dans le champ de recherche */
#search-keywords {
  caret-color: auto; /* Utilise la couleur par défaut du navigateur ou du système */
}