/* -------------------------------- 

File#: _3_looping-slideshow
Title: Looping Slideshow
Descr: Slideshow automatically looping among items with a progress indicator for each item
Usage: codyhouse.co/license

-------------------------------- */
/* reset */
*, *::after, *::before {
  box-sizing: border-box;
}

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  background-color: hsl(0, 0%, 100%);
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 {
  font-size: 2.0736rem;
}

h2 {
  font-size: 1.728rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.2rem;
}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}



table {
  border-collapse: collapse;
  border-spacing: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

@media (min-width: 64rem) {
  body {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 3.051rem;
  }

    h2 {
    font-size: 2.44rem;
  }

    h3 {
    font-size: 1.75rem;
  }

    h4 {
    font-size: 1.5625rem;
  }
}

/* variables */
:root {
  /* colors */
  --li1-color-primary-hsl: 250, 84%, 54%;
  --li1-color-bg-hsl: 0, 0%, 100%;
  --li1-color-contrast-high-hsl: 230, 7%, 23%;
  --li1-color-contrast-higher-hsl: 230, 13%, 9%;
  --li1-color-contrast-lower-hsl: 240, 4%, 85%;
  --li1-color-black-hsl: 230, 13%, 9%;
  --li1-color-white-hsl: 0, 0%, 100%;

  /* spacing */
  --li1-space-xs: 0.5rem;
  --li1-space-sm: 0.75rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --li1-space-xs: 0.75rem;
    --li1-space-sm: 1.125rem;
  }
}

/* icons */
.li1-icon {
  height: var(--li1-size, 1em);
  width: var(--li1-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

.li1-icon--xs {
  --li1-size: 16px;
}

/* component */
/* optional -> overwrite slideshow height at different breakpoints */
.loop-slideshow {
  --slideshow-slide-transition-duration: 0.3s;
  /* slide effect transition duration */
}
.loop-slideshow .slideshow__content {
  -webkit-clip-path: inset(0 round 0.5em);
          clip-path: inset(0 round 0.5em);
          
}



/* slideshow navigation - created in JS */
.loop-slideshow__navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.loop-slideshow__nav-item {
  margin: var(--li1-space-sm) calc(var(--li1-space-sm) / 2) 0;
  --loop-slideshow-filling: 0;
  /* used in JS to create the filling effect */
}
.loop-slideshow__nav-item button {
  position: relative;
  display: block;
  overflow: hidden;
  height: 4px;
  width: 60px;
  border-radius: 50em;
  background-color: hsl(var(--li1-color-contrast-lower-hsl));
  cursor: pointer;
  transition: 0.2s;
}
.loop-slideshow__nav-item button::before {
  /* filling effect */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  -webkit-transform: scaleX(var(--loop-slideshow-filling));
          transform: scaleX(var(--loop-slideshow-filling));
  -webkit-transform-origin: left center;
          transform-origin: left center;
  background-color: #4279BC;
}
.loop-slideshow__nav-item button:hover {
  background-color: hsla(var(--li1-color-contrast-lower-hsl), 0.7);
}
@media (min-width: 64rem) {
  .loop-slideshow__nav-item button {
    height: 5px;
    width: 90px;
  }
}

/* slideshow custom cursor */
.loop-slideshow-cursor.c-cursor--right .c-cursor__img {
  --rotate: 180deg;
}

/* pause/play button */
.loop-slideshow__pause-btn {
  position: absolute;
  z-index: 3;
  top: var(--li1-space-sm);
  right: var(--li1-space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: hsla(var(--li1-color-black-hsl), 0.85);
  cursor: pointer;
  color: hsl(var(--li1-color-white-hsl));
  /* icon color */
  transition: background 0.3s, -webkit-transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: background 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: background 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), -webkit-transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.loop-slideshow__pause-btn:hover {
  background-color: hsla(var(--li1-color-black-hsl), 0.95);
  -webkit-transform: scale(1.1);
          transform: scale(1.1);
}

/* utility classes */
.li1-sr-only {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.li1-inline-flex {
  display: inline-flex;
}

.li1-margin-bottom-xs {
  margin-bottom: var(--li1-space-xs);
}