.unidades-map {
  position: relative;
  width: 100%;
  margin-left: calc(50% - 50vw);
}

.unidades-map__svg-wrap {
  position: relative;
  width: min(100%, 1920px);
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
}

.unidades-map__svg {
  position: relative;
  width: 100%;
  height: auto;
}

.unidades-map__svg svg,
.unidades-map__svg img {
  display: block;
  width: 100%;
  height: auto;
}

.unidades-map__pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.unidades-map__pin {
  position: absolute;
  width: 23px;
  height: 27px;
  border: 0;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  transform-origin: 50% 100%;
  background: #2467cf;
  cursor: pointer;
  object-fit: contain;
  pointer-events: auto;
  transition: transform 0.22s ease, filter 0.22s ease;
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.25);
}

.unidades-map__pin::after {
  display: none;
}

.unidades-map__pin.is-active {
  transform: translate(-50%, -100%) rotate(-45deg) scale(1.1);
  filter: saturate(1.2) brightness(1.05);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32);
}

.unidades-map__pin.has-custom-icon {
  border-radius: 0;
  transform: translate(-50%, -100%);
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: none;
}

.unidades-map__pin.has-custom-icon.is-active {
  transform: translate(-50%, -100%) scale(1.1);
  background-color: transparent;
  filter: saturate(1.2) brightness(1.05);
}

.unidades-map__pin-label {
  position: absolute;
  transform: translate(10px, -86%);
  pointer-events: none;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 700;
  color: #2f3943;
  max-width: 100px;
  text-wrap: balance;
  text-align: center;
}

.unidades-map__legend--floating {
  position: absolute;
  left: 150px;
  top: 34px;
  z-index: 6;
  width: 340px;
  max-width: calc(100% - 68px);
  /* background: #0e4e97;
  border: 2px solid #0d4a90; */
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}
.unidades-map__legend--floating .cabecalho {
  border: 2px solid #00366D;
  border-radius: 14px 14px 0  0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background-color: #00366D;
  min-height: 68px;
  padding: 0 15px;
  justify-content: center;
}
.unidades-map__legend--floating .cabecalho h3{
  margin-bottom: 0;
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 12px;
}
.unidades-map__legend--floating .corpo{
  /* padding: 0 15px 15px; */
  /* margin-top: 20px; */
  border: 1px solid #bcbcbc
}
.unidades-map__legend--floating .info{
  background-color: #ffffff;
  padding: 20px 17px;
  /* border-radius: 10px; */
  /* margin-top: 25px; */
  text-align: left;
}
.unidades-map__legend--floating .info .estado{
  margin-bottom: 19px;
}
.unidades-map__legend--floating .info h3{
  color: #00366D;
  font-size: 0.75rem;
  margin-bottom: 0;
}

.unidades-map__legend--floating .info p{
  color: #3A3A39;
  padding-bottom: 0;
  font-size: 0.625rem;
  line-height: 1.5;
}
.unidades-map__legend--floating .info li{
  font-weight: 300;
  color: #3A3A39;
  font-size: 0.625rem;

}
.unidades-map__legend h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #fff;
}

.unidades-map__legend-map {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.unidades-map__legend-map img {
  display: block;
  width: 100%;
  height: auto;
}

.unidades-map__legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

.unidades-map__legend li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.unidades-map__legend li span {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex: 0 0 22px;
}

.unidades-map__popup {
  position: absolute;
  z-index: 7;
  width: min(555px, 62vw);
  max-height: 72vh;
  overflow: auto;
  background: #ececec;
  border: 2px solid #2467cf;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.unidades-map__link-line {
  position: absolute;
  z-index: 6;
  height: 2px;
  background: #2467cf;
  transform-origin: 0 0;
  pointer-events: none;
}

.unidades-map__card {
  display: grid;
  gap: 20px;
  border-bottom: 1px solid #d8d8d8;
}

.unidades-map__card:last-child {
  border-bottom: 0;
}
.unidades-map__card-pin-icon-container .unidades-map__card-title_box{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.unidades-map__card .bx-flex{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-bottom: 30px;
}
.unidades-map__card-head {
  display: flex;
  gap: 12px;
  align-items: space-around;
}

.unidades-map__card-pin-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}

.unidades-map__card img {
  display: block;
  width: 100%;
  aspect-ratio: 536 / 311;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
}
.unidades-map__card img.unidades-map__card-pin-icon {
  width: 34px;
  height: 45px;
  object-fit: contain;
  border-radius: 0;
}

.unidades-map__card-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #323232;
  font-weight: 600;
  max-width: 170px;
  padding-bottom: 5px;
}

