.superzoom {
  position: relative;
  text-align: center;
}

.superzoom-container {
  position: relative;
  display: inline-block;
}

.superzoom-btn-open {
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
  border: 0;
  border-radius: 3px;
  aspect-ratio: 1;
  cursor: pointer;
  z-index: 10;
}

.superzoom-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: auto;
}

.superzoom-wrapper > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.superzoom-viewport {
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.superzoom-content img {
  width: auto;
  height: auto;
  margin: auto;
  max-width: none !important;
}

.superzoom-dialog-controls {
  position: absolute;
  top: 1rem;
  right: 2rem;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.superzoom-dialog-controls .superzoom-dialog-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
  border: 0;
  border-radius: 3px;
  aspect-ratio: 1;
  cursor: pointer;
  z-index: 10;
}

.superzoom-dialog {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  background: #000;
}

.superzoom-dialog[open] {
  animation: animation-open-modal .3s cubic-bezier(.25,0,.3,1) forwards;
}

.superzoom-dialog:not([open]) {
  pointer-events: none;
  opacity: 0;
}

@keyframes animation-open-modal {
  0% {
    opacity: 0;
    transform: scale(.75);
  }
}
