.photo-viewer:focus {
  outline: none;
}

.photo-viewer__overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: #0a0a0a;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
}

.photo-viewer__holder {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10001;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.photo-viewer__loader {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 15%);
  border-top-color: #fff;
  animation: photo-viewer-spin 0.8s linear infinite;
}

@keyframes photo-viewer-spin {
  to { transform: rotate(360deg); }
}

.photo-viewer__fade {
  position: relative;
  display: none;
  opacity: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgb(0 0 0 / 60%), 0 0 1px rgb(255 255 255 / 10%);
}

.photo-viewer__image {
  display: block;
  max-width: none;
}

.photo-viewer__details {
  display: none;
}

.photo-viewer__nav {
  position: relative;
  flex: 1 1 auto;
  line-height: 1;
}

.photo-viewer__counter {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgb(255 255 255 / 70%);
  line-height: 30px;
  letter-spacing: 4px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.photo-viewer__button {
  padding: 0;
  border: 0;
  background: none;
  line-height: 1;
  cursor: pointer;
}

.photo-viewer__button .icon {
  height: 1em;
}

.photo-viewer__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  vertical-align: top;
  color: rgb(255 255 255 / 85%);
  background: rgb(255 255 255 / 8%);
  border-radius: 50%;
  font-size: 18px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.photo-viewer__arrow .icon {
  width: 0.5em;
}

.photo-viewer__arrow--next {
  margin-left: 8px;
}

.photo-viewer__arrow:hover,
.photo-viewer__close:hover {
  color: #fff;
  background: rgb(255 255 255 / 18%);
}

.photo-viewer__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  color: rgb(255 255 255 / 85%);
  background: rgb(255 255 255 / 8%);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.photo-viewer__close .icon {
  position: relative;
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
}

.photo-viewer__hover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 100%;
}

.photo-viewer__step {
  position: fixed;
  top: 50%;
  z-index: 10002;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: #fff;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  font-size: 28px;
  opacity: 0.85;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.photo-viewer__step .icon {
  width: 0.5em;
}

.photo-viewer__step--previous {
  left: 32px;
}

.photo-viewer__step--next {
  right: 32px;
}

.photo-viewer__step:hover,
.photo-viewer__step:focus-visible {
  opacity: 1;
}

.photo-viewer__step:hover {
  background: rgb(0 0 0 / 75%);
  transform: translateY(-50%) scale(1.08);
}

.photo-viewer__expand {
  display: none !important;
}

.photo-viewer__image {
  object-fit: contain;
}

@media (max-width: 768px) {
  .photo-viewer__holder {
    width: 92%;
  }

  .photo-viewer__fade {
    width: 100% !important;
  }

  .photo-viewer__image {
    width: 100% !important;
    height: auto !important;
  }

  .photo-viewer__hover {
    height: 100% !important;
  }

  .photo-viewer__step {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .photo-viewer__step--previous { left: 10px; }
  .photo-viewer__step--next { right: 10px; }

  .photo-viewer__details {
    padding: 12px 16px;
  }

  .photo-viewer__counter {
    font-size: 11px;
    letter-spacing: 3px;
  }

  .photo-viewer__close {
    padding: 5px 12px;
    font-size: 11px;
  }
}
