/* Picture Zoom Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--modal-z-index);
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-md);
  overflow: auto;
}

.modal.is-open {
  display: flex;
}

/* Modal Content */
.modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  max-width: 100%;
  max-height: 100%;
}

/* Modal Image */
.modal__image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}

.modal__image {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Modal Label */
.modal__label {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  text-align: center;
}

.modal__info-left {
  flex: 1;
  text-align: left;
}

.modal__info-right {
  flex: 1;
  text-align: right;
}

.modal__title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height);
}

.modal__details {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height);
}

/* Close button (visually hidden but accessible) */
.modal__close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 24px;
  color: var(--color-text);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.modal__close:hover {
  opacity: 1;
}

/* Body scroll lock when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
  .modal {
    padding: var(--spacing-sm);
  }

  .modal__image-container {
    max-height: calc(100vh - 80px);
  }

  .modal__image {
    max-height: calc(100vh - 80px);
  }
}
