/*!
 * Zikra Slider Pro v1.3.3 — core stylesheet
 * Requires no dependencies. All tokens are CSS custom properties.
 */

.zs-slider {
  /* Design tokens (override per instance or in :root) */
  --zs-accent: #6366f1;
  --zs-ink: #0f172a;
  --zs-muted: #64748b;
  --zs-surface: #ffffff;
  --zs-line: #e2e8f0;
  --zs-gap: 0px;
  --zs-radius: 16px;
  --zs-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --zs-arrow-size: 44px;
  --zs-arrow-bg: rgba(15, 23, 42, 0.55);
  --zs-arrow-color: #ffffff;
  --zs-arrow-radius: 999px;
  --zs-arrow-inset: 12px;

  --zs-bullet-size: 8px;
  --zs-bullet-color: rgba(15, 23, 42, 0.22);
  --zs-bullet-active-color: var(--zs-accent);
  --zs-bullets-inset: 14px;

  position: relative;
  box-sizing: border-box;
  direction: inherit;
  -webkit-tap-highlight-color: transparent;
}

.zs-slider *,
.zs-slider *::before,
.zs-slider *::after {
  box-sizing: border-box;
}

.zs-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  transform: translateZ(0); /* own compositing layer; keeps paints local */
}

.zs-track {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: auto;
}

.zs-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.zs-axis-y .zs-slide {
  width: 100%;
}

.zs-slide > img,
.zs-slide > picture > img {
  display: block;
  width: 100%;
  height: auto;
}

.zs-slide-clone {
  pointer-events: none;
}

.zs-slide-active {
  z-index: 2;
}

/* Drag behaviour: allow the browser to keep native scrolling on the other axis */
.zs-axis-x.zs-drag-enabled {
  touch-action: pan-y;
}

.zs-axis-y.zs-drag-enabled {
  touch-action: pan-x;
}

.zs-slider.zs-dragging {
  cursor: grabbing;
  user-select: none;
}

.zs-slider.zs-dragging .zs-slide a {
  pointer-events: none;
}

.zs-slider:focus-visible {
  outline: 2px solid var(--zs-accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- Arrows */

.zs-arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--zs-arrow-inset);
  pointer-events: none;
  z-index: 5;
}

.zs-arrow {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--zs-arrow-size);
  height: var(--zs-arrow-size);
  padding: 0;
  border: 0;
  border-radius: var(--zs-arrow-radius);
  background: var(--zs-arrow-bg);
  color: var(--zs-arrow-color);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s var(--zs-ease), transform 0.2s var(--zs-ease), background-color 0.2s var(--zs-ease);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.zs-arrow:hover {
  transform: scale(1.06);
  background: var(--zs-accent);
}

.zs-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.zs-arrow[disabled] {
  opacity: 0.28;
  cursor: default;
  transform: none;
  background: var(--zs-arrow-bg);
}

.zs-arrow.zs-arrow-hidden {
  opacity: 0;
  visibility: hidden;
}

.zs-arrow svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.zs-axis-y .zs-arrows {
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--zs-arrow-inset) 0;
}

/* --------------------------------------------------------------- Bullets */

.zs-bullets {
  position: absolute;
  left: 50%;
  bottom: var(--zs-bullets-inset);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 5;
  max-width: calc(100% - 32px);
}

.zs-bullet {
  width: var(--zs-bullet-size);
  height: var(--zs-bullet-size);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--zs-bullet-color);
  cursor: pointer;
  transition: width 0.25s var(--zs-ease), background-color 0.25s var(--zs-ease);
}

.zs-bullet:hover {
  background: var(--zs-muted);
}

.zs-bullet:focus-visible {
  outline: 2px solid var(--zs-accent);
  outline-offset: 3px;
}

.zs-bullet-active {
  width: calc(var(--zs-bullet-size) * 3);
  background: var(--zs-bullet-active-color);
}

.zs-bullet-active:hover {
  background: var(--zs-bullet-active-color);
}

/* fraction */
.zs-fraction {
  font: 600 13px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--zs-surface);
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.04em;
  user-select: none;
}

/* progressbar */
.zs-progressbar {
  position: relative;
  width: min(280px, calc(100% - 48px));
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.zs-progressbar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--zs-accent);
  border-radius: inherit;
  transition: width 0.25s linear;
}

.zs-progressbar[data-orientation="vertical"] {
  width: 4px;
  height: 120px;
}

.zs-progressbar[data-orientation="vertical"] .zs-progressbar-fill {
  inset: 0 0 auto 0;
  width: 100%;
  height: 0;
}

/* --------------------------------------------------------------- A11y UI */

.zs-live {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* No-JS state: keep content readable and scrollable before/without JS. */
.zs-no-js .zs-viewport {
  overflow-x: auto;
}

.zs-no-js .zs-track {
  display: flex;
  gap: var(--zs-gap);
}

.zs-no-js .zs-slide {
  position: static;
  flex: 0 0 auto;
  width: auto;
}

/* Motion safety net: the engine also respects this in JS. */
@media (prefers-reduced-motion: reduce) {
  .zs-slider .zs-arrow,
  .zs-slider .zs-bullet,
  .zs-slider .zs-progressbar-fill,
  .zs-slider .zs-viewport {
    transition-duration: 0.01ms !important;
  }
}
