.image {
  position: relative;
  margin: 0.75rem 0;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
}

.image__toggle {
  display: none;
}

.image__placeholder {
  max-width: 100%;
  margin: 0;
}

.image__placeholder--theme-light {
  display: none;
}

.image__toggle:checked ~ .image__placeholder--theme-light {
  display: var(--image-placeholder-display-light);
}

.image__placeholder--theme-dark {
  display: none;
}

.image__toggle:checked ~ .image__placeholder--theme-dark {
  display: var(--image-placeholder-display-dark);
}

.image__label {
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  cursor: zoom-in;
}

.image__toggle:checked ~ .image__label {
  position: fixed;
  z-index: 10000;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  cursor: zoom-out;
}

.image__label--theme-light {
  display: var(--image-label-display-light);
}

.image__label--theme-dark {
  display: var(--image-label-display-dark);
}

.image__content {
  max-width: 100%;
  margin: 0;
}

.image__toggle:checked ~ .image__label > .image__content {
  object-fit: contain;
  animation: zoom 0.3s ease forwards;
}

@keyframes zoom {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
