/* Balões das instalações: mantém o botão nativo de fechamento do Google Maps.
   O seletor usa o identificador gerado pelo google_maps_flutter_web. */
.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) {
  background: rgb(255 255 255 / 80%) !important;
  padding: 12px !important;
  max-width: min(320px, calc(100vw - 32px)) !important;
}

/* A seta acompanha a transparência do cartão. */
.gm-style .gm-style-iw-t:has([id^="gmaps-marker-facility:"]) .gm-style-iw-tc::after {
  background: rgb(255 255 255 / 80%) !important;
}

/* Retira a linha vazia do cabeçalho sem remover seu botão nativo. */
.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-style-iw-chr {
  height: 0;
  min-height: 0;
}

.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-style-iw-ch {
  padding: 0;
}

.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-ui-hover-effect {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  color: #214d38 !important;
}

/* O X não depende do carregamento da imagem externa do Google. */
.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-ui-hover-effect > * {
  display: none !important;
}

.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-ui-hover-effect::after {
  content: "×";
  font: 26px/1 Arial, sans-serif;
}

.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-ui-hover-effect:focus-visible {
  outline: 2px solid #214d38;
  outline-offset: -3px;
}

.gm-style .gm-style-iw-c:has([id^="gmaps-marker-facility:"]) .gm-style-iw-d {
  overflow: auto !important;
}

.gm-style [id^="gmaps-marker-facility:"] .infowindow-title {
  margin: 0 24px 6px 0;
  font-size: 14px;
  line-height: 1.35;
}

.gm-style [id^="gmaps-marker-facility:"] .infowindow-snippet {
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
