/* thumbnail grid */

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  width: fit-content;
  margin: 0 auto;
}

.thumb {
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 15px;
  background: var(--content-bg);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* overlay backdrop */

#overlay {
  display: none;
  position: fixed;
  inset: 0;
  padding-top: 80px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s, backdrop-filter 0.3s;
}

#overlay.active {
  opacity: 1;
}


/* art content */

#art-content {
  max-width: 97%;
  max-height: 90%;
  text-align: center;
  align-self: center;
  flex-direction: row;
  transform: scale(0.8);
  transition: transform 0.3s ease-out;
}

#overlay.active #art-content {
  transform: scale(1);
}

#art-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 15px;
}


/* toolbar */

#toolbar {
  display: flex;
  gap: 5px;
  margin: 0 0 15px 25px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s 0.1s, transform 0.3s 0.1s;
}

#overlay.active #toolbar {
  opacity: 1;
  transform: translateY(0);
}


/* toolbar buttons */

.closeButton,
.swap {
  border: none;
  padding: 10px;
  margin: 0;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.closeButton:hover,
.swap:hover {
  background: rgba(255, 255, 255, 0.5);
}

.closeButton {
  border-radius: 100px;
}

#backward { border-radius: 0 100px 100px 0; }
#forward  { border-radius: 100px 0 0 100px; }


/* title pill */

#title {
  border: none;
  border-radius: 100px;
  padding: 10px;
  margin: 0;
  min-width: fit-content;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(5px);
}

#title:hover {
  background: rgba(255, 255, 255, 0.5);
}


/* context box */

.context {
  width: 90%;
  min-width: 75%;
  padding: 10px;
  border-radius: 15px;
  background: var(--content-bg);
  backdrop-filter: blur(5px);
  text-align: left;
}


/* nav overrides when overlay is open */

#overlay.active ~ * .navBtn,
#overlay.active ~ * .navContainer .navBtn,
html.light body.overlay-open .navBtn,
.header p,
#online,
#btn,
.themeToggle {
  color: white;
}