/* Listings */
.listing-card.is-highlighted {
  outline: 2px solid rgba(13,110,253,.35); /* bootstrap primary-ish */
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* Keep listing action buttons readable after visited links */
.listing-card .btn:visited {
  color: var(--bs-btn-color) !important;
}

.evidenziato {
  background: #fff3cd;
  color: inherit;
  border-radius: .2rem;
  padding: 0 .15em;
}

/* Custom Marker Icons - Stile Airbnb */
.custom-marker-container {
  background: transparent;
  border: none;
}

.custom-marker {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 6px 12px;
  font-weight: 600;
  font-size: 14px;
  color: #222222;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
}

.custom-marker:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.custom-marker-content {
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Marker evidenziato - stile Airbnb */
.custom-marker-container.marker-highlighted .custom-marker,
.custom-marker-container:has(.marker-highlighted) .custom-marker {
  background: #222222;
  color: #ffffff;
  border-color: #222222;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.marker-highlighted {
  background: #222222 !important;
  color: #ffffff !important;
  border-color: #222222 !important;
  transform: scale(1.1) translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1) !important;
  z-index: 1000 !important;
}

/* Filters Sidebar Sticky */
.filters-sticky-wrap {
  position: sticky;
  top: 56px;              /* altezza header */
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: #f5f6f8;
}

.filters-content {
  padding-bottom: 1rem;
}

#filtersSidebar {
  background: #f5f6f8;
}

/* Map Sticky */
.map-sticky-wrap {
  position: sticky;
  top: 56px;              /* altezza header */
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: #fff;
}

.map-canvas {
  flex: 1;
  min-height: 320px;
  background: #f5f5f5;
}

/* Leaflet map container fixes */
.map-canvas.leaflet-container {
  background: #f5f5f5;
  font-family: inherit;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.leaflet-popup-content {
  margin: 12px;
  font-size: 14px;
}

.leaflet-popup-content a {
  color: #0d6efd;
  text-decoration: none;
}

.leaflet-popup-content a:hover {
  text-decoration: underline;
}

/* Previeni sfarfallio del popup */
.leaflet-popup {
  pointer-events: auto !important;
}

.leaflet-popup-pane {
  z-index: 400;
}

/* Nascondi popup fantasma nell'angolo */
.leaflet-popup-pane .leaflet-popup:not(.leaflet-popup-tip) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.leaflet-popup-pane .leaflet-popup.leaflet-zoom-animated {
  opacity: 1;
  pointer-events: auto;
}

/* Results List Scroll */
#leftPane {
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

/* Mobile View Toggle */
#mobileMapPane {
  z-index: 1050;
}

#mobileMapPane .map-canvas {
  height: calc(100vh - 60px);
}

/* Smooth transitions */
#filtersSidebar,
#leftPane,
#rightPane {
  transition: all 0.3s ease;
}

/* Footer styles */
footer .hover-shadow {
  transition: all 0.2s ease;
  cursor: pointer;
}

footer .hover-shadow:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

footer .card {
  transition: all 0.2s ease;
}

footer .card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.15) !important;
  transform: translateY(-2px);
}

footer img {
  transition: transform 0.2s ease;
}

footer .card:hover img {
  transform: scale(1.05);
}
