/* Disable scrolling when modal is active */
body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Use viewport height */
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.modal.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  max-width: 70%;
  max-height: 80vh;
  margin: auto;
  z-index: 1001;
  transform: translateY(0); /* Reset any potential offset */
}

.modal-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
  background: white;
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1002;
}

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  height: 2px;
  background: black;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

/* Clickable image styles */
img.thumbnail {
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

img.thumbnail:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/* Exception for navigation images */
.top-bar img.thumbnail {
  cursor: default;
  transition: none;
}

.top-bar img.thumbnail:hover {
  opacity: 1;
  transform: none;
} 