.hbd-retreat-popup,
.hbd-retreat-popup * {
  box-sizing: border-box;
}

.hbd-retreat-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(28, 18, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: hbd-retreat-popup-fade 240ms ease-out both;
}

.hbd-retreat-popup__dialog {
  position: relative;
  display: grid;
  grid-template-columns: 61% 39%;
  width: min(860px, 100%);
  max-height: min(90dvh, 620px);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(189, 125, 8, 0.18);
  border-radius: 17px;
  background: #fcfaf6;
  color: #1c1200;
  box-shadow: 0 34px 100px rgba(20, 13, 2, 0.48);
  animation: hbd-retreat-popup-rise 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hbd-retreat-popup__media {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  background: #183c39;
}

.hbd-retreat-popup__media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 68%, rgba(16, 15, 10, 0.18));
}

.hbd-retreat-popup__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 1200ms ease, transform 6700ms ease;
}

.hbd-retreat-popup__slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.hbd-retreat-popup__slide:nth-child(1) { object-position: 50% 50%; }
.hbd-retreat-popup__slide:nth-child(2) { object-position: 48% 62%; }
.hbd-retreat-popup__slide:nth-child(3) { object-position: 48% 52%; }
.hbd-retreat-popup__slide:nth-child(4) { object-position: 52% 64%; }
.hbd-retreat-popup__slide:nth-child(5) { object-position: 50% 62%; }

.hbd-retreat-popup__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 47px 35px 34px;
  background: #fcfaf6;
}

.hbd-retreat-popup__close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ece4d7;
  color: #40382f;
  font: 16px/1 Inter, -apple-system, system-ui, sans-serif;
  cursor: pointer;
}

.hbd-retreat-popup__close:hover {
  background: #e2d6c4;
}

.hbd-retreat-popup__close:focus-visible,
.hbd-retreat-popup input:focus-visible,
.hbd-retreat-popup__submit:focus-visible {
  outline: 3px solid rgba(31, 138, 134, 0.3);
  outline-offset: 2px;
}

.hbd-retreat-popup h2 {
  max-width: 280px;
  margin: 0 0 19px;
  color: #1c1200;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.hbd-retreat-popup__facts {
  display: grid;
  gap: 5px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5d8bc;
}

.hbd-retreat-popup__location {
  color: #1f8a86;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.hbd-retreat-popup__date {
  color: #62594e;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.hbd-retreat-popup__form {
  display: grid;
  gap: 9px;
}

.hbd-retreat-popup input {
  width: 100%;
  height: 43px;
  padding: 0 14px;
  border: 1px solid #dfd3c0;
  border-radius: 9px;
  outline: none;
  background: #fffdfa;
  color: #1c1200;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 13px;
}

.hbd-retreat-popup input:focus {
  border-color: #1f8a86;
}

.hbd-retreat-popup input[aria-invalid="true"] {
  border-color: #b6533e;
}

.hbd-retreat-popup__submit {
  min-height: 45px;
  margin-top: 1px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: #1f8a86;
  color: #fcfaf6;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.hbd-retreat-popup__submit:hover {
  background: #176b67;
}

.hbd-retreat-popup__submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hbd-retreat-popup__message {
  min-height: 17px;
  margin: 0;
  color: #176b67;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.hbd-retreat-popup__message.is-error {
  color: #9a3f2d;
}

.hbd-retreat-popup__note {
  margin: 3px 0 0;
  color: #82786c;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}

.hbd-retreat-popup__success-label {
  display: block;
  margin-bottom: 12px;
  color: #1f8a86;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hbd-retreat-popup__success p {
  margin: 0;
  color: #62594e;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.hbd-retreat-popup__sr-only,
.hbd-retreat-popup__trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes hbd-retreat-popup-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hbd-retreat-popup-rise {
  from { opacity: 0; transform: translateY(9px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  .hbd-retreat-popup {
    align-items: center;
    padding: 16px;
  }

  .hbd-retreat-popup__dialog {
    grid-template-columns: 1fr;
    width: min(460px, 100%);
    min-height: 0;
    max-height: 92dvh;
    overflow-y: auto;
  }

  .hbd-retreat-popup__media {
    min-height: 220px;
  }

  .hbd-retreat-popup__content {
    padding: 31px 26px 27px;
  }

  .hbd-retreat-popup h2 {
    max-width: calc(100% - 28px);
    margin-bottom: 15px;
    font-size: 26px;
  }

  .hbd-retreat-popup__facts {
    margin-bottom: 18px;
    padding-bottom: 15px;
  }

  .hbd-retreat-popup__close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  .hbd-retreat-popup__media {
    min-height: 180px;
  }

  .hbd-retreat-popup__content {
    padding: 27px 22px 22px;
  }

  .hbd-retreat-popup h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hbd-retreat-popup,
  .hbd-retreat-popup__dialog {
    animation: none;
  }

  .hbd-retreat-popup__slide {
    display: none;
    transition: none;
    transform: none;
  }

  .hbd-retreat-popup__slide:first-child {
    display: block;
    opacity: 1;
  }
}
