/* =============================================================================
   Store Locator — layout & sidebar
   Desktop : sidebar (25 %) left | map (75 %) right, both capped at 450 px tall.
   Mobile  : map on top, scrollable list (max 400 px) below.
   ============================================================================= */

/* Flex row that contains sidebar + map on desktop */
.store-locator-wrapper {
  display: flex;
  flex-direction: row;
  height: 450px;
  border-radius: 8px;
  overflow: hidden;
}

/* Sidebar — collapsed by default, slides open when .has-results is added */
.store-locator-sidebar {
  width: 0;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(18, 18, 18, 0.92);
  box-sizing: border-box;
  transition: width 0.3s ease;
}

.store-locator-sidebar.has-results {
  width: 25%;
  overflow-y: auto;
  padding: 12px 10px;
  font-size: 14px;
}

/* Store list inside the sidebar */
.store-locator-sidebar .store-locator-list {
  margin: 0;
  padding: 0;
}

.store-locator-sidebar .store-locator-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.store-locator-sidebar .store-locator-item:last-child {
  border-bottom: none;
}

/* Map fills the remaining width */
#store-locator-map {
  flex: 1;
  min-width: 0; /* prevents flex overflow */
  height: 100%;
}
#store-locator-btn{
    height: 38px;
}

/* =============================================================================
   Mobile  (< 768 px)
   ============================================================================= */
@media (max-width: 767px) {
  /* Stack vertically; wrapper height is driven by children */
  .store-locator-wrapper {
    flex-direction: column;
    height: auto;
  }

  /* Map on top */
  #store-locator-map {
    order: 1;
    flex: none;
    height: 450px;
    width: 100%;
  }

  /* Sidebar collapses via max-height so the map above is not displaced */
  .store-locator-sidebar {
    order: 2;
    width: 100%;          /* always full-width on mobile */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0;
  }

  /* Open: expand to 400 px and allow inner scrolling */
  .store-locator-sidebar.has-results {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px 10px;
  }
}
