.dotcodot-store-locator { display:flex; height:100vh; font-family: sans-serif; }
.locator-search { background:#f4a51d; padding:10px; display:flex; align-items:center; }
.locator-search input { flex:1; border:none; background:transparent; color:#000000; padding:8px; font-size:16px; outline:none; }
.locator-search button { background:transparent; border:none; color:#fff; font-size:20px; cursor:pointer; }
.locator-list { width:30%; max-height:100%; overflow-y:auto; background:#fff; }
.locator-map-wrapper { position:relative; width:70%; }
.locator-map { height:100%; }

#dotcodot-locate-btn {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #f4a51d;
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.store-item { padding:12px; border-bottom:1px solid #000000; cursor:pointer; transition:background .2s; }
.store-item:hover { background:#f9f9f9; }


/* ===== Desktop: search above list ===== */
.dotcodot-store-locator {
  display: grid;
  grid-template-columns: 30% 70%;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "search map"
    "list   map";
  height: 100vh;
  gap: 0;
}

.locator-search {
  grid-area: search;
  /* ensure full width of sidebar */
  width: 100%;
}

.locator-list {
  grid-area: list;
  /* remove any fixed width if present */
  width: auto;
}

.locator-map-wrapper {
  grid-area: map;
  width: auto; /* let the grid control it */
}

/* Desktop: 2-col grid with 20px gap */
.dotcodot-store-locator {
  display: grid;
  grid-template-columns: 30% 70%;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "search map"
    "list   map";
  gap: 20px;             /* <-- adds 20px between search, list & map */
  height: 100vh;
}

.locator-search {
  grid-area: search;
}

.locator-list {
  grid-area: list;
}

.locator-map-wrapper {
  grid-area: map;
}

/* Round the whole locator container */
.dotcodot-store-locator {
  border-radius: 12px;
  overflow: hidden;   /* ensure children are clipped to the rounded corners */
}

/* Top corners rounded for the map panel */
.locator-map-wrapper,
.locator-map-wrapper #dotcodot-map {
  border-radius: 12px 12px 12px 12px;
}

/* Bottom corners rounded for the store list */
.locator-list {
  border-radius: 12px 12px 12px 12px;
}

/* If you have a fixed search bar above the list (desktop/mobile), round its top corners too */
.locator-search {
  border-radius: 12px 12px 12px 12px;
}

/* Make the search input pill-shaped */
.locator-search input {
  border-radius: 25px;   /* adjust to taste */
  padding: 8px 16px;
}

/* Round the search button to match */
.locator-search button {
  border-radius: 50%;    /* perfect circle around the icon */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {

  /* 1) Make the search bar container transparent on mobile */
  .locator-search {
    display: flex !important;
    align-items: center;
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 0;               /* remove desktop padding */
    background: transparent;  /* let the map or sidebar show through */
  }

  /* 2) Style the input as a white pill */
  .locator-search input {
    flex: 1;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 16px;
    color: #333;
    outline: none;
  }

  /* 3) Style the button next to it */
  .locator-search button {
    width: 40px;
    height: 40px;
    margin-left: 8px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    cursor: pointer;
  }

  /* 4) Ensure the search bar sits *between* map & list */
  .locator-map-wrapper { order: 1; }
  .locator-search     { order: 2; }
  .locator-list       { order: 3; }
}
