:root {
  --popme-ink: #252329;
  --popme-muted: #68616f;
  --popme-paper: #faf8ff;
  --popme-line: #e8e2f4;
  --popme-yellow: #ffde59;
  --popme-yellow-dark: #e0bd2f;
  --popme-purple: #937ed1;
  --popme-purple-dark: #765fbb;
  --popme-white: #fff;
  --popme-shadow: 0 16px 46px rgba(92, 72, 148, 0.13);
}

.popme-demo-page {
  margin: 0;
  background: #f7f5fb;
}

.popme-demo-page main {
  padding: 34px 16px;
}

.popme-locator,
.popme-locator * {
  box-sizing: border-box;
}

.popme-locator {
  width: min(1280px, 100%);
  margin: 0 auto;
  color: var(--popme-ink);
  font-family: "Work Sans", Arial, sans-serif;
  line-height: 1.45;
}

.popme-locator button,
.popme-locator input {
  font: inherit;
}

.popme-locator__hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 62px);
  border-radius: 28px 28px 0 0;
  background: var(--popme-yellow);
}

.popme-locator__hero::after {
  position: absolute;
  top: -72px;
  right: -54px;
  width: 230px;
  height: 230px;
  border: 30px solid rgba(147, 126, 209, 0.24);
  border-radius: 50%;
  content: "";
}

.popme-locator__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: var(--popme-purple-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.popme-locator__title {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  font-family: "Anton", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.98;
  text-transform: uppercase;
}

.popme-locator__lead {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 18px 0 0;
  font-size: clamp(16px, 2vw, 19px);
}

.popme-locator__search-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  width: calc(100% - clamp(32px, 8vw, 104px));
  max-width: 1020px;
  margin: -26px auto 24px;
  padding: 14px;
  border: 1px solid var(--popme-line);
  border-radius: 18px;
  background: var(--popme-white);
  box-shadow: var(--popme-shadow);
}

.popme-locator__input-wrap {
  position: relative;
  min-width: 0;
}

.popme-locator__input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 21px;
  height: 21px;
  color: var(--popme-purple);
  transform: translateY(-50%);
  pointer-events: none;
}

.popme-locator__input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 49px;
  border: 1px solid var(--popme-line);
  border-radius: 12px;
  outline: 0;
  background: var(--popme-paper);
  color: var(--popme-ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.popme-locator__input:focus {
  border-color: var(--popme-purple);
  box-shadow: 0 0 0 4px rgba(147, 126, 209, 0.18);
}

.popme-locator__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.popme-locator__button:hover {
  transform: translateY(-1px);
}

.popme-locator__button:focus-visible,
.popme-store-card:focus-visible {
  outline: 3px solid rgba(147, 126, 209, 0.42);
  outline-offset: 2px;
}

.popme-locator__button--primary {
  background: var(--popme-purple);
  color: var(--popme-white);
  box-shadow: 0 8px 18px rgba(147, 126, 209, 0.3);
}

.popme-locator__button--primary:hover {
  background: var(--popme-purple-dark);
}

.popme-locator__button--secondary {
  border: 1px solid var(--popme-line);
  background: var(--popme-white);
  color: var(--popme-ink);
}

.popme-locator__button--secondary:hover {
  background: var(--popme-paper);
}

.popme-locator__button-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.popme-locator__status {
  min-height: 23px;
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto 12px;
  color: var(--popme-muted);
  font-size: 14px;
}

.popme-locator__status[data-state="error"] {
  color: #b81a14;
}

.popme-locator__body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--popme-line);
  border-radius: 0 0 28px 28px;
  background: var(--popme-white);
  box-shadow: var(--popme-shadow);
}

.popme-locator__map-wrap {
  position: relative;
  min-height: 650px;
  background: #ebe7f7;
}

.popme-locator__map {
  position: absolute;
  inset: 0;
}

.popme-locator__count {
  position: absolute;
  z-index: 500;
  top: 14px;
  left: 50%;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 22px rgba(44, 44, 44, 0.14);
  font-size: 13px;
  font-weight: 750;
  transform: translateX(-50%);
  white-space: nowrap;
}

.popme-locator__list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-left: 1px solid var(--popme-line);
  background: var(--popme-paper);
}

.popme-locator__list-heading {
  padding: 23px 23px 15px;
  border-bottom: 1px solid var(--popme-line);
  background: var(--popme-white);
}

.popme-locator__list-heading h2 {
  margin: 0;
  font-size: 20px;
}

.popme-locator__list-heading p {
  margin: 4px 0 0;
  color: var(--popme-muted);
  font-size: 13px;
}

.popme-locator__stores {
  overflow-y: auto;
  padding: 12px;
  scroll-behavior: smooth;
}

