.snoopy-gallery {
  margin: 34px 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.snoopy-gallery-stage {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.snoopy-gallery-main {
  appearance: none;
  background: #eef9fe;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
  cursor: zoom-in;
  display: block;
  grid-column: 2;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.snoopy-gallery-main::after {
  align-items: center;
  background: rgba(10, 18, 24, 0.1);
  color: #fff;
  content: "Klikni za prikaz";
  display: flex;
  font-size: 13px;
  font-weight: 800;
  inset: 0;
  justify-content: center;
  letter-spacing: 0.04em;
  opacity: 0;
  position: absolute;
  text-transform: uppercase;
  transition: opacity 180ms ease;
}

.snoopy-gallery-main:hover::after,
.snoopy-gallery-main:focus-visible::after {
  opacity: 1;
}

.snoopy-gallery-image {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: cover;
  transition: transform 240ms ease;
  width: 100%;
}

.snoopy-gallery-main:hover .snoopy-gallery-image,
.snoopy-gallery-main:focus-visible .snoopy-gallery-image {
  transform: scale(1.025);
}

.snoopy-gallery-nav {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(87, 189, 235, 0.24);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(23, 33, 43, 0.08);
  color: #17212b;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  width: 44px;
}

.snoopy-gallery-nav:hover,
.snoopy-gallery-nav:focus-visible {
  background: #57bdeb;
  color: #fff;
  transform: translateY(-1px);
}

.snoopy-gallery-prev {
  grid-column: 1;
}

.snoopy-gallery-next {
  grid-column: 3;
}

.snoopy-gallery-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scrollbar-color: #57bdeb #eef9fe;
  width: 100%;
}

.snoopy-gallery-thumb {
  appearance: none;
  background: #eef9fe;
  border: 3px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  flex: 0 0 94px;
  overflow: hidden;
  padding: 0;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.snoopy-gallery-thumb:hover,
.snoopy-gallery-thumb:focus-visible {
  border-color: rgba(87, 189, 235, 0.55);
  transform: translateY(-1px);
}

.snoopy-gallery-thumb.is-active {
  border-color: #57bdeb;
  opacity: 1;
}

.snoopy-gallery-thumb-image {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.snoopy-gallery-empty {
  background: #eef9fe;
  border: 1px solid rgba(87, 189, 235, 0.28);
  border-radius: 24px;
  color: #1a4a65;
  font-weight: 700;
  margin: 28px 0;
  padding: 24px;
  text-align: center;
}

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

.snoopy-gallery-lightbox {
  align-items: center;
  background: rgba(10, 18, 24, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.snoopy-gallery-lightbox-open {
  overflow: hidden;
}

.snoopy-gallery-lightbox-panel {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  max-height: 92vh;
  max-width: 1160px;
  position: relative;
  width: 100%;
}

.snoopy-gallery-lightbox-image {
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  grid-column: 2;
  justify-self: center;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.snoopy-gallery-lightbox-caption {
  align-self: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0;
  padding: 8px 16px;
}

.snoopy-gallery-lightbox-close,
.snoopy-gallery-lightbox-nav {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 999px;
  color: #17212b;
  cursor: pointer;
  display: inline-flex;
  font-size: 26px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.snoopy-gallery-lightbox-close:hover,
.snoopy-gallery-lightbox-nav:hover,
.snoopy-gallery-lightbox-close:focus-visible,
.snoopy-gallery-lightbox-nav:focus-visible {
  background: #57bdeb;
  color: #fff;
}

.snoopy-gallery-lightbox-close {
  height: 46px;
  position: absolute;
  right: 0;
  top: 0;
  transform: translateY(-58px);
  width: 46px;
}

.snoopy-gallery-lightbox-nav {
  height: 48px;
  width: 48px;
}

.snoopy-gallery-lightbox-prev {
  grid-column: 1;
}

.snoopy-gallery-lightbox-next {
  grid-column: 3;
}

@media (max-width: 767px) {
  .snoopy-gallery-stage {
    grid-template-columns: 1fr 1fr;
  }

  .snoopy-gallery-main {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .snoopy-gallery-prev,
  .snoopy-gallery-next {
    grid-row: 2;
    justify-self: center;
  }

  .snoopy-gallery-prev {
    grid-column: 1;
  }

  .snoopy-gallery-next {
    grid-column: 2;
  }

  .snoopy-gallery-thumb {
    flex-basis: 78px;
  }

  .snoopy-gallery-lightbox-panel {
    grid-template-columns: 1fr 1fr;
  }

  .snoopy-gallery-lightbox-image {
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: 72vh;
  }

  .snoopy-gallery-lightbox-prev,
  .snoopy-gallery-lightbox-next {
    grid-row: 2;
    justify-self: center;
  }

  .snoopy-gallery-lightbox-prev {
    grid-column: 1;
  }

  .snoopy-gallery-lightbox-next {
    grid-column: 2;
  }

  .snoopy-gallery-lightbox-caption {
    grid-row: 3;
  }
}
