/* HSSA Map / Search UI (production) */
.map-search {
  margin: 20px 0 10px;
}
.map-search__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.map-search input[type="text"]#zipcode-search {
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 220px;
}
.map-search select#radius-filter {
  height: 40px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.map-search button#search-by-zip {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  background-color: #dd513f; /* keep existing brand color */
  color: #fff;
  cursor: pointer;
}
.map-search button#near-me {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

/* Cards grid normalization (used across templates) */
.flexy-locations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.flexy-locations > a.locations-col-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(25% - 30px);
  max-width: calc(25% - 30px);
  min-width: 260px;
  text-decoration: none;
  color: inherit;
}
.flexy-locations .locations-col,
.flexy-locations .lc-outer,
.flexy-locations .li-wrap,
.flexy-locations .location-img {
  width: 100% !important;
  max-width: 100% !important;
}
.flexy-locations .locations-col-link:hover .location-img { opacity: 0.96; }
.flexy-locations .location-arrow img { vertical-align: middle; }

@media (max-width: 1024px) {
  .flexy-locations > a.locations-col-link {
    flex: 1 1 calc(45% - 20px);
    max-width: calc(45% - 20px);
  }
}
@media (max-width: 600px) {
  .flexy-locations > a.locations-col-link {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
/* Map height */
#map-div { height: 600px; }

#locations .tools,
#locations .tools-inner,
#locations .tools-inner3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
/* Unify search bar layout across taxonomy and archive */
#locations .tools,
#locations .tools-inner {
  justify-content: center;
  padding: 10px 0;
}

.map-search__row {
  justify-content: center;
}

.map-search input[type="text"],
.map-search select {
  flex: 0 1 auto;
}

.map-search button#search-by-zip,
.map-search button#near-me {
  background-color: #dd513f;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
}

.map-search button#near-me {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  margin-left: 6px;
}

/* Force centering of the entire search bar group */
#locations .map-search__row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 700px !important;
  text-align: center;
}


/* Input field */
.map-search__row input#zipcode-search {
  flex: 1 1 240px;
  max-width: 280px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Shrink the mileage selector */
.map-search__row select#radius-filter {
  flex: 0 0 130px;           /* fixed smaller width */
  height: 40px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23666' d='M6 8L0 0h12z'/></svg>") no-repeat right 10px center;
  background-size: 10px;
}

/* Button styling and alignment */
.map-search__row button#search-by-zip {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  background-color: #dd513f;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease-in-out;
}

.map-search__row button#search-by-zip:hover {
  background-color: #c64636;
}

@media (max-width: 600px) {
  .map-search__row {
    flex-direction: column;
    align-items: stretch;
    max-width: 90%;
  }

  .map-search__row input,
  .map-search__row select,
  .map-search__row button {
    width: 100%;
  }
}
/* --- FORCE LAYOUT FIX FOR LOCATIONS SEARCH BAR --- */
#locations .map-search,
#locations .map-search__row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 700px !important;
  text-align: center !important;
}

/* Input field */
#locations .map-search input#zipcode-search {
  flex: 1 1 240px !important;
  max-width: 280px !important;
  height: 40px !important;
  padding: 8px 12px !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
}

/* Shrink mileage selector */
#locations .map-search select#radius-filter {
  flex: 0 0 130px !important;
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  height: 40px !important;
  padding: 6px 8px !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  appearance: none !important;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23666' d='M6 8L0 0h12z'/></svg>") no-repeat right 10px center !important;
  background-size: 10px !important;
  text-align: center !important;
  text-align-last: center !important;
}

/* Button consistency and alignment */
#locations .map-search button#search-by-zip {
  flex: 0 0 auto !important;
  height: 40px !important;
  padding: 0 18px !important;
  border-radius: 6px !important;
  background-color: #dd513f !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s ease-in-out !important;
}

#locations .map-search button#search-by-zip:hover {
  background-color: #c64636 !important;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  #locations .map-search__row {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 90% !important;
  }

  #locations .map-search input,
  #locations .map-search select,
  #locations .map-search button {
    width: 100% !important;
  }
}
