.lightbox {
  background-color: oklch(var(--lch-white) / 0.66);
  block-size: 100dvh;
  border: 0;
  inline-size: 100dvw;
  inset: 0;
  margin: auto;
  max-height: unset;
  max-width: unset;
  overflow: hidden;
  padding: var(--block-space) var(--inline-space);

  &[open] {
    display: grid;
    place-items: center;
  }

  &::backdrop {
    -webkit-backdrop-filter: blur(66px);
    backdrop-filter: blur(66px);
  }
}

.lightbox__btn {
  align-self: start;
  grid-area: 1/1;
  justify-self: end;
  z-index: 2;
}

.lightbox__btn--download {
  align-self: end;
  grid-area: 1/1;
  justify-self: end;
}

.lightbox__btn--share {
  align-self: start;
  grid-area: 1/1;
  justify-self: start;
}

.lightbox__image-container {
  grid-area: 1/1;
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: 100%;
  touch-action: pan-x pan-y pinch-zoom;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-inline-size: calc(100dvw - (var(--inline-space) * 2));
  max-block-size: calc(100dvh - (var(--block-space) * 2));
  min-width: 200px;
  min-height: 200px;
  transform-origin: center center;
  transition: transform 0.1s ease-out;

  &[src*="qr_code"] {
    width: 280px;
    height: 280px;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
  }
}
