/* Namespaced styles keep the viewer independent of legacy page CSS. */
dialog.mga-lightbox {
  box-sizing:border-box; position:fixed; inset:0; margin:auto;
  width:calc(100% - 2rem); max-width:70rem;
  max-height:calc(100vh - 2rem); max-height:calc(100dvh - 2rem);
  padding:1rem; overflow:auto; border:3px solid #c10000; border-radius:0;
  background:#fff url('../images/backgrounds/paper-background-3.jpg') repeat;
  color:#111; font:1rem/1.5 Arial,Helvetica,sans-serif; text-align:center;
}
.mga-lightbox::backdrop { background:rgba(0,0,0,.85); }
.mga-lightbox *, .mga-lightbox *::before, .mga-lightbox *::after { box-sizing:border-box; }
.mga-lightbox [hidden] { display:none!important; }
.mga-lightbox .mga-lightbox__header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.mga-lightbox .mga-lightbox__title { margin:0; color:#c10000; font:bold 1.5rem/1.2 Georgia,'Times New Roman',serif; letter-spacing:normal; text-shadow:none; }
.mga-lightbox .mga-lightbox__figure { margin:0; padding:0; }
.mga-lightbox img.mga-lightbox__image { display:block; margin:auto; width:auto; height:auto; max-width:100%; max-height:60vh; max-height:60dvh; border:2px solid #111; border-radius:0; object-fit:contain; }
.mga-lightbox .mga-lightbox__caption { margin:.75rem 0 0; font:1rem/1.5 Arial,Helvetica,sans-serif; color:#111; overflow-wrap:anywhere; }
.mga-lightbox .mga-lightbox__status { margin:.75rem 0; font:1rem/1.5 Arial,Helvetica,sans-serif; color:#111; }
.mga-lightbox .mga-lightbox__controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.75rem; }
.mga-lightbox .mga-lightbox__button { appearance:none; min-width:2.75rem; min-height:2.75rem; padding:.5rem .75rem; border:2px solid #c10000; border-radius:0; background:#c10000; color:#fff; font:bold 1rem/1.5 Arial,Helvetica,sans-serif; cursor:pointer; white-space:normal; }
.mga-lightbox .mga-lightbox__button:hover { background:#000092; border-color:#000092; }
.mga-lightbox .mga-lightbox__original { display:inline-block; padding:.5rem; min-height:2.75rem; color:#000092; font:1rem/1.5 Arial,Helvetica,sans-serif; text-decoration:underline; overflow-wrap:anywhere; }
.mga-lightbox .mga-lightbox__button:focus-visible,.mga-lightbox .mga-lightbox__original:focus-visible { outline:3px solid #000092; outline-offset:3px; }
@media (max-width:37.5rem) {
  dialog.mga-lightbox { width:calc(100% - 1rem); max-height:calc(100vh - 1rem); max-height:calc(100dvh - 1rem); padding:.75rem; }
  .mga-lightbox .mga-lightbox__header { flex-wrap:wrap; }
  .mga-lightbox .mga-lightbox__title { font-size:1.25rem; }
}
@media (max-height:30rem) { .mga-lightbox img.mga-lightbox__image { max-height:40vh; max-height:40dvh; } }
