
/* Thumbnail carousel styles */

.carouselFrame {
  position: relative;
  background-repeat: no-repeat;
  display: block;
  overflow: hidden;
}

/* Buttons: */
.carouselPrev,
.carouselNext {
  color: #eeeeee;
  background-color: #00000066;
  font-size: 1.5em;
  padding-top: 0.4em;
  padding-bottom: 0.5em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  position: absolute;
  top: 50%;
  cursor: pointer;
  z-index: 10;
  transform: translateY(-55%) scale(0.75);	/* Scale affects translate */
}

.carouselPrev {
  left: 0;
  border-radius: 0.5em 0 0 0.5em;
}

.carouselNext {
  right: 0;
  border-radius: 0 0.5em 0.5em 0;
}

.carouselPrev:hover,
.carouselNext:hover {
  color: #00000066;
  background-color: #eeeeeecc;
  border: 2px solid #00000066;
}

/* Zoom icon */
.productImageWrapper {
  position: relative;
  display: inline-block;
  max-width: fit-content;
}

.productImageWrapper:after {
  width: 24px;
  height: 24px;
  background-color: #b0b0b0;
  background-image: url('../imagesPHP/zoomin24.svg.php');
  background-position: top left;
  background-repeat: no-repeat;
  border: 2px solid #393939;
  border-radius: 50%;
  box-shadow: 0.1em 0.1em 0.25em #393939;
  padding-top: 2px;
  padding-left: 2px;
  overflow: hidden;
  content: "";
  position: absolute;
  bottom: 1em; 
  right: 0.5em;
  pointer-events: none;
}


/* Lightbox styles */

#carouselLightboxOverlay {
  display: flex;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#carouselLightboxFrame {
  position: relative;
  background-repeat: no-repeat;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spinner overlay while loading full size image into lightbox: */
.carouselFrame.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
  pointer-events: none;
}

.carouselFrame.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 5px solid #393939;
  border-top: 5px solid #b0b0b0;
  border-radius: 50%;
  z-index: 100;
  animation: spin 1s linear infinite;
}

/* Spinner keyframes: */
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Buttons: */
.carouselLightboxPrev,
.carouselLightboxNext {
  color: #00000099;
  background-color: transparent;
  font-size: 4em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border: none;
  cursor: pointer;
}

.carouselLightboxPrev {
  left: 0.1em;
}

.carouselLightboxNext {
  right: 0.1em;
}

.carouselLightboxClose {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -0.75em;
  right: -0.75em;
  z-index: 10;
  font-size: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  color: #990000;
  background-color: #00000099;
  border: 0.25em solid #b0b0b0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0.5em #393939;
  overflow: hidden;
}


/* Only use :hover pseudo class selectors for devices that support it: */
@media (hover: hover) {

  .carouselLightboxPrev:hover,
  .carouselLightboxNext:hover {
    color: #eeeeeecc;
    background-color: #00000066;
    border: 2px solid #00000066;
    padding-top: 0.3em;
    padding-bottom: 0.5em;
    padding-left: 0.3em;
    padding-right: 0.3em;
  }

  .carouselLightboxPrev:hover {
    left: 0.1em;
    border-radius: 0.25em 0 0 0.25em;
  }

  .carouselLightboxNext:hover {
    right: 0.1em;
    border-radius: 0 0.25em 0.25em 0;
  }

  .carouselLightboxClose:hover {
    color: #39393999;
    background-color: #b0b0b0;
  }

}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}


/* Mobile devices with a touch-only UI (i.e. tablets without a stylus,   */
/* smart phones) will need specific controls. The caroussel will already */
/* default to autoplay on these devices. We don't support smart TV, game */
/* consoles or other gadgets with coarse accuracy pointers.              */

@media (hover: none) {

  .carouselLightboxPrev,
  .carouselLightboxNext {
    color: #eeeeee;
    background-color: #00000066;
    padding: 1em;
    font-size: 2em;
    cursor: pointer;
    z-index: 10001;
  }

  .carouselLightboxPrev {
    left: 0.25em;
    border-radius: 0.5em 0 0 0.5em;
  }

  .carouselLightboxNext {
    right: 0.25em;
    border-radius: 0 0.5em 0.5em 0;
  }

}

/* EOF */
