/**
 * Made with love by Designfreaks.net
 * Do not redistribute or modify without permission.
 * Version 1.0.6
 */
 
/* Lightbox Overlay */
.dfl-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dfl-overlay.active {
  display: flex;
  opacity: 1;
}

.dfl-overlay .dfl-img.dfl-pop-in,
.dfl-overlay .dfl-seamless-view.dfl-pop-in {
  animation: pop-in 0.25s ease forwards;
}

.dfl-overlay.active .dfl-img.dfl-is-zoomed {
  animation: none;
}

@keyframes pop-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Seamless Container */
.dfl-seamless-view {
  display: none;
  box-sizing: border-box;
  user-select: none;
  touch-action: none;
  background-color: #222;
  background-repeat: repeat;
  background-position: 0 0;
  border-radius: 5px;

  aspect-ratio: 4 / 3;
  width: min(90vw, 800px);
  height: auto;
  max-width: calc((70vh - 50px) * (4 / 3));
  max-height: calc(70vh - 50px);
  min-height: 100px;
}

@media (min-width: 890px) {
  .dfl-seamless-view {
    width: 800px;
    height: 600px;
  }
}

.dfl-seamless-view.active {
  display: block;
}

/* Image & Caption */
.dfl-img {
  max-width: 90%;
  max-height: 70vh;
  user-select: none;
  touch-action: none;
  display: block;
  cursor: default;
  will-change: transform;

  /* Checkerboard background for transparent images */
  background-color: #222;
  background-image:
    linear-gradient(45deg, #444 25%, transparent 25%),
    linear-gradient(-45deg, #444 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #444 75%),
    linear-gradient(-45deg, transparent 75%, #444 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border-radius: 5px;
}

.dfl-img.dfl-hidden {
  display: none;
}

[data-lightbox-src] {
  cursor: pointer;
}

.dfl-caption {
  color: #dbdbdb;
  margin-top: 15px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  text-align: center;
  line-height: 1.5;
  background: #000;
  padding: 15px;
  border-radius: 5px;
  width: 100%;
  max-width: 500px;
  max-height: 100px;
  overflow-y: auto;
  box-sizing: border-box;
}

.dfl-download {
  display: block;
  background: #222;
  border-radius: 5px;
  text-align: center;
  color: #fff;
  padding: 10px;
  margin: 10px auto;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
}

/* Controls */
.dfl-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  padding: 20px;
  outline: none;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10001;
  filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, 1));
}

.dfl-button:hover {
  opacity: 1;
}

.dfl-prev {
  left: 10px;
}

.dfl-next {
  right: 10px;
}

.dfl-close {
  top: 20px;
  right: 20px;
  transform: none;
  font-size: 30px;
}

/* Hide arrows if single image */
.dfl-single .dfl-prev,
.dfl-single .dfl-next {
  display: none;
}

/* Zoom & Drag */
.dfl-img.dfl-can-zoom {
  cursor: zoom-in;
}

.dfl-img.dfl-is-zoomed {
  max-width: none;
  max-height: none;
  transform-origin: center center;
}

.dfl-img.dfl-is-zoomed[style*="grabbing"] {
  cursor: grabbing !important;
}

/* Loading State */
.dfl-overlay.dfl-loading {
  cursor: wait;
}

.dfl-overlay.dfl-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1001;
}

/* Spin animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Accessibility: Focus Outlines */
.dfl-overlay a:focus-visible,
.dfl-overlay button:focus-visible {
    outline: none; 
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
    border-radius: 5px; 
    transition: box-shadow 0.1s ease;
}

.dfl-button:focus-visible {
    border-radius: 5px;
}

.dfl-download:focus-visible {
    box-shadow: none; 
}