/* === YellowDog Gallery — Lightbox (REM units) === */
.ydg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.ydg-modal img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  border: 0;
}
.ydg-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0.375rem;
  line-height: 1;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
              box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}
.ydg-close:hover {
  background: #5F3D5DB0;
  color: #ffffff;
}
.ydg-close:focus {
  outline: none;
  box-shadow: 0 0 0 0.1875rem rgba(95, 61, 93, 0.6);
}
.ydg-prev,
.ydg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 0.5rem 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
              box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
  user-select: none;
}
.ydg-prev { left: 1rem; }
.ydg-next { right: 1rem; }
.ydg-prev:hover,
.ydg-next:hover {
  background: #5F3D5DB0;
  color: #ffffff;
}
.ydg-prev:focus,
.ydg-next:focus {
  outline: none;
  box-shadow: 0 0 0 0.1875rem rgba(95, 61, 93, 0.6);
}
.ydg-close:active,
.ydg-prev:active,
.ydg-next:active {
  transform: translateY(-50%) scale(0.98);
}
.ydg-close:active {
  transform: scale(0.98);
}
body.ydg-lock { overflow: hidden; }
@media (max-width: 37.5rem) {
  .ydg-prev,
  .ydg-next {
    font-size: 2rem;
    padding: 0.625rem 1rem;
  }
  .ydg-close {
    font-size: 1.125rem;
    padding: 0.5rem 0.75rem;
  }
}
@media (prefers-contrast: more) {
  .ydg-close,
  .ydg-prev,
  .ydg-next {
    box-shadow: 0 0 0 0.125rem rgba(0,0,0,0.35);
  }
}
