/**
 * @file
 * Views Vanilla Javascript Slideshow.
 *
 * Filename:     vvjs.css
 * Website:      https://www.flashwebcenter.com
 * Developer:    Alaa Haddad https://www.alaahaddad.com.
 */

/* ==========================================================================
   Accessibility & Utility Classes
   ========================================================================== */

.vvj-slideshow .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.hidden-element {
  display: none;
}

/* ==========================================================================
   Base Slideshow Structure
   ========================================================================== */
.vvjs {
  overflow: hidden;
}

.vvj-slideshow,
.vvj-slideshow * {
  box-sizing: border-box;
}

.vvj-slideshow,
.vvj-slideshow .view-content {
  width: 100%;
  min-width: 100%;
  display: block !important;
}

.vvjs .vvjs-inner {
  position: relative;
}

/* ==========================================================================
   Slide Items & Container
   ========================================================================== */
.vvjs .vvjs-items {
  overflow: hidden;
  transition: all 0.5s ease-in-out;
}

.vvjs .vvjs-items > .vvjs-item {
  display: none;
  transition: transform 0.5s ease-in-out;
}

.vvjs .vvjs-items > div:first-of-type {
  display: block;
}

.vvjs .vvjs-items .vvjs-item-inner {
  padding-top: 1px;
  padding-bottom: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */
.vvjs .vvjs-inner > .slide-indicators {
  pointer-events: none;
  background-color: transparent !important;
  height: 40px;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  z-index: 999;
  width: 100%;
  position: absolute;
  left: 0;
  top: 50%;
}

.vvjs  .slide-indicators {
  top: calc(50% - 24px);
}

.vvjs .vvjs-inner.not-zero > .slide-indicators,
.vvjs .vvjs-inner.numbers.zero > .slide-indicators,
.vvjs .vvjs-inner.numbers.not-zero > .slide-indicators,
.vvjs .vvjs-inner.dots.zero > .slide-indicators,
.vvjs .vvjs-inner.dots.not-zero > .slide-indicators {
  top: calc(50% - 48px);
}


.dots-numbers-button-wrapper > a,
.dots-numbers-button-wrapper > button {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.vvjs .slide-indicators > button,
.vvjs .nav-dots-numbers > button {
  all: unset;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: all 0.3s ease;
  color: #fff;
  backdrop-filter: blur(4px);
}

.vvjs .slide-indicators button {
  margin: 0 8px;
  pointer-events: auto !important;
  text-decoration: none !important;
  z-index: 1000;
  opacity: 0.5;
}

.vvjs .slide-indicators > button:hover,
.vvjs .nav-dots-numbers > button:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #fff;
  transform: scale(1.05);
  opacity: 1;
}

.vvjs .slide-indicators > button:focus-visible,
.vvjs .nav-dots-numbers > button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.vvjs .slide-indicators > button:active,
.vvjs .nav-dots-numbers > button:active {
  transform: scale(0.95);
}

.vvjs .slide-indicators > button[style*='visibility:hidden'] {
  opacity: 0;
  pointer-events: none;
}

.vvjs .slide-indicators button svg,
.vvjs .nav-dots-numbers button svg {
  width: 40px;
  height: 40px;
  pointer-events: none;
}

/* Global Setting for top arrows on the sides */
.vvjs.arrows-sides .vvjs-items,
.vvjs.arrows-sides .nav-dots-numbers,
.vvjs.hero-slideshow.arrows-sides .vvjs-item .vvjs-hero-image img {
  width: calc(100% - 100px) !important;
  margin-inline-end: 50px !important;
  margin-inline-start: 50px !important;
}

.vvjs.arrows-sides .slide-indicators button {
  opacity: 0.8;
}

.vvjs.hero-slideshow.arrows-sides .vvjs-inner > .nav-dots-numbers {
  left: 50px !important;
  margin: 0 !important;
}

/* ==========================================================================
   Bottom Navigation (Dots & Numbers)
   ========================================================================== */
.slide-indicators *,
.nav-dots-numbers * {
  line-height: 1;
}

.vvjs .nav-dots-numbers {
  min-height: calc(2 * 20px);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-dots-numbers,
.dots-numbers-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
}

.dots-numbers-button-wrapper {
  min-height: 32px;
}

.play-pause-button {
  padding: 0 4px;
}

.vvjs .nav-dots-numbers.dots .dots-numbers-button,
.vvjs .nav-dots-numbers.numbers .dots-numbers-button {
  opacity: 100;
}

.vvjs .nav-dots-numbers .dots-numbers-button.active {
  pointer-events: none;
  cursor: none;
}

/* Numbers Navigation Style */
.vvjs .nav-dots-numbers.numbers .dots-numbers-button {
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin: 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: currentColor;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  transform: scale(1);
}

.vvjs .nav-dots-numbers.numbers .dots-numbers-button:hover {
  transform: scale(1.1);
}

.vvjs .nav-dots-numbers.numbers .dots-numbers-button.active {
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
  transform: scale(1.2);
  animation: activeBounce 0.6s ease-in-out;
}

/* Dots Navigation Style */
.vvjs .nav-dots-numbers.dots .dots-numbers-button {
  border: none;
  cursor: pointer;
  padding: 0 !important;
  margin: 0.625rem 0.5rem !important;
  width: 0.625rem !important;
  height: 0.625rem !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  line-height: initial !important;
  border-width: 2px;
  border-style: solid;
  border-color: currentColor;
}

.vvjs .nav-dots-numbers.dots .dots-numbers-button:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.vvjs .nav-dots-numbers.dots .dots-numbers-button.active {
  width: calc(2 * 10px) !important;
  border-radius: 50% !important;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  animation: activePulse 1.5s infinite alternate;
}

/* ==========================================================================
   Page Counter & Progress Indicator
   ========================================================================== */

/* Container styling for the animation */
.echo-total,
.echo-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 32px;
  position: relative;
}

