.jmos-ad-slot[hidden],
.jmos-ad-map-host[hidden] {
  display: none !important;
}

.jmos-ad-slot {
  width: min(100%, 1120px);
  margin: 0 auto 22px;
  padding: 0 20px;
}

.jmos-ad {
  position: relative;
  display: grid;
  grid-template-columns: minmax(90px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(29, 24, 18, .18);
  border-radius: 14px;
  background: #fff;
  color: #1d1812;
  box-shadow: 0 10px 30px rgba(20, 20, 20, .11);
}

.jmos-ad__label {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #1d1812;
  color: #fff;
  font-size: .72rem;
  letter-spacing: .04em;
}

.jmos-ad__image {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.jmos-ad__link {
  min-width: 0;
  padding: 18px 14px 4px;
  color: #6d4d12;
  font-weight: 800;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.jmos-ad__partner {
  grid-column: 2;
  padding: 0 14px 15px;
  color: #66594c;
  font-size: .84rem;
}

.jmos-ad--creative-missing {
  grid-template-columns: 1fr;
  padding-top: 18px;
}

.jmos-ad--creative-missing .jmos-ad__partner {
  grid-column: 1;
}

.jmos-ad-map-host {
  position: absolute;
  z-index: 650;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(82px, 12vh, 132px) clamp(86px, 12vw, 190px) clamp(96px, 14vh, 160px);
  pointer-events: none;
  opacity: var(--jmos-ad-zoom-opacity, 1);
  visibility: visible;
  transition: opacity 420ms ease, visibility 0s linear 0s;
}

.jmos-ad-map-host.is-zoom-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}

.jmos-ad--regional_map_overlay {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 9px;
  width: min(46vw, 520px);
  max-width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  text-align: center;
  transform: scale(var(--jmos-ad-zoom-scale, 1));
  transform-origin: center;
  transition: transform 420ms ease;
}

.jmos-ad--regional_map_overlay .jmos-ad__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(32vh, 270px);
  border-radius: 0;
  object-fit: contain;
  opacity: var(--jmos-ad-opacity, .82);
  filter: drop-shadow(0 16px 24px rgba(14, 20, 26, .28));
  pointer-events: none;
}

.jmos-ad--regional_map_overlay .jmos-ad__label {
  position: static;
  justify-self: center;
  padding: 4px 9px;
  background: rgba(29, 24, 18, .88);
  box-shadow: 0 5px 16px rgba(14, 20, 26, .2);
}

.jmos-ad--regional_map_overlay .jmos-ad__link,
.jmos-ad--regional_map_overlay .jmos-ad__partner {
  grid-column: 1;
  justify-self: center;
  max-width: min(100%, 430px);
  margin: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 18px rgba(14, 20, 26, .18);
  backdrop-filter: blur(8px);
}

.jmos-ad--regional_map_overlay .jmos-ad__link {
  color: #49340e;
  font-size: .88rem;
  pointer-events: auto;
}

.jmos-ad--regional_map_overlay .jmos-ad__partner {
  color: #514b43;
  font-size: .76rem;
}

.jmos-ad__close {
  position: absolute;
  z-index: 4;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(29, 24, 18, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #111;
  box-shadow: 0 6px 18px rgba(14, 20, 26, .2);
  font-size: 1.5rem;
  cursor: pointer;
  pointer-events: auto;
}

@media (max-width: 620px) {
  .jmos-ad-slot {
    padding: 0 12px;
  }

  .jmos-ad:not(.jmos-ad--regional_map_overlay) {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 7px;
  }

  .jmos-ad:not(.jmos-ad--regional_map_overlay) .jmos-ad__image {
    height: 96px;
  }

  .jmos-ad:not(.jmos-ad--regional_map_overlay) .jmos-ad__link,
  .jmos-ad:not(.jmos-ad--regional_map_overlay) .jmos-ad__partner {
    padding-right: 7px;
    font-size: .88rem;
  }

  .jmos-ad-map-host {
    padding: 92px 24px 146px 68px;
  }

  .jmos-ad--regional_map_overlay {
    width: min(68vw, 320px);
  }

  .jmos-ad--regional_map_overlay .jmos-ad__image {
    max-height: min(24vh, 190px);
  }

  .jmos-ad--regional_map_overlay .jmos-ad__link {
    max-width: 260px;
    font-size: .78rem;
  }

  .jmos-ad__close {
    top: -10px;
    right: -10px;
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jmos-ad-map-host,
  .jmos-ad--regional_map_overlay {
    transition: none;
  }
}
