/* File: /inc/libs/pic-versus/pic-versus.css */

/* Базовый контейнер */
.pic-versus {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: 100%;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
  margin: 40px auto; /* Стандартный отступ в статье */
}

/* Внутренняя обертка (создается JS) */
.pic-versus-container {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}

/* Изображения */
.pic-versus img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none; /* Чтобы не таскались как картинки */
  margin: 0 !important; /* Сброс глобальных отступов статьи */
  border: none !important; /* Сброс рамок */
  border-radius: 0 !important; /* Сброс скруглений, если мешают стыковке */
}

/* Нижнее изображение (До) */
.pic-versus-before {
  position: relative;
  z-index: 1;
}

/* Верхнее изображение (После) */
.pic-versus-after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  clip-path: inset(0 50% 0 0); /* По умолчанию 50% */
}

/* Разделитель */
.pic-versus-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  cursor: ew-resize;
  z-index: 3;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  touch-action: none; /* Важно для мобильных скроллов */
}

/* Ручка (Кнопка по центру) */
.pic-versus-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

/* Стрелки на ручке */
.pic-versus-handle::before {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent #444 transparent transparent;
  margin-right: 4px;
}

.pic-versus-handle::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent #444;
  margin-left: 4px;
}

/* Ховер эффекты */
.pic-versus-slider:hover .pic-versus-handle {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Состояние перетаскивания */
.pic-versus.dragging .pic-versus-slider,
.pic-versus.dragging .pic-versus-after {
  transition: none !important;