img[data-rd-zoom] {
  cursor: zoom-in;
}

img[data-rd-zoom]:focus-visible {
  outline: 3px solid var(--rd-blog-accent, #147d88);
  outline-offset: 4px;
}

.rd-lightbox[open] {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: 0;
  box-sizing: border-box;
  color: #fff;
  background: rgba(12, 19, 23, 0.96);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: contain;
}

.rd-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.rd-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rd-lightbox__original {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #e4ecef;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rd-lightbox__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #64727a;
  border-radius: 50%;
  color: #fff;
  background: #26343c;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}

.rd-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.rd-lightbox__image {
  position: relative;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.rd-lightbox__message {
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  text-align: center;
  pointer-events: none;
}

.rd-lightbox__status {
  margin: 0 0 16px;
  font-size: 15px;
}

.rd-lightbox__retry {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #64727a;
  border-radius: 8px;
  background: #26343c;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.rd-lightbox__retry[hidden] {
  display: none;
}

.rd-lightbox__caption {
  width: min(100%, 900px);
  max-height: 18vh;
  margin: 0 auto;
  overflow-y: auto;
  text-align: center;
  color: #e4ecef;
  font-size: 14px;
  line-height: 1.5;
}

.rd-lightbox a:focus-visible,
.rd-lightbox button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
