/* A local view of the same address remains behind the consent-gated embed. */
body.lively-site .contact-us [data-map-preview] {
  position: relative;
  isolation: isolate;
  background: #f7f6ef;
}

[data-map-preview] > .pw-map-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  background: #f7f6ef;
  pointer-events: none;
}

[data-map-preview] > .pw-map-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-map-preview] > iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Hide even before the observer attaches the loading state. */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

[data-map-preview][data-map-state='ready'] > iframe {
  opacity: 1;
  pointer-events: auto;
}

[data-map-preview] > .pw-map-placeholder {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  width: calc(100% - 32px);
  max-width: 420px;
  height: auto;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #d7ddd5;
  border-radius: 4px;
  background: rgb(250 249 243 / 97%);
  text-align: left;
  box-shadow: 0 2px 8px #1924220e;
}

[data-map-preview] > .pw-map-placeholder > svg {
  grid-column: 2;
  grid-row: 1;
  width: 24px;
  height: 24px;
  justify-self: end;
}

[data-map-preview] > .pw-map-placeholder strong {
  grid-column: 1;
  grid-row: 1;
}

[data-map-preview] > .pw-map-placeholder p,
[data-map-preview] > .pw-map-placeholder noscript {
  grid-column: 1 / -1;
}

[data-map-preview] > .pw-map-placeholder button {
  justify-self: start;
}

[data-map-preview] > .pw-map-placeholder a {
  justify-self: end;
}

[data-map-preview] > .pw-map-load-status {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  width: fit-content;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #d7ddd5;
  border-radius: 4px;
  background: #faf9f3;
  color: #354440;
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 2px 8px #1924220e;
}

[data-map-preview] > .pw-map-load-status[hidden] {
  display: none;
}
[data-map-preview] .pw-map-load-status a {
  color: #9e3619;
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  [data-map-preview] > .pw-map-placeholder {
    top: 10px;
    right: 10px;
    gap: 6px 10px;
    width: calc(100% - 20px);
    padding: 12px;
  }

  [data-map-preview] > .pw-map-placeholder button,
  [data-map-preview] > .pw-map-placeholder a {
    grid-column: 1 / -1;
    justify-self: start;
  }

  [data-map-preview] > .pw-map-load-status {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-map-preview][data-map-state] > iframe {
    transition: none;
  }
}