.popme-store-card {
  position: relative;
  width: 100%;
  margin: 0 0 10px;
  padding: 17px;
  border: 1px solid var(--popme-line);
  border-radius: 15px;
  background: var(--popme-white);
  color: var(--popme-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.popme-store-card:hover,
.popme-store-card.is-active {
  border-color: var(--popme-purple);
  box-shadow: 0 10px 24px rgba(44, 44, 44, 0.09);
  transform: translateY(-1px);
}

.popme-store-card.is-nearest::before {
  display: inline-block;
  margin: 0 0 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--popme-yellow);
  color: #332600;
  content: "Najbliższy sklep";
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.popme-store-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.popme-store-card__name {
  display: block;
  font-size: 17px;
  font-weight: 800;
}

.popme-store-card__distance {
  flex: 0 0 auto;
  color: var(--popme-purple-dark);
  font-size: 13px;
  font-weight: 800;
}

.popme-store-card__address {
  display: block;
  margin-top: 5px;
  color: var(--popme-muted);
  font-size: 14px;
}

.popme-store-card__approx {
  display: block;
  margin-top: 4px;
  color: #8f8070;
  font-size: 11px;
}

.popme-store-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.popme-store-card__route {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--popme-purple);
  color: var(--popme-white);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.popme-store-card__route:hover {
  background: var(--popme-purple-dark);
  color: var(--popme-white);
}

.popme-map-marker {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 4px solid var(--popme-white);
  border-radius: 50% 50% 50% 8px;
  background: var(--popme-purple);
  box-shadow: 0 5px 15px rgba(44, 44, 44, 0.28);
  color: var(--popme-yellow);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 17px;
  line-height: 1;
  transform: rotate(-45deg);
}

.popme-map-marker span {
  transform: rotate(45deg);
}

.popme-map-marker.is-nearest {
  background: var(--popme-yellow);
  color: var(--popme-purple-dark);
}

.popme-user-marker {
  width: 18px;
  height: 18px;
  border: 4px solid var(--popme-white);
  border-radius: 50%;
  background: #1976d2;
  box-shadow: 0 0 0 8px rgba(25, 118, 210, 0.18);
}

.popme-locator .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(44, 44, 44, 0.18);
}

.popme-locator .leaflet-popup-content {
  min-width: 190px;
  margin: 15px 17px;
  font-family: "Work Sans", Arial, sans-serif;
}

.popme-popup__name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.popme-popup__address {
  margin: 0 0 10px;
  color: var(--popme-muted);
  font-size: 13px;
}

.popme-popup__route {
  color: var(--popme-purple-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.popme-popup__route:hover {
  text-decoration: underline;
}

.popme-locator .leaflet-control-attribution {
  font-size: 10px;
}

.popme-locator__noscript,
.popme-locator__fatal {
  padding: 28px;
  border: 1px solid #fad2d1;
  border-radius: 16px;
  background: #fce9e8;
  color: #5c0d0a;
}

/* Zwarta wersja przeznaczona do osadzenia na stronie głównej sklepu. */
.popme-home-page main {
  padding: 16px;
}

.popme-locator--compact {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--popme-line);
  border-radius: 28px;
  background: var(--popme-white);
  box-shadow: var(--popme-shadow);
}

.popme-locator--compact .popme-locator__map-wrap {
  min-height: 540px;
}

.popme-locator__compact-panel {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--popme-white);
}

.popme-locator--compact .popme-locator__hero {
  padding: 32px 28px 22px;
  border-radius: 0;
}

.popme-locator--compact .popme-locator__hero::after {
  top: -112px;
  right: -92px;
}

.popme-locator--compact .popme-locator__title {
  font-size: clamp(34px, 3.5vw, 46px);
}

.popme-locator--compact .popme-locator__lead {
  margin-top: 12px;
  font-size: 15px;
}

.popme-locator--compact .popme-locator__search-panel {
  grid-template-columns: 1fr 1fr;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 20px 28px 12px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.popme-locator--compact .popme-locator__input-wrap {
  grid-column: 1 / -1;
}

.popme-locator--compact .popme-locator__button {
  min-height: 46px;
  padding: 0 12px;
  font-size: 13px;
}

.popme-locator--compact .popme-locator__status {
  width: auto;
  max-width: none;
  margin: 0 28px 18px;
}

.popme-locator--compact .popme-locator__list-panel {
  display: none;
}

@media (max-width: 900px) {
  .popme-home-page main {
    padding: 0;
  }

  .popme-locator--compact {
    grid-template-columns: 1fr;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .popme-locator--compact .popme-locator__compact-panel {
    order: -1;
  }

  .popme-locator--compact .popme-locator__map-wrap {
    min-height: 390px;
  }
}

@media (max-width: 520px) {
  .popme-locator--compact .popme-locator__hero {
    padding: 30px 20px 24px;
  }

  .popme-locator--compact .popme-locator__title {
    font-size: 36px;
  }

  .popme-locator--compact .popme-locator__search-panel {
    padding: 20px 16px 12px;
  }

  .popme-locator--compact .popme-locator__status {
    margin: 0 16px 20px;
  }
}

@media (max-width: 900px) {
  .popme-locator__body {
    grid-template-columns: 1fr;
  }

  .popme-locator__map-wrap {
    min-height: 470px;
  }

  .popme-locator__list-panel {
    border-top: 1px solid var(--popme-line);
    border-left: 0;
  }

  .popme-locator__stores {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .popme-demo-page main {
    padding: 0;
  }

  .popme-locator__hero {
    border-radius: 0;
  }

  .popme-locator__search-panel {
    grid-template-columns: 1fr 1fr;
    width: calc(100% - 24px);
    margin-top: -20px;
    padding: 10px;
  }

  .popme-locator__input-wrap {
    grid-column: 1 / -1;
  }

  .popme-locator__button {
    min-height: 48px;
    padding: 0 13px;
    font-size: 13px;
  }

  .popme-locator__body {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .popme-locator__map-wrap {
    min-height: 420px;
  }
}

@media (max-width: 410px) {
  .popme-locator__search-panel {
    grid-template-columns: 1fr;
  }

  .popme-locator__input-wrap {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popme-locator *,
  .popme-locator *::before,
  .popme-locator *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