.unidades-map__card-region,
.unidades-map__card-location {
  margin: 0;
  font-size: 0.875rem;
  color: #3A3A39;
  line-height: 1.5;
}

.unidades-map__card-link {
  display: inline-block;
  margin-top: 0;
  border: 2px solid #004C99;
  border-radius: 26px;
  padding: 5px 18px;
  color: #004C99;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  min-width: 239px;
  text-align: center;
}

.unidades-map__popup.is-multi {
  padding: 10px 30px 6px;
}

.unidades-map__popup.is-multi .unidades-map__card .bx-flex{
  flex-direction: column;
}
.unidades-map__popup.is-multi .unidades-map__card-head{
  width: 100%;
}
.unidades-map__popup.is-multi .unidades-map__card {
  grid-template-columns: 170px 1fr;
  gap: 20px;
  padding: 20px 0;
}

.unidades-map__popup.is-multi .unidades-map__card-head {
  gap: 8px;
  align-items: flex-start;
}

.unidades-map__popup.is-multi .unidades-map__card-pin-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.unidades-map__popup.is-multi .unidades-map__card > img {
  width: 210px;
  max-width: 100%;
  height: auto;
}

.unidades-map__popup.is-multi .unidades-map__card-title {
  font-size: 1.25rem;
  max-width: 100%;
}

.unidades-map__popup.is-multi .unidades-map__card-link {
  padding: 6px 14px;
  font-size: 0.75rem;
  min-width: 190px;
}

.unidades-map__popup.is-multi .unidades-map__card-link,
.unidades-map__popup.is-multi .unidades-map__card .bx-flex div:nth-child(2){
  width: 100%;
}
.unidades-map__popup.is-multi .unidades-map__card .bx-flex{
  margin-bottom: 0;
}

.unidades-map__card-link:hover {
  background: #004C99;
  color: #fff;
}

.unidades-map__empty {
  margin: 0;
  padding: 20px;
}

@media (max-width: 1024px) {
  .unidades-map__popup.is-multi .unidades-map__card-title{font-size: 1rem; text-align: left;}
  p:not(.has-background):last-of-type{font-size: 0.7rem; text-align: left;}
  .unidades-map__legend-map img{
    max-width: 250px;
    margin: 0 auto;
  }
  .unidades-map {
    margin-left: 0;
    width: 100%;
    padding: 0;
  }

  .unidades-map__svg-wrap {
    min-height: auto;
    overflow: visible;
  }

  .unidades-map__legend--floating {
    position: relative;
    left: auto;
    top: auto;
    z-index: 2;
    max-width: 100%;
    width: 100%;
    margin: 0 0 12px;
  }

  .unidades-map__popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(100%, 680px);
    max-height: 360px;
    margin: 0;
    padding: 10px 12px;
    z-index: 99999;
  }

  .unidades-map__link-line {
    display: none;
  }

  .unidades-map__card {
    grid-template-columns: 1fr;
  }

  .unidades-map__card img {
    width: 100%;
    height: auto;
  }

  .unidades-map__card-title {
    text-align: left;
    font-size: 1rem;
  }

  .unidades-map__pin-label {
    font-size: 10px;
    max-width: 120px;
    transform: translate(15px, -82%);
  }

  .unidades-map__popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #004c99;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }
}
