/* slider.css – стили для полноэкранного слайдера (извлечены из style-chat.css) */

/* Добавляем в конец style-chat.css */

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
    cursor: grab;
  touch-action: none;
  -webkit-touch-callout: none; /* запрещает вызов контекстного меню при долгом тапе */
  user-select: none; /* запрещает выделение текста */
}


.slider-track:active {
    cursor: grabbing;
}

.slider-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
        pointer-events: none;
}

.slider-track,
.slider-slide,
.slider-slide img {
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.slider-slide video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    background: #000;
}

/* Улучшаем стили стрелок */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-arrow:hover {
  opacity: 0.7;
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Счетчик */
.slider-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-counter {
        top: 15px;
        font-size: 14px;
        padding: 4px 12px;
    }
}

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
background-color: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
   touch-action: pan-y pinch-zoom; /* разрешаем вертикальные свайпы и масштабирование, но запрещаем горизонтальные жесты браузера */
    overscroll-behavior: contain;
}

.slider-track,
.slider-slide,
.slider-slide img,
.slider-slide video {
    touch-action: none; /* полностью запрещаем стандартные жесты внутри слайдера, все касания передаём в JS */
    -webkit-touch-callout: none;
    user-select: none;
}
.fullscreen-overlay img,
.fullscreen-overlay video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transition: opacity 0.3s;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
}
.fullscreen-close:hover {
  opacity: 0.7;
}

.slider-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-track {
  display: flex;
  height: 100%;
  align-items: center;
  transition: transform 0.5s ease;
}

.slider-slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

@media (max-width: 480px) {
  .slider-prev, .slider-next{
    display: none;
  }
  .slider-counter {
        top: 13px;
        font-size: 12px;
        padding: 4px 12px;
    }
}

.fullscreen-overlay {
  touch-action: pan-y pinch-zoom; /* разрешаем вертикальные свайпы, но это не мешает */
}

.slider-track,
.slider-slide,
.slider-slide img,
.slider-slide video {
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}


.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  touch-action: none;
}

.fullscreen-overlay .swiper {
  width: 100%;
  height: 100%;
}

.fullscreen-overlay .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-overlay .swiper-slide img,
.fullscreen-overlay .swiper-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 480px){
  .fullscreen-close{
    font-size: 26px;
    height: 38px;
    width: 38px;
    top: 12px;
    right: 12px;
  }
}

