/* Image Fullscreen Modal */

.image-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.image-fullscreen--active {
  opacity: 1;
  pointer-events: all;
}

.image-fullscreen__container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.image-fullscreen__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-fullscreen__controls {
  position: absolute;
  top: 50px;
  right: var(--space-md);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}

.image-fullscreen__button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ui-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.image-fullscreen__button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.image-fullscreen__button:active {
  transform: scale(0.95);
}

.image-fullscreen__button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.image-fullscreen__navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  pointer-events: none;
  z-index: 10;
}

.image-fullscreen__nav-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ui-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  pointer-events: all;
}

.image-fullscreen__nav-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.image-fullscreen__nav-button:active {
  transform: scale(0.95);
}

.image-fullscreen__nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.image-fullscreen__nav-button svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.image-fullscreen__info {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--ui-text);
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-sm);
  backdrop-filter: blur(10px);
}

.image-fullscreen__caption {
  position: absolute;
  bottom: calc(var(--space-xl) + 40px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  text-align: center;
  color: var(--ui-text);
  font-family: 'EB Garamond', 'Libre Baskerville', serif;
  font-size: var(--text-md);
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  padding: 0 var(--space-md);
}

/* Fade in animation */
@keyframes image-fullscreen-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.image-fullscreen--active .image-fullscreen__image {
  animation: image-fullscreen-fade-in 0.3s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
  .image-fullscreen__container {
    padding: var(--space-md);
  }

  .image-fullscreen__controls {
    top: 40px;
    right: var(--space-sm);
  }

  .image-fullscreen__button {
    width: 36px;
    height: 36px;
  }

  .image-fullscreen__button svg {
    width: 20px;
    height: 20px;
  }

  .image-fullscreen__nav-button {
    width: 44px;
    height: 44px;
  }

  .image-fullscreen__nav-button svg {
    width: 24px;
    height: 24px;
  }

  .image-fullscreen__navigation {
    padding: 0 var(--space-md);
  }

  .image-fullscreen__info {
    bottom: var(--space-md);
  }

  .image-fullscreen__caption {
    bottom: calc(var(--space-md) + 40px);
    font-size: var(--text-sm);
  }
}
