/* =========================================================
   BERGLOKE — BILDSPELSSTILAR
   ========================================================= */

:root {

  /* =========================
     BILDSPELSSTIL 1
     ========================= */

  --slideshow-style-1-height: 700px;
  --slideshow-style-1-duration: 5000ms;
  --slideshow-style-1-transition: 1600ms;

  /* =========================
     BILDSPELSSTIL 2
     ========================= */

  --slideshow-style-2-height: 700px;
  --slideshow-style-2-duration: 3500ms;
  --slideshow-style-2-transition: 500ms;

  /* THUMBNAILS */

  --thumbnail-gap: 20px;
}

/* =========================
   STIL 1
   Full bredd.
   Bilden beskärs från mitten.
   ========================= */

.slideshow-style-1 {
  width: 100%;
  height: var(--slideshow-style-1-height);

  position: relative;
  overflow: hidden;

  background: #000;
}

.slideshow-style-1 .slide {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  opacity: 0;

  transition:
    opacity var(--slideshow-style-1-transition)
    ease;
}

.slideshow-style-1 .slide.active {
  opacity: 1;
}

/* =========================
   STIL 2
   ========================= */

.slideshow-style-2 {
  width: 100%;
  height: var(--slideshow-style-2-height);

  position: relative;
  overflow: hidden;

  background: #000;
}

.slideshow-style-2 .slide {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center center;

  opacity: 0;

  transition:
    opacity var(--slideshow-style-2-transition)
    ease;
}

.slideshow-style-2 .slide.active {
  opacity: 1;
}

/* =========================
   PILAR
   ========================= */

.slide-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;

  transform: translateY(-50%);

  border: 0;
  padding: 18px;

  background: transparent;

  color: rgba(255,255,255,.4);

  font-size: 34px;
  line-height: 1;

  cursor: pointer;
}

.slide-arrow:hover {
  color: #fff;
}

.slide-prev {
  left: 0;
}

.slide-next {
  right: 0;
}

/* =========================
   THUMBNAILS
   ========================= */

.thumbnail {
  width: 100%;
  aspect-ratio: 1.45 / 1;

  border: 0;
  padding: 0;

  overflow: hidden;

  background: #000;

  cursor: pointer;

  opacity: .55;
}

.thumbnail:hover {
  opacity: 1;
}

.thumbnail img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;
}

/* =========================
   LIGHTBOX
   ========================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: none;

  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,.96);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: calc(100vw - 100px);
  max-height: calc(100vh - 100px);

  object-fit: contain;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;

  border: 0;
  background: transparent;

  color: rgba(255,255,255,.65);

  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 26px;

  font-size: 34px;
}

.lightbox-arrow {
  top: 50%;

  transform: translateY(-50%);

  font-size: 50px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

@media (max-width: 700px) {

  :root {
    --slideshow-style-1-height: 70vh;
  }

  .slide-arrow {
    font-size: 28px;
  }
}
