/* Gallery lightbox — see static/js/gallery-lightbox.js.
   Colours are taken from the theme's tokens so it reads as part of the site. */

.ccat-lightbox {
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.ccat-lightbox::backdrop {
  background: rgb(9 22 38 / 0.92);
}

.ccat-lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ccat-lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

.ccat-lightbox figcaption {
  color: #f4efe6;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  max-width: 70ch;
  margin-inline: auto;
}

.ccat-lightbox .close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  background: rgb(9 22 38 / 0.65);
  border: 0;
  border-radius: 50%;
  color: #f4efe6;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ccat-lightbox .close:hover {
  color: #d4703a;
}

/* showModal() focuses this button; keep the cue visible but on-palette rather
   than the browser's default ring over the photo. */
.ccat-lightbox .close:focus { outline: none; }
.ccat-lightbox .close:focus-visible {
  outline: 2px solid #d4703a;
  outline-offset: 2px;
}
