.agency-map-section {
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 52, 87, 0.1);
  margin: 0 auto 30px;
  max-width: 1320px;
  overflow: hidden;
  text-align: left;
}

.agency-map-heading {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 24px 26px 18px;
}

.agency-map-heading h2 {
  color: #12365a;
  font-size: 24px;
  margin: 0 0 6px;
}

.agency-map-heading p {
  color: #526b82;
  margin: 0;
}

.agency-map-filters {
  background: #edf3f8;
  border: 1px solid #d5e0ea;
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
}

.agency-map-filter {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #35516d;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 13px;
}

.agency-map-filter:hover,
.agency-map-filter:focus-visible {
  background: #fff;
  color: #0065b8;
  outline: 2px solid transparent;
}

.agency-map-filter.is-active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 59, 92, 0.13);
  color: #0065b8;
}

.agency-map-canvas,
.agency-map-placeholder {
  height: clamp(420px, 55vw, 620px);
  width: 100%;
}

.agency-map-canvas[hidden],
.agency-map-placeholder[hidden] {
  display: none;
}

.agency-map-placeholder {
  align-items: center;
  background: #eff4f8;
  display: flex;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.agency-map-placeholder-inner {
  max-width: 500px;
}

.agency-map-placeholder-icon {
  align-items: center;
  background: #0065b8;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  height: 54px;
  justify-content: center;
  margin-bottom: 14px;
  width: 54px;
}

.agency-map-placeholder strong {
  color: #12365a;
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.agency-map-placeholder p {
  color: #526b82;
  line-height: 1.55;
  margin: 0 auto 18px;
}

.agency-map-status {
  background: #f7f9fb;
  border-top: 1px solid #dce5ed;
  color: #526b82;
  display: block;
  font-size: 13px;
  min-height: 42px;
  padding: 12px 26px;
}

.agency-map-status.is-error {
  color: #9f2d2d;
}

.agency-map-marker-wrap {
  background: transparent;
  border: 0;
}

.agency-map-marker {
  align-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 6px;
  box-shadow: 0 4px 12px rgba(13, 43, 72, 0.35);
  display: flex;
  height: 30px;
  justify-content: center;
  transform: rotate(-45deg);
  width: 30px;
}

.agency-map-marker i {
  background: #fff;
  border-radius: 50%;
  display: block;
  height: 8px;
  width: 8px;
}

.agency-map-marker--agency {
  background: #0065b8;
}

.agency-map-marker--relay {
  background: #e7a900;
}

.agency-map-popup {
  color: #243d55;
  display: grid;
  gap: 7px;
  min-width: 210px;
}

.agency-map-popup-type {
  color: #0065b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.agency-map-popup strong {
  color: #12365a;
  font-size: 16px;
}

.agency-map-popup p {
  line-height: 1.45;
  margin: 0;
}

.agency-map-popup a {
  color: #0065b8;
  font-weight: 700;
}

.agency-map-popup-link {
  border-top: 1px solid #dce5ed;
  margin-top: 3px;
  padding-top: 8px;
}

.agency-map-section .leaflet-control-attribution {
  font-size: 11px;
}

#content .agency-map-section--detail {
  margin: 0;
  max-width: none;
  overflow: hidden;
  padding: 0;
}

.agency-map-section--detail .agency-map-heading {
  display: block;
  padding: 20px 22px 0;
}

.agency-map-section--detail .agency-map-heading h2 {
  text-transform: uppercase;
}

.agency-map-section--detail .agency-map-canvas,
.agency-map-section--detail .agency-map-placeholder {
  height: 380px;
}

.agency-map-section--detail .agency-map-placeholder {
  padding: 24px;
}

@media screen and (max-width: 770px) {
  .agency-map-section {
    margin-left: 3%;
    margin-right: 3%;
    width: 94%;
  }

  .agency-map-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .agency-map-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .agency-map-filter {
    font-size: 12px;
    min-width: 0;
    padding: 8px 5px;
  }

  .agency-map-canvas,
  .agency-map-placeholder {
    height: min(66vh, 520px);
    min-height: 390px;
  }

  .agency-map-status {
    padding: 12px 20px;
  }

  .agency-map-section--detail .agency-map-canvas,
  .agency-map-section--detail .agency-map-placeholder {
    height: 390px;
    min-height: 390px;
  }
}

