html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

#map {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-btn {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1000;

  border: none;
  border-radius: 50px;
  padding: 10px 14px;

  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  cursor: pointer;
}

.map-btn.active {
  background: #dbeafe;
}


.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  
  cursor: pointer;
  font-size: 18px;
  color: #999;
  
  display: none; /* oculto por defecto */
}

.clear-btn:hover {
  color: #333;
}



.leaflet-tile {
    filter: grayscale(50%) brightness(105%) saturate(60%) contrast(95%);
}


#sidebar {
    width: 250px;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 0;
    overflow: hidden;
}

#sidebar-content {
    flex: 1;
    /*overflow-y: auto;*/
}

/* Drag handle */
#drag-handle {
    display: none;
    width: 100%;
    height: 25px;
    min-height: 25px;
    background-color: grey;
    flex-shrink: 0;
    touch-action: none;
    cursor: ns-resize;
    position: relative;
    z-index: 2100;
}

/* Mobile adjustments */
@media (max-width: 1024px) {
    #split-container {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        height: 40vh;
        order: 3;
        position: relative;
        padding-top: 0;
    }

    #drag-handle {
        display: block !important;
        width: 100%;
        height: 25px;
        min-height: 25px;
        order: 2;
        position: relative;
        z-index: 2001;
        flex-shrink: 0;
    }

    #map-container {
        height: calc(60vh - 25px);
        order: 1;
    }

    #map {
        height: 100%;
    }

    #search-container {
        position: sticky;
        top: 0;
        z-index: 2000;
        background: white;
    }
}



.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



#suggestions {
    top: 100%;
    left: 0;
    z-index: 19999;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-top: none;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: absolute;
    display: none;
}

#suggestions.active {
    display: block; /* cuando hay sugerencias */
}



#suggestions-origin {
    top: 100%;
    left: 0;
    z-index: 99999;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-top: none;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: absolute;
    display: none;
}

#suggestions-origin.active {
    display: block; /* cuando hay sugerencias */
}




.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

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

.no-results {
    color: gray;
    cursor: default;
}


#chat-result {
    background-color: #fafafa;
    border-top: 1px solid #e5e5e5;
    margin-top: 10px;
    padding-top: 10px;
    z-index: 1;
    position: relative;
    flex: 1;
    overflow-y: auto;
}

#search-container {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
}


.payment-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-link {
  color: inherit;
  text-decoration: none;
  font-size: 1.1rem;
}


.place-img {
  width: 100%;
  aspect-ratio: 16/9;  /* 👈 consistente */
  object-fit: cover;
  border-radius: 8px;
}