.ha-ferienhaus-map {
  margin: 26px 0 34px;
}

.ha-ferienhaus-map__headline {
  margin: 0 0 14px;
  color: #183451;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.15;
}

.ha-ferienhaus-map__stage,
.ha-ferienhaus-map .brlbs-cmpnt-container {
  min-height: var(--ha-ferienhaus-map-height, 560px);
}

.ha-ferienhaus-map__stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 61, 88, .12);
  border-radius: 22px;
  background: linear-gradient(145deg, #f7fbfe 0%, #eaf3f8 100%);
  box-shadow: 0 18px 40px rgba(20, 53, 84, .08);
}

.ha-ferienhaus-map__canvas {
  width: 100%;
  height: var(--ha-ferienhaus-map-height, 560px);
  min-height: 320px;
}

.ha-map-cluster-panel {
  position: absolute;
  z-index: 5;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: hidden;
  border: 1px solid rgba(31, 61, 88, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 46px rgba(20, 53, 84, .2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.ha-map-cluster-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ha-map-cluster-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 13px 18px;
  border-bottom: 1px solid rgba(31, 61, 88, .1);
}

.ha-map-cluster-panel__title {
  margin: 0;
  color: #183451;
  font-size: 18px;
  line-height: 1.25;
}

.ha-map-cluster-panel__close {
  display: grid;
  flex: 0 0 36px;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px;
  aspect-ratio: 1;
  margin: 0;
  padding: 0 !important;
  place-items: center;
  border: 1px solid rgba(31, 61, 88, .12);
  border-radius: 50% !important;
  background: #f4f8fb;
  color: #183451;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.ha-map-cluster-panel__close:hover,
.ha-map-cluster-panel__close:focus-visible {
  border-color: #0879bf;
  background: #eaf5fb;
  outline: 3px solid rgba(8, 121, 191, .2);
  outline-offset: 1px;
}

.ha-map-cluster-panel__list {
  display: grid;
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ha-map-cluster-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 76px;
  overflow: hidden;
  border: 1px solid rgba(31, 61, 88, .1);
  border-radius: 13px;
  background: #fff;
  color: #183451;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ha-map-cluster-panel.is-opening .ha-map-cluster-card {
  pointer-events: none;
}

.ha-map-cluster-card:hover,
.ha-map-cluster-card:focus-visible {
  border-color: rgba(8, 121, 191, .42);
  color: #183451;
  outline: none;
  box-shadow: 0 8px 20px rgba(20, 53, 84, .1);
  transform: translateY(-1px);
}

.ha-map-cluster-card__image {
  width: 76px;
  height: 100%;
  min-height: 76px;
  object-fit: cover;
}

.ha-map-cluster-card__body {
  display: flex;
  min-width: 0;
  padding: 10px 12px;
  flex-direction: column;
  justify-content: center;
}

.ha-map-cluster-card__title {
  overflow: hidden;
  color: #183451;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ha-map-cluster-card__meta {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: #627a90;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ha-ferienhaus-map__status,
.ha-ferienhaus-map__noscript {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: min(440px, calc(100% - 40px));
  margin: 0;
  padding: 14px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(31, 61, 88, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: #425f78;
  text-align: center;
  box-shadow: 0 12px 28px rgba(20, 53, 84, .08);
}

.ha-ferienhaus-map__status.is-error {
  color: #8a4517;
}

.ha-ferienhaus-map-message {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid rgba(31, 61, 88, .12);
  border-radius: 14px;
  background: #f7fbfe;
  color: #425f78;
}

.ha-ferienhaus-map-message--admin {
  border-color: rgba(212, 108, 24, .24);
  background: #fff8f1;
  color: #754015;
}

.ha-map-popup {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  width: min(360px, 72vw);
  overflow: hidden;
  color: #183451;
}

.ha-map-popup__image {
  width: 112px;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  border-radius: 10px;
}

.ha-map-popup__body {
  padding: 4px 4px 4px 14px;
}

.ha-map-popup__title {
  margin: 0 0 7px;
  color: #183451;
  font-size: 18px;
  line-height: 1.2;
}

.ha-map-popup__meta {
  margin: 0 0 10px;
  color: #627a90;
  font-size: 13px;
  line-height: 1.45;
}

.ha-map-popup__link {
  color: #0879bf;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ha-map-popup__link:hover,
.ha-map-popup__link:focus-visible {
  color: #d65c00;
  text-decoration: underline;
}

.ha-ferienhaus-map .brlbs-cmpnt-content-blocker {
  overflow: hidden;
  border-radius: 22px;
}

@media (max-width: 767px) {
  .ha-ferienhaus-map {
    margin: 20px 0 28px;
  }

  .ha-ferienhaus-map__stage,
  .ha-ferienhaus-map .brlbs-cmpnt-container {
    min-height: 440px;
  }

  .ha-ferienhaus-map__canvas {
    height: 440px;
  }

  .ha-map-cluster-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100% - 20px);
    border-radius: 16px;
    transform: translateY(12px);
  }

  .ha-map-cluster-panel__header {
    padding: 13px 13px 11px 15px;
  }

  .ha-map-cluster-panel__title {
    font-size: 16px;
  }

  .ha-map-cluster-panel__list {
    padding: 9px;
  }

  .ha-map-cluster-card {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 66px;
  }

  .ha-map-cluster-card__image {
    width: 66px;
    min-height: 66px;
  }

  .ha-map-cluster-card__body {
    padding: 8px 10px;
  }

  .ha-map-cluster-card__title {
    font-size: 14px;
  }

  .ha-map-popup {
    grid-template-columns: 76px minmax(0, 1fr);
    width: min(285px, 74vw);
  }

  .ha-map-popup__image {
    width: 76px;
    min-height: 86px;
  }

  .ha-map-popup__body {
    padding-left: 10px;
  }

  .ha-map-popup__title {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-ferienhaus-map *,
  .ha-ferienhaus-map *::before,
  .ha-ferienhaus-map *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