.echo-animation {
  width: 32px;
}

/* Page Counter Styles */
.vvjs .echo-total {
  padding: 0 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 999px;
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
  flex-direction: row;
  gap: 0.25rem;
  transition: all 0.3s ease;
  margin: 0;
}

.vvjs .echo-total > * {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.vvjs .echo-total .current-slide {
  font-weight: 600;
}

/* Progress Bar */
.progressbar {
  opacity: 1;
  overflow: hidden;
  --progress: 0%;
  --size: 32px;
  --bar-width: 6px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(#007bff var(--progress), #e6e6e6 0%);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.3s linear, transform 0.3s ease, opacity 0.3s ease-in-out;
}

.progressbar::after {
  content: attr(aria-valuenow) "%";
  width: calc(100% - var(--bar-width));
  height: calc(100% - var(--bar-width));
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #007bff;
  position: absolute;
  transition: color 0.3s ease-in-out;
}

.progressbar[aria-valuenow="100"] {
  background: conic-gradient(#007bff 100%, #007bff 0%);
  transform: scale(1.05);
}

.progressbar[aria-valuenow="100"]::after {
  content: "100%";
  color: #fff;
}

.vvjs-is-paused .progressbar {
  opacity: 0;
}

/* ==========================================================================
   Animations - Slide Transitions
   ========================================================================== */

/* Fade Animation */
.vvjs-hero-content,
.vvjs.slideshow.a-fade .vvjs-item-inner,
.vvjs.hero-slideshow.a-fade .vvjs-item-inner img {
  animation: opac 0.8s ease-out;
}

@keyframes opac {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

/* Zoom Animation */
.vvjs.slideshow.a-zoom .vvjs-item-inner,
.vvjs.hero-slideshow.a-zoom .vvjs-item-inner img {
  animation: animatezoom 0.6s ease-out;
}

@keyframes animatezoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }

}

/* Top Animation (For NOT hero slideshow) */
.vvjs.slideshow.a-top .vvjs-item-inner {
  position: relative;
  animation: animatetop 0.6s ease-out;
}

@keyframes animatetop {
  from {
    top: -100px;
    opacity: 0;
  }

  to {
    top: 0;
    opacity: 1;
  }

}

/* Left Animation */
.vvjs.slideshow.a-left .vvjs-item-inner {
  position: relative;
  animation: animateleft 0.6s ease-out;
}

@keyframes animateleft {
  from {
    left: -100px;
    opacity: 0;
  }

  to {
    left: 0;
    opacity: 1;
  }

}

/* Right Animation */
.vvjs.slideshow.a-right .vvjs-item-inner {
  position: relative;
  animation: animateright 0.6s ease-out;
}

@keyframes animateright {
  from {
    right: -100px;
    opacity: 0;
  }

  to {
    right: 0;
    opacity: 1;
  }

}

/* Bottom Animation */
.vvjs.slideshow.a-bottom .vvjs-item-inner {
  position: relative;
  animation: animatebottom 0.6s ease-out;
}

@keyframes animatebottom {
  from {
    bottom: -100px;
    opacity: 0;
  }

  to {
    bottom: 0;
    opacity: 1;
  }

}

/* ==========================================================================
   Animations - Navigation States
   ========================================================================== */
@keyframes activeBounce {
  0% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1.2);
  }

}

@keyframes activePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  }

  100% {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  }

}
