.map-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
}

@media (min-width: 768px) {
  .map-page {
    flex-direction: row;
    align-items: stretch;
    height: calc(100vh - var(--header-h));
    max-height: 900px;
  }
}

.map-sidebar {
  flex: 0 0 auto;
  padding: var(--space-4);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-line);
  max-height: 45vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .map-sidebar {
    width: 300px;
    max-height: none;
    border-bottom: none;
    border-right: 1px solid var(--color-line);
  }
}

@media (min-width: 1280px) {
  .map-sidebar {
    width: 340px;
  }
}

.map-wrap {
  flex: 1;
  min-height: 50vh;
  position: relative;
}

#map-root,
.city-mini-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: var(--radius-lg);
  z-index: 1;
}

.city-mini-map {
  min-height: 280px;
  border: 1px solid var(--color-line);
}

.map-filters-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  min-width: 220px;
}

.map-popup__img {
  height: 120px;
  background-size: cover;
  background-position: center;
}

.map-popup__body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.map-popup__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 var(--space-2);
}

.map-popup__btn {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-terracotta);
  text-decoration: none;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(30, 58, 95, 0.75);
  border: 2px solid #fff;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(196, 92, 62, 0.9);
  color: #fff;
  font-weight: 700;
}

.route-map-block {
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-5) 0;
  border: 1px solid var(--color-line);
}

@media (min-width: 768px) {
  .route-map-block {
    height: 420px;
  }
}
