#image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  inset: 0;
  height: 100vh;
  width: 100vw;
  background-color: var(--color-primary);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 1100;
  overflow-y: auto;
}

#image-viewer.hidden {
  display: none;
}

#image-viewer:hover {
  cursor: zoom-out;
}

#viewer-img {
  position: absolute;
  top: 10vh;
  max-width: 100vw;
  max-height: calc(90vh - 35px);
}

.viewer-landscape {
  position: absolute;
  top: 10vh;
  width: 100vw;
  max-height: calc(90vh - 35px);
}

#image-viewer p {
  position: absolute;
  top: 0;
  color: var(--color-on-primary);
  left: var(--side-margin);
  font-family: var(--font-family-base);
  width: 85vw;
  height: auto;
  font-size: 1.2rem;
  text-align: start;
}

#viewer-close {
  position: absolute;
  top: 20px;
  right: var(--side-margin);
  width: 25px;
  height: 25px;
  border-radius: var(--a-border-radius);
  background: transparent;
  border: none;
  color: var(--color-on-primary);;
  font-size: 1rem;
  scale: 1.3;
  cursor: pointer;
  z-index: 1101;
  padding: 0;
  text-align: center;
  transition: all 0.2s ease;
}

#viewer-close:hover {
  color: var(--color-primary);
  background-color: var(--color-accent);
}

@media (max-width: 768px) {
  #viewer-close {
    font-size: 1.2rem;
    right: 15px;
  }

  #image-viewer p {
    left: 15px;
  }

  #viewer-img {
    top: 25vh;
  }
}

.no-scroll {
  overflow: hidden;
}