/**
 * Joomla Simple Image Gallery Free Compatibility
 * Version: 1.1.0
 * License: GPL-2.0-or-later
 */

.jsgf-container,
ul.sigFreeClassic.jsgf-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--jsgf-gap, 8px);
  clear: both;
  overflow: hidden;
  margin: 8px auto;
  padding: 8px 0;
  list-style: none;
}

.jsgf-container .jsgf-thumb,
ul.sigFreeClassic.jsgf-container li.sigFreeThumb,
.jsgf-thumb {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
}

.jsgf-link,
.jsgf-link:hover,
ul.sigFreeClassic.jsgf-container li.sigFreeThumb a.sigFreeLink {
  display: block;
  position: relative;
  width: var(--jsgf-thumb-width, 360px);
  height: var(--jsgf-thumb-height, 240px);
  overflow: hidden;
  background: #000;
  border: 0;
  line-height: 0;
  text-decoration: none;
}

.jsgf-img,
ul.sigFreeClassic.jsgf-container li.sigFreeThumb a.sigFreeLink img.sigFreeImg {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  transition: opacity 160ms ease-in-out, transform 160ms ease-in-out;
}

.jsgf-link:hover .jsgf-img,
.jsgf-link:focus .jsgf-img {
  opacity: .72;
  transform: scale(1.015);
}

.jsgf-link::after {
  content: "⌕";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 34px;
  line-height: 45px;
  text-align: center;
  opacity: 0;
  transform: scale(.92);
  transition: opacity 160ms ease-in-out, transform 160ms ease-in-out;
}

.jsgf-link:hover::after,
.jsgf-link:focus::after {
  opacity: 1;
  transform: scale(1);
}

.jsgf-clear,
li.sigFreeClear.jsgf-clear {
  flex-basis: 100%;
  clear: both;
  height: 0;
  line-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.jsgf-admin-warning {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid #d63638;
  background: #fff5f5;
  color: #1d2327;
}

.jsgf-lightbox-open {
  overflow: hidden;
}

.jsgf-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, .88);
}

.jsgf-lightbox[hidden] {
  display: none;
}

.jsgf-lightbox__image {
  display: block;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  box-shadow: 0 12px 50px rgba(0, 0, 0, .55);
}

.jsgf-lightbox__caption {
  position: absolute;
  right: 30px;
  bottom: 18px;
  left: 30px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.jsgf-lightbox__button {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.jsgf-lightbox__button:hover,
.jsgf-lightbox__button:focus {
  background: rgba(255, 255, 255, .28);
  outline: none;
}

.jsgf-lightbox__close {
  top: 18px;
  right: 18px;
}

.jsgf-lightbox__prev {
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
}

.jsgf-lightbox__next {
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .jsgf-container,
  ul.sigFreeClassic.jsgf-container {
    gap: var(--jsgf-gap, 8px);
  }

  .jsgf-link,
  ul.sigFreeClassic.jsgf-container li.sigFreeThumb a.sigFreeLink {
    width: min(var(--jsgf-thumb-width, 360px), calc(50vw - 18px));
    height: min(var(--jsgf-thumb-height, 240px), 42vw);
  }

  .jsgf-lightbox {
    padding: 16px;
  }

  .jsgf-lightbox__image {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
  }
}

@media print {
  .jsgf-container,
  .jsgf-lightbox {
    display: none !important;
  }
}
