/* ============================================================
   AxessPharma — Carte Leaflet des pharmacies
   ============================================================ */

.ax-map-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  background: #fff;
  border: 1px solid #DBE4DC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,84,113, .08);
}
@media (max-width: 900px) {
  .ax-map-wrap { grid-template-columns: 1fr; }
  .ax-map { height: 380px !important; }
  .ax-map-sidebar { max-height: 480px; }
}
.ax-map {
  position: relative;
  background: #F6F8F5;
  z-index: 1;
}

/* Sidebar */
.ax-map-sidebar {
  display: flex;
  flex-direction: column;
  background: #FAFCFA;
  border-left: 1px solid #DBE4DC;
  max-height: 560px;
}
.ax-map-search {
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid #E8EFE9;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ax-map-search input {
  width: 100%;
  padding: 11px 16px 11px 38px;
  background: #F6F8F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B5E' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 12px center / 16px no-repeat;
  border: 1px solid #DBE4DC;
  border-radius: 999px;
  font-family: "Roboto", sans-serif;
  font-size: 0.92rem;
  color: #353535;
  outline: none;
  transition: border-color .2s;
}
.ax-map-search input:focus {
  border-color: #006E96;
  background-color: #fff;
}

.ax-map-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #BCC8BD transparent;
}
.ax-map-results::-webkit-scrollbar { width: 6px; }
.ax-map-results::-webkit-scrollbar-thumb { background: #BCC8BD; border-radius: 3px; }

.ax-map-item {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  margin-bottom: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: "Roboto", sans-serif;
  gap: 12px;
  align-items: flex-start;
}
.ax-map-item__logo {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0;
  opacity: .92;
  align-self: flex-start;
}
.ax-map-item__body {
  flex: 1;
  min-width: 0;
}
.ax-map-item__addr {
  display: block;
}
.ax-map-item__phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.8rem !important;
  color: #006E96 !important;
  font-weight: 600;
  font-family: "Lato", sans-serif;
}
.ax-map-item:hover {
  background: rgba(0,110,150, .06);
  border-color: rgba(0,110,150, .15);
}
.ax-map-item.is-active {
  background: rgba(0,110,150, .12);
  border-color: #006E96;
}
.ax-map-item strong {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  color: #181818;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.ax-map-item span {
  display: block;
  font-size: 0.82rem;
  color: #5C6B5E;
  line-height: 1.4;
}
.ax-map-item em {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(0,110,150, .1);
  color: #005471;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
}

.ax-map-empty {
  padding: 30px 18px;
  text-align: center;
  color: #8B9A8D;
  font-size: 0.9rem;
}

/* Custom marker pin (vert AxessPharma) */
.ax-map-pin {
  background: transparent;
  border: none;
}
.ax-map-pin__circle {
  position: relative;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #006E96, #005471);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s;
}
.ax-map-pin__circle svg {
  transform: rotate(45deg);
}
.ax-map-pin:hover .ax-map-pin__circle {
  transform: rotate(-45deg) scale(1.15);
}

/* Popup */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  padding: 4px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15) !important;
}
.leaflet-popup-content {
  margin: 14px 18px !important;
  font-family: "Roboto", sans-serif;
}
.ax-map-popup strong {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #181818;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.ax-map-popup__addr {
  font-size: 0.84rem;
  color: #5C6B5E;
  line-height: 1.5;
  margin-bottom: 6px;
}
.ax-map-popup__region {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0,110,150, .1);
  color: #005471;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 8px;
}
.ax-map-popup__hours {
  font-size: 0.8rem;
  color: #5C6B5E;
  margin-bottom: 8px;
}
.ax-map-popup__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #006E96;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background .2s;
}
.ax-map-popup__phone:hover {
  background: #005471;
}

/* Override leaflet z-index when in iframe */
.leaflet-pane,
.leaflet-control { z-index: 1 !important; }
.leaflet-top { z-index: 2 !important; }
