/* Image lightbox: keep the close control easy to reach without covering a corner. */
body .site-image-lightbox .fancybox-toolbar {
  bottom: calc(56px + env(safe-area-inset-bottom));
  right: 50%;
  top: auto;
  transform: translateX(50%);
}

body .site-image-lightbox .fancybox-button--close {
  background: transparent url("../img/ui_btn_close.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 9px rgba(82, 142, 255, .22));
  height: 52px;
  opacity: .88;
  padding: 0;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
  width: 52px;
}

body .site-image-lightbox .fancybox-button--close svg {
  display: none;
}

body .site-image-lightbox .fancybox-button--close:hover,
body .site-image-lightbox .fancybox-button--close:focus-visible {
  filter: drop-shadow(0 0 12px rgba(82, 142, 255, .4));
  opacity: 1;
  transform: translateY(-2px);
}

body .site-image-lightbox .fancybox-button--close:focus-visible {
  outline: 1px solid rgba(82, 142, 255, .75);
  outline-offset: 5px;
}

@media (max-width: 575.98px) {
  body .site-image-lightbox .fancybox-toolbar {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  body .site-image-lightbox .fancybox-button--close {
    height: 48px;
    width: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .site-image-lightbox .fancybox-button--close {
    transition: none;
  }
}
