/* SW simple lightbox, see assets/scripts/lightbox.js */

.coco-lb-open,
.coco-lb-open body {
  overflow: hidden;
}

.coco-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 60px;
  background: rgba(0, 54, 19, 0.92); /* $brand-dark */
}

.coco-lb[hidden] {
  display: none;
}

.coco-lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.coco-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s;
}

.coco-lb.is-loading .coco-lb-img {
  opacity: 0;
}

.coco-lb.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #9cc119; /* $brand-light */
  border-radius: 50%;
  animation: coco-lb-spin 0.8s linear infinite;
}

@keyframes coco-lb-spin {
  to { transform: rotate(360deg); }
}

.coco-lb-caption {
  flex: none;
  padding-top: 10px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.coco-lb-caption[hidden],
.coco-lb-btn[hidden],
.coco-lb-counter[hidden] {
  display: none;
}

.coco-lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 40px;
  line-height: 44px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.coco-lb-btn:hover,
.coco-lb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #9cc119; /* $brand-light */
  outline: none;
}

.coco-lb-close {
  top: 6px;
  right: 6px;
}

.coco-lb-prev,
.coco-lb-next {
  top: 50%;
  margin-top: -24px;
  font-size: 56px;
}

.coco-lb-prev { left: 6px; }
.coco-lb-next { right: 6px; }

.coco-lb-counter {
  position: absolute;
  top: 18px;
  left: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

@media (max-width: 767px) {
  .coco-lb {
    padding: 56px 10px;
  }

  .coco-lb-prev,
  .coco-lb-next {
    top: auto;
    bottom: 4px;
    margin-top: 0;
  }
}
