.gallery-popover {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
}

.gallery-popover--active {
  display: block;
}

.gallery-popover__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.gallery-popover__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  display: flex;
  width: fit-content;
  height: fit-content;
  align-items: center;
  justify-content: center;
}

.gallery-popover__image {
  max-width: 70vw;
  max-height: 70vh;
  object-fit: contain;
  z-index: 1;
  user-select: none;
  border-radius: 12px;

  @media (width<769px) {
    max-width: 90vw;
    border-radius: 8px;
  }
}

.gallery-popover__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;

  @media (width < 769px) {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: 10px;
    right: 10px;
}
}

.gallery-popover__close:hover {
  scale: 105%;
}

.gallery-popover__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  background: white;
  color: white;
  font-size: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;

  @media (width < 769px) {
    transform: none;
    top: unset;
    bottom: 10px;

    width: 38px;
    height: 38px;
    font-size: 24px;
  }
}

.gallery-popover__nav:hover {
  scale: 105%;
}

.gallery-popover__nav--prev {
  left: 20px;
  @media (width < 769px) {
    left: 10px;
  }
}

.gallery-popover__nav--next {
  right: 20px;
  @media (width < 769px) {
    right: 10px;
  }
}

.gallery-popover__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 20px;
  z-index: 2;

  @media (width < 769px) {
    bottom: 4px;
    padding: 4px 8px;
    font-size: 9px;
    border-radius: 8px;
  }
}
