.interactive-diagram {
  position: relative;
  display: flex;
  white-space: nowrap;
  overflow: auto;
  z-index: 1;
  cursor: grab;
}
.interactive-diagram.grabbing {
  cursor: grabbing;
}
.interactive-diagram__container {
  position: relative;
  z-index: 1;
}
.interactive-diagram__image {
  margin: 0 auto;
  width: auto;
  display: inline-flex;
  position: relative;
}
.interactive-diagram__image img {
  max-width: initial !important;
  height: auto !important;
}
.interactive-diagram__button {
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}
.interactive-diagram__button:hover, .interactive-diagram__button:focus {
  background: none;
  cursor: pointer;
  border: none;
}
.interactive-diagram__button:hover .interactive-diagram__button-add, .interactive-diagram__button:focus .interactive-diagram__button-add {
  opacity: 1;
  scale: 1.1;
}
.interactive-diagram__button:hover img, .interactive-diagram__button:focus img {
  opacity: 0.7;
  scale: 1;
  animation: none;
}
.interactive-diagram__button img {
  width: 100%;
  height: auto !important;
  opacity: 0;
  transition: 0.3s;
}
.interactive-diagram__button-add {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  translate: -50% -50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
  opacity: 0;
  scale: 0.9;
  transition: 0.3s;
}
.interactive-diagram__button-add svg {
  width: 20px;
  height: 20px;
}

.interactive-modal__close {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid black;
  color: black;
  padding: 0;
  color: black;
  opacity: 0.3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.interactive-modal__close svg {
  width: 12px;
  height: 12px;
}
.interactive-modal__close:hover {
  opacity: 1;
  color: white;
}
.interactive-modal__close:hover svg line {
  stroke: white;
}
.interactive-modal__container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 48px;
  border-radius: 10px;
  z-index: 101;
  visibility: hidden;
  transition: 0.3s;
  animation: modal-out 0.2s ease-out 0s;
  opacity: 0;
  max-height: 90vh;
  overflow: auto;
  width: 600px;
  max-width: 90vw;
}
@media screen and (max-width: 767px) {
  .interactive-modal__container {
    padding: 24px;
  }
}
.interactive-modal__bg {
  z-index: 100;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  animation: modal-bg-out 0.3s ease-out 0s;
}
.interactive-modal.open .interactive-modal__container {
  opacity: 1;
  visibility: visible;
  animation: modal-in 0.2s ease-in 0s;
}
.interactive-modal.open .interactive-modal__bg {
  opacity: 0.7;
  visibility: visible;
  animation: modal-bg-in 0.3s ease-in 0s;
}
.interactive-modal__body {
  display: flex;
  align-items: center;
  gap: 32px;
}
@media screen and (max-width: 767px) {
  .interactive-modal__body {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
.interactive-modal__body-image {
  margin: 0;
}
.interactive-modal__body-content {
  flex: 1;
  line-height: 1.7;
}
@media screen and (max-width: 767px) {
  .interactive-modal__body-content {
    flex: 100%;
  }
}

.help-modal__close {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 0;
  right: 0;
  translate: 30% -30%;
  background: black;
  color: white;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.help-modal__close svg {
  width: 12px;
  height: 12px;
}
.help-modal__close svg line {
  stroke: white;
}
.help-modal__close:hover {
  opacity: 1;
  color: white;
}
.help-modal__close:hover svg line {
  stroke: white;
}
.help-modal__container {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 16px;
  border-radius: 10px;
  z-index: 3;
  visibility: hidden;
  transition: 0.3s;
  animation: modal-up 0.2s ease-out 0s;
  opacity: 0;
  max-height: 90%;
  overflow: visible;
  width: auto;
  max-width: 94%;
}
.help-modal__bg {
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  animation: modal-bg-out 0.3s ease-out 0s;
}
.help-modal.open .help-modal__container {
  opacity: 1;
  visibility: visible;
  animation: modal-down 0.2s ease-in 0s;
}
.help-modal.open .help-modal__bg {
  opacity: 0;
  visibility: visible;
  animation: modal-bg-in 0.3s ease-in 0s;
}
.help-modal__body {
  display: flex;
  align-items: center;
  gap: 32px;
}
@media screen and (max-width: 767px) {
  .help-modal__body {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
.help-modal__body-image {
  margin: 0;
}
.help-modal__body-content {
  flex: 1;
  line-height: 1.7;
}
@media screen and (max-width: 767px) {
  .help-modal__body-content {
    flex: 100%;
    text-align: center;
  }
}
.help-modal__button {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  background: lightgrey;
  border-radius: 50%;
  padding: 0;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.help-modal__button:hover, .help-modal__button:focus {
  background: grey;
  border: none;
}

@keyframes modal-bg-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.7;
  }
}
@keyframes modal-bg-out {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}
@keyframes modal-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes modal-out {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
  }
}
@keyframes modal-down {
  0% {
    transform: translate(0%, -100%);
  }
  100% {
    transform: translate(0%, 0%);
  }
}
@keyframes modal-up {
  0% {
    transform: translate(0%, 0%);
  }
  100% {
    transform: translate(0%, -100%);
  }
}
@keyframes ping {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  80% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
