/* =============================================================
   store-map.css — Styles for the Sweden store locator map
   Compatible with Bootstrap 3.3.5
   ============================================================= */

/* ── Map container ─────────────────────────────────────────── */
#store-map {
  width: 100%;
  height: 520px;
  border-radius: 4px;
  border: 1px solid #ddd;
  position: relative;
  z-index: 0; /* keep below Bootstrap dropdowns/modals */
  background: #e8e0d8;
}

/* ── Geolocation button ─────────────────────────────────────── */
.store-map-locate-btn {
  position: absolute;
  bottom: 30px;
  right: 10px;
  z-index: 1000;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 5px rgba(0,0,0,0.15);
  transition: background 0.15s ease;
  line-height: 1;
}
.store-map-locate-btn:hover {
  background: #f4f4f4;
}
.store-map-locate-btn svg {
  display: block;
  width: 18px;
  height: 18px;
}
.store-map-locate-btn.locating svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Leaflet popup overrides ────────────────────────────────── */
.store-map-popup .leaflet-popup-content-wrapper {
  border-radius: 6px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.2);
  padding: 0;
}
.store-map-popup .leaflet-popup-content {
  margin: 0;
  min-width: 180px;
}
.store-map-popup .leaflet-popup-tip {
  background: #fff;
}

/* Popup inner layout */
.smp-popup {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.smp-popup-header {
  background: #fff;
  color: #672230;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}
.smp-popup-title-link {
  color: #672230;
  text-decoration: none;
  display: block;
}
.smp-popup-title-link:hover {
  text-decoration: underline;
  color: #4a1722;
}

/* ── Marker cluster styles ──────────────────────────────────── */

/* Wrapper div — Leaflet sizes this, we keep it transparent */
.smp-cluster {
  background: transparent !important;
  border: none !important;
}

/* Inner circle — carries all visual styling */
.smp-cluster-inner {
  border-radius: 50%;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease;
  font-family: inherit;
}
.smp-cluster:hover .smp-cluster-inner {
  transform: scale(1.12);
}

/* ── Small: 2–10 — Yellow/Gold ── */
.smp-cluster-small .smp-cluster-inner {
  width: 34px;
  height: 34px;
  font-size: 12px;
  background: #F5C518;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.30),
              0 2px 6px rgba(0,0,0,0.20);
}

/* ── Medium: 11–99 — Blue ── */
.smp-cluster-medium .smp-cluster-inner {
  width: 44px;
  height: 44px;
  font-size: 14px;
  color: #fff;
  background: #2A7AE4;
  box-shadow: 0 0 0 4px rgba(42, 122, 228, 0.28),
              0 2px 8px rgba(0,0,0,0.22);
}

/* ── Large: 100+ — Red with pulse ring ── */
.smp-cluster-large .smp-cluster-inner {
  width: 56px;
  height: 56px;
  font-size: 16px;
  color: #fff;
  background: #E8372A;
  box-shadow: 0 0 0 5px rgba(232, 55, 42, 0.25),
              0 3px 10px rgba(0,0,0,0.25);
  animation: smp-cluster-pulse 2s ease-in-out infinite;
}

@keyframes smp-cluster-pulse {
  0%, 100% {
    box-shadow: 0 0 0 5px rgba(232, 55, 42, 0.25),
                0 3px 10px rgba(0,0,0,0.25);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(232, 55, 42, 0.10),
                0 3px 10px rgba(0,0,0,0.25);
  }
}

/* ── User location marker ───────────────────────────────────── */
.smp-user-marker {
  width: 16px !important;
  height: 16px !important;
  margin-left: -8px !important;
  margin-top: -8px !important;
  border-radius: 50%;
  background: #2A7AE4;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(42, 122, 228, 0.35), 0 2px 6px rgba(0,0,0,0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(42,122,228,0.35), 0 2px 6px rgba(0,0,0,0.25); }
  50%       { box-shadow: 0 0 0 8px rgba(42,122,228,0.12), 0 2px 6px rgba(0,0,0,0.25); }
}

/* ── Toast notification ─────────────────────────────────────── */
.smp-toast {
  position: absolute;
  bottom: 72px;
  right: 10px;
  z-index: 1001;
  background: rgba(40,40,40,0.88);
  color: #fff;
  padding: 7px 13px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  max-width: 220px;
  line-height: 1.4;
}
.smp-toast.smp-toast-visible {
  opacity: 1;
}
.smp-toast.smp-toast-error {
  background: rgba(180,30,30,0.9);
}
