/* Mediengalerie im Projektdialog: Originalaufnahmen ohne Beschnitt. */
.project-gallery {
  position: sticky;
  top: 0;
  align-self: start;
  min-width: 0;
  padding: 26px 22px;
  background: #202922;
  color: #edf1e9;
}
.gallery-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}
.gallery-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.gallery-count {
  color: #b9c5b4;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gallery-figure {
  margin: 0;
}
.gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: min(54dvh, 500px);
  min-height: 320px;
  overflow: hidden;
  background: #0c100d;
}
.project-gallery.has-multiple .gallery-stage {
  height: min(42dvh, 400px);
  min-height: 240px;
}
.gallery-media {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.gallery-video {
  color-scheme: dark;
}
.gallery-image-open {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.gallery-image-open:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: -4px;
}
.gallery-enlarge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #a8b49c99;
  border-radius: 3px;
  background: #101711ed;
  color: #edf1e9;
  font-size: 10px;
  font-weight: 700;
}
.gallery-enlarge:hover {
  background: #303e2d;
}
.gallery-note {
  margin-top: 10px;
  color: #a5b39f;
  font-size: 9px;
  line-height: 1.7;
}
.gallery-note[hidden] {
  display: none;
}
.gallery-navigation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.gallery-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #56624f;
  border-radius: 50%;
  background: transparent;
  color: #edf1e9;
  font-size: 23px;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s;
}
.gallery-arrow:hover {
  background: var(--lime);
  color: var(--on-lime);
}
.gallery-position {
  text-align: center;
  color: #c3cebe;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.gallery-thumbnails {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 8px 8px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #68775f #202922;
  scroll-snap-type: x proximity;
}
.gallery-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 92px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 2px;
  background: #101711;
  color: #edf1e9;
  scroll-snap-align: start;
}
.gallery-thumbnail.is-active {
  border-color: var(--lime);
}
.gallery-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb-placeholder {
  font-size: 21px;
  color: var(--lime);
}
.gallery-thumb-type,
.gallery-thumb-number {
  position: absolute;
  bottom: 4px;
  padding: 2px 4px;
  background: #101711e6;
  color: #edf1e9;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.5;
}
.gallery-thumb-type {
  left: 4px;
}
.gallery-thumb-number {
  right: 4px;
}
.project-gallery :focus-visible {
  outline-color: var(--lime);
}
.gallery-error {
  display: grid;
  gap: 14px;
  padding: 25px;
  text-align: center;
  font-size: 12px;
  color: #c3cebe;
}
.gallery-error a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 760px) {
  .project-gallery {
    position: static;
    padding: 22px;
  }
  .gallery-topline {
    padding-right: 40px;
    padding-bottom: 15px;
  }
  .gallery-stage {
    height: min(55dvh, 440px);
    min-height: 260px;
  }
}
@media (max-width: 480px) {
  .project-gallery {
    padding: 21px;
  }
  .gallery-stage {
    min-height: 230px;
  }
  .gallery-thumbnail {
    flex-basis: 82px;
    height: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-arrow {
    transition: none;
  }
  .gallery-thumbnails {
    scroll-snap-type: none;
  }
}
