

.crs-lightbox-trigger {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: zoom-in;
}

.crs-lightbox-trigger:focus-visible {
  outline: 3px solid #004e80;
  outline-offset: -3px;
  border-radius: 14px;
}

.crs-lightbox-trigger::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(6, 7, 8, 0.66)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E")
    center / 19px 19px no-repeat;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.crs-lightbox-trigger:hover::after,
.crs-lightbox-trigger:focus-visible::after {
  opacity: 1;
}

@media (hover: none) {
  .crs-lightbox-trigger::after {
    opacity: 1;
  }
}

html.crs-lb-open {
  overflow: hidden;
}

html.crs-lb-open body {
  padding-right: var(--crs-lb-sbw, 0px);
}

.crs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 84px;
  background: rgba(6, 7, 8, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family:
    'Manrope',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: rgb(243, 244, 245);
  cursor: zoom-out;
}

.crs-lightbox[hidden] {
  display: none;
}

.crs-lightbox__figure {
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.crs-lightbox__img {
  display: block;
  max-width: 100%;

  max-height: calc(100vh - 210px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.crs-lightbox__caption {
  max-width: 760px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: rgb(210, 212, 215);
  text-wrap: pretty;
}

.crs-lightbox__caption:empty {
  display: none;
}

.crs-lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(6, 7, 8, 0.72);
  color: #fff;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.crs-lightbox__btn[hidden],
.crs-lightbox__counter[hidden] {
  display: none;
}

.crs-lightbox__btn:hover {
  background: #004e80;
  border-color: #004e80;
}

.crs-lightbox__btn:active {
  background: #0e67a1;
}

.crs-lightbox__btn:focus-visible {
  outline: 3px solid rgb(43, 138, 208);
  outline-offset: 2px;
}

.crs-lightbox__btn::before {
  content: '';
  width: 22px;
  height: 22px;
  background: center / contain no-repeat;
}

.crs-lightbox__close {
  top: 16px;
  right: 16px;
}

.crs-lightbox__close::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.crs-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.crs-lightbox__nav--prev {
  left: 16px;
}

.crs-lightbox__nav--prev::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4l-8 8 8 8'/%3E%3C/svg%3E");
}

.crs-lightbox__nav--next {
  right: 16px;
}

.crs-lightbox__nav--next::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4l8 8-8 8'/%3E%3C/svg%3E");
}

.crs-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(6, 7, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgb(229, 231, 234);
}

.crs-lightbox__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 575px) {
  .crs-lightbox {
    padding: 64px 12px 92px;
  }

  .crs-lightbox__img {
    max-height: calc(100vh - 200px);
    border-radius: 12px;
  }

  .crs-lightbox__btn {
    width: 52px;
    height: 52px;
  }

  .crs-lightbox__nav {
    top: auto;
    bottom: 16px;
    transform: none;
  }

  .crs-lightbox__nav--prev {
    left: 12px;
  }

  .crs-lightbox__nav--next {
    right: 12px;
  }

  .crs-lightbox__counter {
    bottom: 32px;
  }

  .crs-lightbox__caption {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .crs-lightbox {
    animation: crs-lightbox-in 180ms ease-out;
  }

  .crs-lightbox__figure {
    animation: crs-lightbox-zoom 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@keyframes crs-lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes crs-lightbox-zoom {
  from {
    opacity: 0;
    transform: scale(0.965);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
