/* Full-viewport project lightbox */
body.galleryPage {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #050505;
  display: grid;
  grid-template-rows: 76px minmax(0,1fr) 72px 82px;
  color: #fff;
}

body.galleryPage > header {
  height: auto;
  min-height: 0;
  padding: 0 30px;
  border-bottom: 1px solid #ffffff14;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.galleryPage > header img {
  width: 94px;
  display: block;
}

body.galleryPage > header > a:last-child {
  font-size: 11px;
  letter-spacing: .04em;
  color: #c5e7ff;
  text-transform: uppercase;
  font-weight: 700;
}

.galleryStage {
  height: auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) 72px;
  overflow: hidden;
  position: relative;
}

.galleryImage {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  display: grid;
  place-items: center;
}

.galleryImage > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
}

.galleryImage > span {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 13px;
  background: #000b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.galleryStage > button {
  width: 48px;
  height: 48px;
  align-self: center;
  justify-self: center;
  border: 1px solid #ffffff4a;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  transition: .2s;
  background: #0006;
  color: white;
  z-index: 2;
  cursor: pointer;
}

.galleryStage > button:hover {
  background: #fff;
  color: #050505;
  border-color: #fff;
}

.galleryMeta {
  min-height: 0;
  padding: 12px 7%;
  border-top: 1px solid #ffffff14;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.galleryMeta h1 {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.galleryMeta small {
  display: block;
  margin-top: 6px;
  color: #aaa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.thumbs {
  min-height: 0;
  padding: 8px 7% 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #666 #111;
}

.thumbs button {
  flex: 0 0 88px;
  width: 88px;
  height: 58px;
  border-radius: 2px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  padding: 0;
  border: 2px solid transparent;
  opacity: .5;
  transition: all 0.2s;
}

.thumbs button.active {
  border-color: #f4ba40;
  opacity: 1;
}

.thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media(max-width:700px) {
  body.galleryPage {
    grid-template-rows: 64px minmax(0,1fr) 76px 70px;
  }
  
  body.galleryPage > header {
    padding: 0 16px;
  }
  
  body.galleryPage > header img {
    width: 78px;
  }
  
  .galleryStage {
    height: auto;
    grid-template-columns: 44px minmax(0,1fr) 44px;
  }
  
  .galleryImage {
    padding: 8px 0;
  }
  
  .galleryStage > button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .galleryMeta {
    padding: 10px 16px;
  }
  
  .galleryMeta h1 {
    font-size: 16px;
    max-width: 68vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .galleryMeta small {
    font-size: 8px;
  }
  
  .thumbs {
    padding: 6px 16px 10px;
  }
  
  .thumbs button {
    flex-basis: 76px;
    width: 76px;
    height: 50px;
  }
}
