
.hf-popup-banner {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1005;
  background-color: rgba(10, 10, 10, 0.5);
}

.hf-popup-banner--open {
  display: block;
}

body.hf-popup-banner-open {
  overflow: hidden;
}

.hf-popup-banner__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 2rem));
  max-height: 80vh;
  overflow: hidden;
  background-color: #fefefe;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Header: always visible, holds the heading and the close button. */

.hf-popup-banner__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid #e6e6e6;
}

.hf-popup-banner__heading {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.hf-popup-banner__close {
  margin-left: auto;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #8a8a8a;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.hf-popup-banner__close:hover,
.hf-popup-banner__close:focus {
  color: #0a0a0a;
  background-color: #e6e6e6;
}

/* Body: the only scrollable area. */

.hf-popup-banner__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
}

.hf-popup-banner__body > :last-child {
  margin-bottom: 0;
}

.hf-popup-banner__image-link {
  display: block;
}

.hf-popup-banner__body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.hf-popup-banner__body .field {
  margin-bottom: 1rem;
}

/* Footer: always visible, CTA aligned right. */

.hf-popup-banner__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e6e6e6;
  background-color: #fafafa;
}

.hf-popup-banner__footer .button {
  margin: 0;
}

.hf-popup-banner--mode-banner {
  inset: auto 0 0 0;
  background-color: transparent;
}

.hf-popup-banner--mode-banner .hf-popup-banner__dialog {
  position: static;
  transform: none;
  width: 100%;
  max-width: none;
  max-height: 60vh;
  border-radius: 0;
  border-top: 1px solid #e6e6e6;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
}

.hf-popup-banner--mode-banner.hf-popup-banner--open .hf-popup-banner__dialog {
  animation: hf-popup-banner-slide-up 0.35s ease-out;
}

@keyframes hf-popup-banner-slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-popup-banner--mode-banner.hf-popup-banner--open .hf-popup-banner__dialog {
    animation: none;
  }
}

/* One centred content column, no internal separators — like a consent bar. */

.hf-popup-banner--mode-banner .hf-popup-banner__header,
.hf-popup-banner--mode-banner .hf-popup-banner__body,
.hf-popup-banner--mode-banner .hf-popup-banner__footer {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hf-popup-banner--mode-banner .hf-popup-banner__header {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

.hf-popup-banner--mode-banner .hf-popup-banner__body {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.hf-popup-banner--mode-banner .hf-popup-banner__footer {
  border-top: 0;
  background-color: transparent;
  padding-top: 0.75rem;
}

/* Small screens: use the available height, tighter spacing. */

@media (max-width: 39.9375em) {
  .hf-popup-banner__dialog {
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }

  .hf-popup-banner__header,
  .hf-popup-banner__footer {
    padding: 0.875rem 1rem;
  }

  .hf-popup-banner__body {
    padding: 1rem;
  }
}
