/* Leaflet Store Locator Styles - Updated to match dar_2k24 theme */

#block-leafletstorelocatorblock {
  margin: 50px auto 100px;
}

#block-leafletstorelocatorblock .content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.store-locator-container {
  display: flex;
  gap: 0;
  overflow: hidden;
  align-items: stretch;
}

#leaflet-map {
  height: 500px;
  width: 55%;
  margin-top: 6px;
  max-width: 55%;
  min-height: 396px;
  z-index: 1;
}

#result-list-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-right: 0;
  overflow: hidden;
  height: auto;
  max-height: 100%;
  width: 45%;
  padding-right: 20px;
}

#result-list-container h4 {
  padding-left: 20px;
}

/* Search Input Styling */
#location-search {
  font-family: "cronos-pro", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.625rem;
  letter-spacing: 0rem;
  background-color: #ffffff;
  border: 1px solid #3EA3CB;
  border-radius: 22px;
  color: #222222;
  height: 43px !important;
  max-width: 100%;
  opacity: 1;
  padding: 0.5rem 1.25rem !important;
  text-transform: inherit;
  width: 100%;
  position: relative;
  margin-bottom: 20px;
}

/* Store List Container */
.store-list-container {
  border: 1px solid #C8E4F1;
  border-right: 0;
  flex-grow: 1;
  max-height: 415px;
}

.store-list-container::before {
  font-weight: bold;
  position: sticky;
  top: 0;
  content: "RESULTS";
  display: flex;
  height: 50px;
  justify-content: flex-start;
  align-items: center;
  background-color: #004990;
  color: #ffffff;
  padding-left: 20px;
  width: 100%;
  z-index: 10;
}

.store-result {
  padding: 15px;
  border-bottom: 1px solid #ccc;
}

.store-result .address {
  font-size: 15px;
}

/* Store List Scrolling */
#result-list {
  margin: 0;
  overflow-y: scroll !important;
  max-height: 345px;
  position: relative;
  list-style: none;
  padding: 0;
}

/* Custom Scrollbar Sty ling */
#result-list::-webkit-scrollbar {
  border-radius: 4px;
  padding-left: 0;
  width: 7px;
}

#result-list::-webkit-scrollbar-track {
  background: #C8E4F1;
  border-radius: 4px;
}

#result-list::-webkit-scrollbar-thumb {
  background: #004990;
  border-radius: 4px;
  height: 80px;
}

/* Padding List Item */
#result-list li.store {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

#result-list li.store::before {
  margin-top: 5px;
}

/* Alternating List Item Colors */
#result-list li:nth-child(odd) {
  background: #C8E4F1;
}

#result-list li:nth-child(even) {
  background: #ffffff;
}

/* Locator Footer */
.locator-footer div + div {
  margin-top: 20px;
}

.locator-footer .line3 {
  color: #003366;
  font-weight: 700;
}

/* Map Loading Overlay */
#map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.75);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  color: #333;
  pointer-events: all; /* blocks interaction */
}

#map-loading-overlay.hidden {
  display: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  #block-leafletstorelocatorblock {
    margin-bottom: 50px;
  }

  .store-locator-container {
    flex-wrap: wrap;
  }

  .store-locator-container > * {
    width: 100%;
  }

  #leaflet-map {
    width: 100%;
    max-width: 100%;
    min-height: 280px;
  }

  #result-list-container {
    width: 100%;
    padding-right: 0;
  }

  #result-list {
    max-height: 250px;
  }
}
