.h5p-image-hotspot-question .image-hotspot {
  position: absolute;
}

.h5p-image-hotspot-question .h5p-question-buttons {
  container-type: unset;
  width: unset;
}

.h5p-image-hotspot-question .image-hotspot.circle {
  border-radius: 50%;
}

.h5p-image-hotspot-question .image-wrapper {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 100%;
}

/**
 * This content type is embedded using DIV. there are several examples on themes
 * setting styles for all images, which affects this content type in a bad way.
 * Therefore overriding the most common ones here
 */
.h5p-image-hotspot-question .image-wrapper .hotspot-image {
  border: none !important;
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

.h5p-image-hotspot-question .h5peditor .file img {
  max-width: 500px;
}

.h5p-image-hotspot-question > div {
  color: var(--h5p-theme-text-third);
}

/* Image loader */
.h5p-image-hotspot-question .image-loader {
  width: 100%;
  height: 100%;
  background-color: #f6f6f6;
}

.h5p-image-hotspot-question .image-loader:after {
  position: absolute;
  content: "";
  background: url("h5p.svg") no-repeat center;
  background-size: 50% 50%;
  width: 100%;
  height: 100%;
}

.h5p-image-hotspot-question .image-loader.loading:after {
  -webkit-animation: spinning 3s infinite ease-in-out;
  animation: spinning 3s infinite ease-in-out;
}

@-webkit-keyframes spinning {
  0% {
    -webkit-transform: rotate(0deg);
  }
  30% {
    -webkit-transform: rotate(20deg);
  }
  60% {
    -webkit-transform: rotate(-20deg);
  }
}
@keyframes spinning {
  0% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(20deg);
  }
  60% {
    transform: rotate(-20deg);
  }
}

/* Feedback circles */
.h5p-image-hotspot-question .hotspot-feedback {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 0 0.25em 0 rgba(0, 0, 0, 0.5);
  background: var(--h5p-theme-feedback-incorrect-secondary);
  border: solid 2px var(--h5p-theme-feedback-incorrect-third);
  color: var(--h5p-theme-feedback-incorrect-main);
  font-size: 16px;
  visibility: hidden;
}

.h5p-image-hotspot-question .h5p-question-feedback.h5p-question-popup .h5p-question-feedback-close {
  margin: 0;
}

.h5p-image-hotspot-question .hotspot-feedback:before {
  font-family: "h5p-theme";
  content: "\e902";
  position: absolute;
  width: 100%;
  text-align: center;
  line-height: 32px;
}

/* Correct feedback */
.h5p-image-hotspot-question .hotspot-feedback.correct {
  background: var(--h5p-theme-feedback-correct-secondary);
  border: solid 2px var(--h5p-theme-feedback-correct-third);
  color: var(--h5p-theme-feedback-correct-main);
}

.h5p-image-hotspot-question .hotspot-feedback.correct:before {
  content: "\e903";
}

/* Hotspot feedback animation*/
.h5p-image-hotspot-question .hotspot-feedback.fade-in {
  animation-name: fade-in;
  -webkit-animation-name: fade-in;

  animation-duration: 0.5s;
  -webkit-animation-duration: 0.5s;

  animation-timing-function: ease-out;
  -webkit-animation-timing-function: ease-out;

  visibility: visible !important;
}

.h5p-image-hotspot-question .h5p-question-content {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.h5p-image-hotspot-question.show-feedback-as-popup .h5p-theme-pattern-container,
.h5p-image-hotspot-question.show-feedback-as-popup .h5p-question-evaluation-container {
  display: none;
}

.h5p-image-hotspot-question .h5p-question-popup .h5p-question-scorebar {
  margin: 0;
  max-height: unset;
  width: 100%;
}

@keyframes fade-in {
  0% {
    transform: scale(0);
    opacity: 0.0;
  }
  30% {
    transform: scale(1.1);
  }
  60% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@-webkit-keyframes fade-in {
  0% {
    -webkit-transform: scale(0);
    opacity: 0.0;
  }
  30% {
    -webkit-transform: scale(1.1);
  }
  60% {
    -webkit-transform: scale(0.9);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1);
    opacity: 1;
  }
}

/* Position containers for scorebar and buttons side by side */
.h5p-image-hotspot-question .h5p-question-content-wrapper {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.h5p-image-hotspot-question .h5p-question-scorebar-wrapper {
  flex: 1;
}
