/**
 * DLE 17.1 Responsive Slider Gallery Styles
 * Matching dark gaming theme (simhost.org)
 */

.dle-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 28px auto;
  overflow: hidden;
  user-select: none;
  font-family: inherit;
}

.dle-slider-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.dle-slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.dle-slider-track.is-dragging {
  transition: none !important;
}

.dle-slider-slide {
  flex: 0 0 calc(100% - 12%); /* 6% peek слева + 6% peek справа = 88% центральный слайд */
  position: relative;
  padding: 0 6px;
  box-sizing: border-box;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.38;
  transform: scale(0.96);
  cursor: pointer;
}

@media (max-width: 768px) {
  .dle-slider-slide {
    flex: 0 0 calc(100% - 6%); /* 3% peek по краям = 94% центральный слайд */
    padding: 0 4px;
  }
}

.dle-slider-slide.is-active {
  opacity: 1;
  transform: scale(1);
  cursor: zoom-in;
}

.dle-slider-slide-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #0d0f12;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.dle-slider-slide-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  transition: opacity 0.3s ease;
}

/* Затемнение неактивных боковых слайдов */
.dle-slider-slide::after {
  content: '';
  position: absolute;
  inset: 0 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@media (max-width: 768px) {
  .dle-slider-slide::after {
    inset: 0 4px;
  }
}

.dle-slider-slide.is-active::after {
  opacity: 0;
}

/* Круглые кнопки навигации (работают через <div> + CSS-стрелки, не вырезаются DLE) */
.dle-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #121316;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.dle-slider-nav-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: #f3f4f6;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
}

.dle-slider-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.dle-slider-nav-btn::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2.5px solid #121316;
  border-right: 2.5px solid #121316;
}

.dle-slider-btn-prev {
  display: none; /* Скрыта на первом слайде до перелистывания */
  left: calc(6% + 14px);
}

.dle-slider-btn-prev::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.dle-slider-btn-next {
  right: calc(6% + 14px);
}

.dle-slider-btn-next::before {
  transform: rotate(45deg);
  margin-right: 4px;
}

@media (max-width: 768px) {
  .dle-slider-nav-btn {
    width: 36px;
    height: 36px;
  }
  .dle-slider-btn-prev {
    left: calc(3% + 8px);
  }
  .dle-slider-btn-next {
    right: calc(3% + 8px);
  }
}

/* Подпись под слайдером */
.dle-slider-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13.5px;
  color: #9ca3af;
  line-height: 1.5;
  padding: 0 16px;
}

/* Лайтбокс */
.dle-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 14, 0.94);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  animation: dleFadeIn 0.25s ease-out;
}

.dle-lightbox-overlay.is-closing {
  animation: dleFadeOut 0.2s ease-in forwards;
}

.dle-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  color: #e5e7eb;
}

.dle-lightbox-counter {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
}

.dle-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dle-lb-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.dle-lb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.dle-lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px 60px;
}

.dle-lightbox-image-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dle-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  transition: transform 0.15s ease-out;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  border-radius: 6px;
}

.dle-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 38px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.dle-lb-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dle-lb-prev { left: 24px; }
.dle-lb-next { right: 24px; }

.dle-lightbox-footer {
  padding: 16px 24px;
  text-align: center;
  color: #d1d5db;
  font-size: 14px;
}

@keyframes dleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dleFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}