@import url("https://fonts.googleapis.com/css2?family=Commissioner:wght@400;700&display=swap");

:root {
  --surface: #ffffff;
  --text: #000000;
  --border: #000000;
  --radius: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Commissioner";
  font-size: 16px;
  line-height: 1.45;
}

input,
select,
button {
  font: inherit;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.store-locator {
  width: min(100% - 40px, 1200px);
  margin: 0 auto;
  padding: 24px 0;
  background: var(--surface);
}

.store-locator__layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  background: var(--surface);
}

.store-locator__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 700px;
  background: var(--surface);
}

.store-locator__filters {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  background: var(--surface);
}

.store-locator__input,
.store-locator__select,
.store-locator__geo {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 0 !important;
  background: var(--surface);
  color: var(--text);
  font-family: "Commissioner";
  font-size: 16px;
  outline: none;
}

.store-locator__input[type="search"]::-webkit-search-decoration,
.store-locator__input[type="search"]::-webkit-search-cancel-button,
.store-locator__input[type="search"]::-webkit-search-results-button,
.store-locator__input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.store-locator__input::placeholder {
  color: var(--text);
  opacity: 1;
}

.store-locator__select,
.store-locator__geo {
  cursor: pointer;
}

.store-locator__geo {
  font-weight: 700;
  text-align: center;
}

.store-locator .store-locator__geo,
.store-locator .store-locator__geo:hover,
.store-locator .store-locator__geo:focus,
.store-locator .store-locator__geo:focus-visible,
.store-locator .store-locator__geo:active {
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  outline: none !important;
}

.store-locator__input:focus,
.store-locator__select:focus,
.store-locator__geo:focus-visible {
  border-color: var(--border);
  color: var(--text);
}

.store-locator__geo:disabled {
  color: var(--text);
  cursor: wait;
  opacity: 0.65;
}

.store-locator__geo-status {
  min-height: 20px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.store-list {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  background: var(--surface);
  scrollbar-color: var(--border) var(--surface);
  scrollbar-width: thin;
}

.store-list::-webkit-scrollbar {
  width: 8px;
}

.store-list::-webkit-scrollbar-track,
.store-list::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: var(--surface);
}

.store-list::-webkit-scrollbar-thumb {
  border: 1px solid var(--border);
}

.store-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 118px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
}

.store-card:focus-visible,
.store-card.is-active {
  border-color: var(--border);
  color: var(--text);
  outline: none;
}

.store-card.is-active {
  box-shadow: inset 5px 0 0 var(--border);
}

.store-card__name {
  margin: 0 0 8px;
  color: inherit;
  font-family: "Commissioner";
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.store-card__address {
  display: grid;
  gap: 2px;
  margin: 0;
  color: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.store-card__distance {
  margin: 10px 0 0;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.store-empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  text-align: center;
}

.store-locator__map-wrap {
  position: sticky;
  top: 24px;
  height: 700px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
}

.store-locator__map {
  width: 100%;
  height: 100%;
  background: var(--surface);
}

.user-location-marker {
  display: grid;
  place-items: center;
}

.user-location-marker span {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
}

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
}

.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-family: "Commissioner" !important;
  font-size: 20px !important;
  line-height: 32px !important;
}

.leaflet-control-zoom a:focus {
  color: var(--text) !important;
}

.store-popup .leaflet-popup-content-wrapper {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
}

.store-popup .leaflet-popup-content {
  min-width: 220px;
  margin: 14px;
  color: var(--text);
  font-family: "Commissioner";
  font-size: 16px;
}

.store-popup .leaflet-popup-tip {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
}

.leaflet-overlay-pane svg path {
  stroke: var(--border) !important;
  fill: var(--surface) !important;
}

.store-popup__name {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

.store-popup__address {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
}

.store-popup__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-popup__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.store-popup__link:focus-visible {
  border-color: var(--border);
  color: var(--text);
  outline: none;
}

@media (max-width: 1180px) {
  .store-locator {
    width: min(100% - 40px, 980px);
    padding: 22px 0;
  }

  .store-locator__layout {
    grid-template-columns: 1fr;
  }

  .store-locator__panel {
    height: auto;
  }

  .store-list {
    max-height: 430px;
  }

  .store-locator__map-wrap {
    position: relative;
    top: auto;
    height: 560px;
  }
}

@media (max-width: 640px) {
  .store-locator {
    width: min(100% - 28px, 100%);
    padding: 18px 0 28px;
  }

  .store-locator__filters {
    margin-bottom: 16px;
  }

  .store-list {
    max-height: 360px;
    gap: 12px;
  }

  .store-card {
    min-height: 112px;
    padding: 14px 16px;
  }

  .store-locator__map-wrap {
    height: 430px;
  }
}
