[data-project-lightbox] { cursor: pointer; }
[data-project-lightbox]:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
html.has-project-lightbox { overflow: hidden; }
.project-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--white);
}
.project-lightbox::backdrop { background: rgb(20 20 20 / .76); }
.project-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.project-lightbox-toolbar { display: flex; align-items: center; gap: 12px; }
.project-lightbox-caption { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-ui); overflow-wrap: anywhere; }
.project-lightbox button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / .24);
  border-radius: var(--radius-sm);
  background: rgb(20 20 20 / .65);
  color: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.project-lightbox button svg { width: 20px; height: 20px; }
.project-lightbox [data-prev] svg { width: 14px; height: 14px; transform: rotate(90deg); }
.project-lightbox [data-next] svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.project-lightbox button:disabled { opacity: .35; cursor: default; }
.project-lightbox button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.project-lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 12px 24px; }
.project-lightbox-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; cursor: default; border-radius: var(--radius-sm); }
.project-lightbox [hidden] { display: none !important; }
.project-lightbox-status { margin: auto; text-align: center; font-size: var(--fs-ui); }
.project-lightbox-navigation { display: flex; align-items: center; justify-content: center; gap: 16px; }
.project-lightbox-count { min-width: 5ch; text-align: center; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .project-lightbox button:not(:disabled):hover { background: var(--white); border-color: var(--white); color: var(--dark); }
}
@media (max-width: 767.98px) {
  .project-lightbox { padding: 12px; gap: 8px; }
  .project-lightbox-stage { padding: 8px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-lightbox button { transition: none; }
}
