.imp-kuula-popup {
  position: absolute;
  z-index: 999999;
  box-sizing: border-box;
  min-height: 300px;
  height: calc(var(--imp-kuula-desktop-height, 600px) + 50px);
  max-height: calc(100vh - 24px);
  padding: 25px;
  overflow: visible;
  background: #242424;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .34);
}

.imp-kuula-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
}

.imp-kuula-popup-above::after {
  bottom: -13px;
  border-top: 13px solid #242424;
}

.imp-kuula-popup-below::after {
  top: -13px;
  border-bottom: 13px solid #242424;
}

.imp-kuula-popup-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.imp-kuula-popup iframe,
.imp-kuula-modal iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.imp-kuula-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #000;
  overscroll-behavior: contain;
}

.imp-kuula-modal.imp-kuula-mobile-viewport {
  inset: auto;
  width: var(--imp-kuula-mobile-viewport-width, 100vw);
  height: var(--imp-kuula-mobile-viewport-height, 100dvh);
  overflow: hidden;
}

.imp-kuula-modal-content {
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  background: #000;
}

.imp-kuula-mobile-viewport .imp-kuula-modal-content {
  height: var(--imp-kuula-mobile-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.imp-kuula-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1000000;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  cursor: pointer;
  font-size: 30px;
  line-height: 42px;
  text-align: center;
}

.imp-kuula-mobile-viewport .imp-kuula-close {
  position: absolute;
  top: -5px;
  right: max(92px, calc(env(safe-area-inset-right) + 92px));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
}

.imp-kuula-close:hover,
.imp-kuula-close:focus {
  background: rgba(32, 32, 32, .92);
  outline: 2px solid rgba(255, 255, 255, .65);
  outline-offset: 2px;
}
