/**
 * Popup (/pomagam page and its subpages)
 *
 * Standalone stylesheet - it is enqueued directly and is not part of the
 * wpackio (assets/scss) bundle, so it can be edited without a rebuild.
 */

.fho-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.fho-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.fho-popup[hidden] {
  display: none;
}

.fho-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 2, 3, 0.55);
}

.fho-popup__dialog {
  position: relative;
  width: 100%;
  max-width: 800px;
  /* Keep the whole image on screen on short viewports. 1.56 is the aspect
     ratio of the shipped graphic (1600 x 1026). */
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(3, 2, 3, 0.2);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}

.fho-popup.is-visible .fho-popup__dialog {
  transform: translateY(0);
}

.fho-popup__link {
  display: block;
  text-decoration: none;
}

.fho-popup__image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: inherit;
}

.fho-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #d4d0d0;
  transition: color 0.3s ease;
}

.fho-popup__close:hover,
.fho-popup__close:focus-visible {
  color: #181718;
}

.fho-popup__close svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fho-popup__close svg g,
.fho-popup__close svg path {
  fill: currentColor;
}

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

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

  .fho-popup__dialog {
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }

  .fho-popup__close {
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fho-popup,
  .fho-popup__dialog {
    transition: none;
  }
}
