.eh-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  padding: 1rem;
}

.eh-popup[hidden] {
  display: none !important;
}

.eh-popup.is-open {
  display: flex;
}

.eh-popup__overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--eh-popup-overlay-opacity, 0.5);
  backdrop-filter: blur(4px);
}

.eh-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(var(--eh-popup-width, 50%), calc(100vw - 2rem));
  height: var(--eh-popup-height, 500px);
  max-height: calc(100vh - 2rem);
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  color: #231f20;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: eh-popup-fade-in 0.35s ease;
}

.eh-popup.is-closing .eh-popup__dialog {
  animation: eh-popup-fade-out 0.35s ease forwards;
}

@keyframes eh-popup-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes eh-popup-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.eh-popup__layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.eh-popup__media {
  flex: 0 0 50%;
  width: 50%;
  min-height: 0;
  background-color: #000;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.eh-popup__body {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  margin-top: 2rem;
  padding: 0 3rem;
  background: #fff;
  text-align: center;
  box-sizing: border-box;
}

/* Matches Popup Box close-icon-3 placement on the modal (top-right of content panel). */
.eh-popup__close-container {
  position: absolute !important;
  top: 14px !important;
  right: 30px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 10;
  margin: 0;
  padding: 0;
}

.eh-popup__close {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-family: inherit;
  line-height: 0;
  cursor: pointer;
  transform: scale(1);
  appearance: none;
  -webkit-appearance: none;
}

.eh-popup__close-btn {
  display: block;
  padding: 0;
  line-height: 0;
}

.eh-popup__close-img {
  display: block;
  width: 30px;
  height: 30px;
  max-width: none;
}

.eh-popup__headline {
  font-family: "Futura Hv BT", "Futura BT", sans-serif;
  line-height: 1;
  font-size: 40px;
  text-align: center;
  width: 100%;
}

.eh-popup__headline h1,
.eh-popup__headline h2,
.eh-popup__headline p {
  margin: 0;
  font: inherit;
  text-align: center;
  color: #231f20;
}

.eh-popup__cta-wrap {
  margin: 3rem 0 0;
  text-align: center;
  width: 100%;
}

.eh-popup__cta {
  display: inline-block;
  border: 1px solid #231f20;
  font-family: "Futura Bk BT", "Futura BT", sans-serif;
  padding: 1rem 3rem;
  font-size: 1rem;
  color: #231f20;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.eh-popup__cta:hover {
  background: #231f20;
  color: #fff;
}

body.eh-popup-open {
  overflow: hidden;
}

/* Tablet landscape (set via .is-tablet-landscape from popup.js; MQ fallback below) */
.eh-popup.is-tablet-landscape .eh-popup__dialog {
  --eh-popup-width: 75% !important;
  width: 75% !important;
  max-width: calc(100vw - 2rem) !important;
  max-height: calc(100vh - 2rem);
}

@media screen and (orientation: landscape) and (min-width: 768px) and (max-width: 1366px) and (max-height: 900px) {
  .eh-popup__dialog {
    --eh-popup-width: 75% !important;
    width: 75% !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 2rem);
  }
}

/* Portrait tablet (incl. iPad 768px): image left, content right */
@media screen and (max-width: 1024px) and (orientation: portrait) {
  .eh-popup__dialog {
    width: 95vw;
    max-width: 95vw;
    max-height: calc(100vh - 2rem);
  }

  .eh-popup__layout {
    flex-direction: row;
  }

  .eh-popup__media {
    flex: 0 0 50%;
    width: 50%;
    min-height: 0;
  }

  .eh-popup__body {
    flex: 0 0 50%;
    width: 50%;
    margin-top: 2rem;
    padding: 0 1.5rem;
  }

  .eh-popup__headline {
    font-size: 32px;
  }

  .eh-popup__cta-wrap {
    margin-top: 2rem;
  }

  .eh-popup__close-container {
    right: 1rem !important;
  }
}

/* Small phones: stacked layout */
@media screen and (max-width: 767px) {
  .eh-popup__dialog {
    width: 95vw;
    max-width: 95vw;
    height: auto;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .eh-popup__layout {
    flex-direction: column;
  }

  .eh-popup__media {
    flex: 0 0 auto;
    width: 100%;
    min-height: 400px;
  }

  .eh-popup__body {
    flex: 1 1 auto;
    width: 100%;
    margin-top: 0;
    padding: 1rem 1rem 2rem;
  }

  .eh-popup__headline {
    font-size: 27px;
  }

  .eh-popup__cta-wrap {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
  }

  .eh-popup__close-container {
    top: 14px !important;
    right: 1rem !important;
  }
}
