/* Distributor Network Map */

#map-wrapper {
  position: relative;
  width: 100%;
  height: 85vh;
  font-family: "AmorimSans-Medium", Arial, sans-serif;
  display: flex;
  flex-direction: row;
}

/* ── Sidebar ── */
#distributor-sidebar {
  width: 25%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid #e0e0e0;
  background: #fff;
}

.sidebar-card {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #e5e5e5;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.sidebar-card:hover,
.sidebar-card.active {
  background-color: #f5f8fb;
}

.sidebar-pin-col {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding: 16px 16px;
}

.sidebar-pin {
  width: 24px;
  height: 24px;
  color: #2e5a65;
}

.sidebar-card-content {
  flex: 1;
  min-width: 0;
  padding: 16px 16px 16px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-card-name {
  font-weight: 600;
	margin-bottom: 5px;
  font-size: 2rem;
  font-family: "AmorimSans-Medium", Arial, sans-serif;
  color: #222;
  line-height: 1.3;
}

.sidebar-card-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 6px;
  font-size: 1.6rem;
  color: #2e5a65;
  text-decoration: none;
  word-break: break-all;
}

.sidebar-card-link:hover {
  text-decoration: underline;
}

/* ── Map ── */
#distribution-network-map {
  flex: 1;
  height: 100%;
  z-index: 0;
}

/* ── Circle dot marker ── */
.map-marker {
  background: none !important;
  border: none !important;
}

.marker-dot {
  width: 14px;
  height: 14px;
  background-color: #2e5a65;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.map-marker:hover .marker-dot,
.map-marker.active .marker-dot {
  transform: scale(1.5);
  background-color: #000;
}

/* ── Popup (original finalized styles) ── */
.leaflet-popup-content-wrapper {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0;
  border-radius: 0;
}

.leaflet-popup-content {
  margin: 0;
  padding: 1.75rem 2.5rem 1.75rem 2.5rem;
  line-height: 1.4;
  min-width: 250px;
}

.leaflet-popup-tip {
  box-shadow: none;
}

.popup-name {
  font-weight: 500;
  font-size: 2rem;
  font-family: "AmorimSans-Medium";
  color: #000000;
  padding-right: 0.5rem;
  display: block;
  margin-bottom: 10px;
}

.leaflet-popup-close-button {
  top: 8px !important;
  right: 4px !important;
  width: 36px !important;
  height: 36px !important;
  font:
    20px/32px Tahoma,
    Verdana,
    sans-serif !important;
  color: #999 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.leaflet-popup-close-button:hover {
  color: #333 !important;
}

.popup-link {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
  font-family: "AmorimSans-Medium", Arial, sans-serif;

  color: #2e5a65 !important;
  text-decoration: none;
  word-break: break-all;
}

.popup-link:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  #map-wrapper {
    flex-direction: column;
    aspect-ratio: auto;
  }

  #distribution-network-map {
    order: 1;
    height: 55vw;
    min-height: 240px;
  }

  #distributor-sidebar {
    order: 2;
    width: 100%;
    height: 260px;
    min-height: 260px;
    border-right: none;
    border-top: 1px solid #e0e0e0;
  }
}
