/**
 * @file
 * Corner popup advertisement. Viewport-fixed; does not cover the page.
 */

.nellu-ad-popup {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

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

.nellu-ad-popup__dialog {
  position: relative;
}

.nellu-ad-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.nellu-ad-popup__close:focus-visible {
  outline: 2px solid #c1121f;
  outline-offset: 2px;
}

.nellu-ad-popup__content .advertisement,
.nellu-ad-popup__content .field--name-field-ad-image,
.nellu-ad-popup__content img {
  display: block;
  margin: 0;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.nellu-ad-popup__content a {
  display: block;
  max-width: 100%;
}

@media (max-width: 768px) {
  .nellu-ad-popup {
    right: 12px;
    bottom: 12px;
    width: min(260px, calc(100vw - 24px));
  }
}
