.rr-gallery-trigger {
  cursor: zoom-in;
  outline: none;
}

.rr-gallery-trigger img {
  transition: transform 220ms ease, filter 220ms ease;
}

.rr-gallery-trigger:hover img,
.rr-gallery-trigger:focus-visible img {
  filter: brightness(0.92);
  transform: scale(1.025);
}

.rr-gallery-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(16, 40, 46, 0.28);
}

.rr-gallery-trigger__hint {
  align-items: center;
  background: rgba(16, 40, 46, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  font: 700 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  gap: 6px;
  letter-spacing: 0;
  padding: 9px 12px;
  pointer-events: none;
  position: absolute;
  right: 14px;
  transform: translateY(2px);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
  z-index: 2;
}

.rr-gallery-trigger:hover .rr-gallery-trigger__hint,
.rr-gallery-trigger:focus-visible .rr-gallery-trigger__hint,
.rr-gallery-trigger:active .rr-gallery-trigger__hint {
  background: rgba(16, 40, 46, 0.78);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
  transform: translateY(0);
}

.rr-gallery {
  align-items: center;
  background: rgba(8, 22, 26, 0.88);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 9999;
}

.rr-gallery.is-open {
  display: flex;
}

.rr-gallery__panel {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(920px, calc(100svh - 36px));
  max-width: 1180px;
  width: min(100%, 1180px);
}

.rr-gallery__header {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.rr-gallery__title {
  font: 700 18px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.rr-gallery__count {
  color: rgba(255, 255, 255, 0.74);
  font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rr-gallery__close,
.rr-gallery__nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 8px;
  color: #10282e;
  cursor: pointer;
  display: inline-flex;
  font: 700 28px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.rr-gallery__close:hover,
.rr-gallery__nav:hover,
.rr-gallery__thumb:hover,
.rr-gallery__thumb.is-active {
  background: #fff;
}

.rr-gallery__stage {
  align-items: center;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  min-height: 0;
}

.rr-gallery__image-wrap {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.rr-gallery__image {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.rr-gallery__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-color: rgba(255, 255, 255, 0.7) rgba(255, 255, 255, 0.12);
}

.rr-gallery__thumb {
  background: rgba(255, 255, 255, 0.58);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  height: 62px;
  overflow: hidden;
  padding: 0;
  width: 90px;
}

.rr-gallery__thumb.is-active {
  border-color: #d7c7a0;
}

.rr-gallery__thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body.rr-gallery-lock {
  overflow: hidden;
}

@media (max-width: 720px) {
  .rr-gallery {
    padding: 8px;
  }

  .rr-gallery__panel {
    gap: 10px;
    height: calc(100svh - 16px);
  }

  .rr-gallery__stage {
    display: block;
    height: 100%;
    position: relative;
    width: 100%;
  }

  .rr-gallery__image-wrap {
    height: 100%;
    width: 100%;
  }

  .rr-gallery__close,
  .rr-gallery__nav {
    height: 40px;
    width: 40px;
  }

  .rr-gallery__nav {
    background: rgba(16, 40, 46, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.82);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  .rr-gallery__nav:hover,
  .rr-gallery__nav:focus-visible,
  .rr-gallery__nav:active {
    background: rgba(16, 40, 46, 0.56);
    color: #fff;
  }

  .rr-gallery__prev {
    left: 8px;
  }

  .rr-gallery__next {
    right: 8px;
  }

  .rr-gallery__title {
    font-size: 16px;
  }

  .rr-gallery__thumb {
    height: 54px;
    width: 78px;
  }

  .rr-gallery-trigger__hint {
    bottom: 10px;
    font-size: 11px;
    padding: 8px 10px;
    right: 10px;
  }
}
