/* ============================================
 * SliderEngine — Base Styles
 * ============================================
 * Include this CSS alongside slider-engine.js.
 * Widgets can override these styles with their own classes.
 */

/* ── Slider Container ────────────────────────── */
.cb-slider {
  position: relative;
  width: 100%;
}

/* Clips the sliding track only — kept separate from .cb-slider so
   arrows/dots appended to .cb-slider can overflow it (e.g. when boxed). */
.cb-slider-viewport {
  overflow: hidden;
}

.cb-slider-track {
  display: flex;
  will-change: transform;
}

.cb-slide {
  flex-shrink: 0;
  box-sizing: border-box;
}

/* ── Arrows ──────────────────────────────────── */
.cb-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
  padding: 0;
}

.cb-slider-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%) scale(1.05);
}

.cb-slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.cb-slider-arrow--prev {
  left: 12px;
}

.cb-slider-arrow--next {
  right: 12px;
}

.cb-slider-arrow svg {
  width: 20px;
  height: 20px;
}

/* When the slider sits inside a "boxed" container (see .bf-boxed), push arrows
   out into the surrounding gutter instead of overlapping the content edge.
   Only from tablet width up — on mobile .bf-boxed has no gutter to push into. */
@media (min-width: 768px) {
  .bf-boxed .cb-slider-arrow--prev {
    left: -50px;
  }

  .bf-boxed .cb-slider-arrow--next {
    right: -50px;
  }
}

/* ── Dots ────────────────────────────────────── */
.cb-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
}

.cb-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cb-slider-dot:hover {
  background: #9ca3af;
  transform: scale(1.2);
}

.cb-slider-dot.cb-dot--active {
  background: var(--primary-color, #c8102e);
  transform: scale(1.15);
}

/* ── Grabbing cursor ─────────────────────────── */
.cb-slider--initialized {
  cursor: grab;
}

.cb-slider--initialized:active {
  cursor: grabbing;
}

/* Prevent text selection while dragging */
.cb-slider--initialized * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ── Slide default styling ───────────────────── */
.cb-slide img {
  -webkit-user-drag: none;
  user-drag: none;
}
