.storemap {
  --storemap-primary: #0f766e;
  --storemap-accent: #2563eb;
  --storemap-line: #dbe3e1;
  --storemap-surface: #ffffff;
  --storemap-muted: #657283;
  --storemap-text: #172033;
  display: grid;
  grid-template-columns: minmax(310px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
  color: var(--storemap-text);
}

.storemap * {
  box-sizing: border-box;
}

.storemap button,
.storemap input,
.storemap select {
  font: inherit;
}

.storemap-panel {
  background: var(--storemap-surface);
  border: 1px solid var(--storemap-line);
  border-radius: 8px;
}

.storemap-controls {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.storemap-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.storemap input,
.storemap select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--storemap-line);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--storemap-text);
  background: #ffffff;
}

.storemap-button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: var(--storemap-primary);
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
}

.storemap-button.secondary {
  background: #eef5f3;
  color: var(--storemap-text);
}

.storemap-filters {
  display: grid;
  gap: 8px;
}

.storemap-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--storemap-line);
}

.storemap-filter-group strong {
  min-width: 72px;
  font-size: 12px;
  color: var(--storemap-muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.storemap-filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef5f3;
  cursor: pointer;
}

.storemap-list {
  max-height: 600px;
  overflow: auto;
  border-top: 1px solid var(--storemap-line);
}

.storemap-location {
  padding: 14px;
  border-bottom: 1px solid var(--storemap-line);
  display: grid;
  gap: 8px;
}

.storemap-location[aria-selected="true"] {
  background: #f0fdfa;
}

.storemap-location h3 {
  margin: 0;
  font-size: 16px;
}

.storemap-location p {
  margin: 0;
  color: var(--storemap-muted);
}

.storemap-location-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.storemap-link {
  color: var(--storemap-accent);
  text-decoration: none;
  font-weight: 600;
}

.storemap-map {
  min-height: 650px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 99, 235, 0.1) 1px, transparent 1px),
    #edf7f4;
  background-size: 42px 42px;
}

.storemap-modal-open {
  overflow: hidden;
}

.storemap-map.is-expanded {
  position: fixed;
  inset: 16px;
  z-index: 2147483000;
  min-height: 0;
  border-radius: 10px;
  box-shadow: 0 22px 80px rgba(15, 23, 42, 0.35);
}

.storemap-map-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: zoom-in;
}

.storemap-tile-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.storemap-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  border: 0;
  user-select: none;
}

.storemap-map-zoom,
.storemap-map-expand {
  position: absolute;
  z-index: 5;
}

.storemap-map-zoom {
  top: 14px;
  left: 14px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--storemap-line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
}

.storemap-map-zoom button,
.storemap-map-expand {
  width: 38px;
  height: 38px;
  border: 0;
  background: #ffffff;
  color: var(--storemap-text);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.storemap-map-zoom button + button {
  border-top: 1px solid var(--storemap-line);
}

.storemap-map-zoom button:hover,
.storemap-map-expand:hover {
  background: #eef5f3;
}

.storemap-map-expand {
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--storemap-line);
  border-radius: 7px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
}

.storemap-expand-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}

.storemap-expand-icon::before,
.storemap-expand-icon::after {
  content: "";
  position: absolute;
  border: 2px solid var(--storemap-text);
}

.storemap-expand-icon::before {
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-left: 0;
  border-bottom: 0;
}

.storemap-expand-icon::after {
  left: 0;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-right: 0;
  border-top: 0;
}

.storemap-map-expand.is-expanded .storemap-expand-icon::before,
.storemap-map-expand.is-expanded .storemap-expand-icon::after {
  width: 10px;
  height: 10px;
}

.storemap-map-expand.is-expanded .storemap-expand-icon::before {
  top: 4px;
  right: 4px;
}

.storemap-map-expand.is-expanded .storemap-expand-icon::after {
  left: 4px;
  bottom: 4px;
}

.storemap-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50% 50% 50% 4px;
  rotate: -45deg;
  background: var(--storemap-primary);
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.24);
  cursor: pointer;
}

.storemap-pin::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.storemap-pin span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.storemap-pin.is-active {
  background: var(--storemap-accent);
  z-index: 2;
}

.storemap-map-note {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: auto;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--storemap-muted);
  border: 1px solid var(--storemap-line);
}

.storemap-map-note a {
  color: inherit;
  text-decoration: none;
}

.storemap-powered {
  display: block;
  padding: 10px 14px;
  color: var(--storemap-muted);
  text-decoration: none;
  font-size: 12px;
}

.storemap-empty {
  padding: 26px 14px;
  color: var(--storemap-muted);
}

@media (max-width: 820px) {
  .storemap {
    grid-template-columns: 1fr;
  }

  .storemap-map {
    min-height: 420px;
  }

  .storemap-map.is-expanded {
    inset: 8px;
  }

  .storemap-list {
    max-height: none;
  }
}
