#besu-popup-root[hidden] {
  display: none !important;
}

.besu-popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.besu-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 15, var(--besu-popup-overlay-opacity, 0.72));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.besu-popup__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: min(90vh, 860px);
  overflow: auto;
  border-radius: 18px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  background: var(--color-cream, #f0ede3);
  color: var(--color-text, #1d2420);
}

.besu-popup.is-open .besu-popup__overlay {
  opacity: 1;
}

.besu-popup.is-open .besu-popup__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.besu-popup__panel--light {
  background: var(--color-cream, #f0ede3);
  color: var(--color-text, #1d2420);
}

.besu-popup__panel--dark {
  background: var(--color-sage, #5d675b);
  color: var(--color-cream, #f0ede3);
}

.besu-popup__panel--sm {
  width: min(100%, 480px);
}

.besu-popup__panel--md {
  width: min(100%, 680px);
}

.besu-popup__panel--lg {
  width: min(100%, 860px);
}

.besu-popup__panel--xl {
  width: min(100%, 1040px);
}

.besu-popup__panel--full {
  width: min(100%, 1200px);
}

.besu-popup__panel--align-center,
.besu-popup__panel--align-center .besu-popup__body,
.besu-popup__panel--align-center .besu-popup__actions {
  text-align: center;
  justify-content: center;
}

.besu-popup__panel--image-left,
.besu-popup__panel--image-right {
  display: grid;
  grid-template-columns: minmax(220px, 42%) minmax(0, 1fr);
}

.besu-popup__panel--image-right .besu-popup__media {
  order: 2;
}

.besu-popup__panel--image-right .besu-popup__content {
  order: 1;
}

.besu-popup__panel--image-background {
  overflow: hidden;
}

.besu-popup__panel--image-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.48)),
    var(--besu-popup-background-image, none) center/cover no-repeat;
  opacity: 0.28;
}

.besu-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(29, 36, 32, 0.12);
  border-radius: 999px;
  background: var(--color-cream, #f0ede3);
  color: var(--color-text, #1d2420);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.besu-popup__close:hover,
.besu-popup__close:focus-visible {
  background: #fbf8f0;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.besu-popup__close:focus-visible {
  outline: 2px solid var(--color-text, #1d2420);
  outline-offset: 2px;
}

.besu-popup__media {
  min-height: 220px;
  background: rgba(0, 0, 0, 0.04);
}

.besu-popup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.besu-popup__content {
  position: relative;
  z-index: 1;
  padding: 44px 34px 34px;
}

.besu-popup__headline {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 2vw, 2.5rem);
  line-height: 1.1;
  font-weight: 300;
}

.besu-popup__body {
  font-size: 1rem;
  line-height: 1.65;
}

.besu-popup__body p:first-child {
  margin-top: 0;
}

.besu-popup__body p:last-child {
  margin-bottom: 0;
}

.besu-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.besu-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.besu-popup__button:hover,
.besu-popup__button:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

.besu-popup__button--primary {
  background: var(--color-accent, #9f8c5a);
  color: #fff;
}

.besu-popup__button--secondary {
  border: 1px solid currentColor;
  color: inherit;
}

@media (max-width: 767.98px) {
  .besu-popup {
    padding: 12px;
  }

  .besu-popup__panel--image-left,
  .besu-popup__panel--image-right {
    grid-template-columns: 1fr;
  }

  .besu-popup__media {
    min-height: 180px;
  }

  .besu-popup__content {
    padding: 38px 20px 24px;
  }

  .besu-popup--mobile-hidden {
    display: none;
  }
}

@media (min-width: 768px) {
  .besu-popup--desktop-hidden {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .besu-popup__overlay,
  .besu-popup__panel,
  .besu-popup__close,
  .besu-popup__button {
    transition: none;
  }
}
