/* Celoobrazovková galerie fotek zboží (tGallery.js) */
.tGallery {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background-color: #000;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.tGallery-visible {
  opacity: 1;
}

.tGallery_track {
  display: flex;
  height: 100%;
  touch-action: none;
  will-change: transform;
}
.tGallery_track-animated {
  transition: transform 0.3s ease-out;
}

.tGallery_slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tGallery_slide-zoomed {
  cursor: grab;
}
.tGallery_image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.tGallery_image:not([src]) {
  visibility: hidden;
}
.tGallery_image-animated {
  transition: transform 0.25s ease-out;
}
.tGallery_loader {
  position: absolute;
  font-size: 32px;
  opacity: 0.6;
}
.tGallery_caption {
  position: absolute;
  left: 50%;
  bottom: calc(40px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 12px;
  border-radius: var(--button-border-radius);
  background-color: #0006;
  text-align: center;
  pointer-events: none;
}

.tGallery_button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #0006;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.tGallery_button:hover {
  background-color: #000a;
}
.tGallery_button-close {
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
}
.tGallery_button-prev,
.tGallery_button-next {
  top: 50%;
  margin-top: -24px;
}
.tGallery_button-prev {
  left: 12px;
}
.tGallery_button-next {
  right: 12px;
}
.tGallery_button-disabled,
.tGallery-single .tGallery_button-prev,
.tGallery-single .tGallery_button-next {
  display: none;
}

.tGallery_dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.tGallery-single .tGallery_dots {
  display: none;
}
.tGallery_dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #fff6;
}
.tGallery_dot-current {
  background-color: #fff;
}

/* Na dotykových zařízeních se listuje tažením, šipky jen překáží */
@media (hover: none) and (pointer: coarse) {
  .tGallery_button-prev,
  .tGallery_button-next {
    display: none;
  }
}
