body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: Calibri, sans;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: none;
  /*border-color: #95c11e;
    border-style: solid;
    border-width: 8px;*/

  --border-color: #95c11e;
  --highlight-color: #ffe5bb;
  --bar-color: #95c11e;
  --background-color: #ffefd5;
  --filter: none;
}

body:not(.main-menu) {
  border-bottom: none;
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.flex-full {
  flex: 1 1 100%;
  overflow: hidden;
}

.audio-controls {
    height: 100%;
}

.audio-controls-wrap {
  display: flex;
}

.audio-controls-main {
  flex: 1 1 auto;
}

.audio-controls-main:not(.full) .audio-controls-buttons button.full {
  display: none;
}

.audio-controls-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
  max-height: min(10vh, 36px);
}

.audio-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 3px solid gray;
  align-items: center;
  height: 5vmax;
  z-index: 20;
  background-color: white;
}

.audio-header button {
  background-color: white;
  border: none;
  height: 100%;
}

.audio-header button.selected {
  background: #ebf2da;
}

.audio-title {
  width: 100%;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.audio-title a {
  display: block;
  width: min-content;
  color: black;
  text-decoration: none;
  padding: 0.5vmax;
  font-size: 3vmax;
}

.img-menu {
  max-height: 100%;
}

.audio-main-fragment {
  flex: 1 0 0;
  padding: 2vh;
  position: relative;
  overflow: auto;
  touch-action: pan-y;
}

.audio-main-fragment h1 {
  font-size: 150%;
}

.audio-main-fragment.images img {
  max-width: 100%;
  height: auto;
}

.audio-main-fragment:not(.images) img {
  /*max-width: 100%;
        height: auto;*/
  display: none;
}

.audio_list {
  display: none;
}

.audio-controls {
  bottom: 0;
  padding: 1vh;
  background-color: #000;
  box-sizing: border-box;
  z-index: 1;
}

.audio-controls button {
  border: none;
  background: none;
}

.audio-controls button img {
  max-width: 100%;
  max-height: 100%;
}

.audio-controls button:disabled img {
  filter: opacity(50%);
}

.audio-seek-bar-wrap {
  width: 100%;
  height: 25%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-seek-bar-background {
  background-color: #ffffff22;
  width: 100%;
  height: 100%;
  position: absolute;
}

.audio-seek-bar-value {
  background-color: var(--bar-color);
  height: 100%;
  position: absolute;
  left: 0;
}

.audio-seek-bar-buffer {
  background-color: #ffffff55;
  height: 100%;
  position: absolute;
}

.audio-mute {
  margin-left: auto;
}

.audio-padding {
  margin-right: auto;
}

.audio-time {
  color: white;
  font-weight: bold;
  z-index: 1;
}

.audio-fragment-detail {
  padding: 1vh;
  border-radius: 10px;
}

.audio-fragment audio {
  display: none;
}

.audio-fragment:not(:last-child) {
  margin-bottom: 16pt;
}

.audio-fragment:not(:first-child) {
  margin-top: 16pt;
}

.audio-fragment.selected > .audio-fragment-detail {
  background-color: var(--background-color);
  color: black;
}

.audio-fragment-question-title {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.audio-fragment-question-title:hover .audio-fragment-questionmark-button {
  transform: scale(1.2);
  animation: none;
}

.audio-fragment-questionmark-button {
  margin-right: 10px;
  font-weight: bold;
  font-size: 20px;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: none;
  padding: 5px;
}

.audio-fragment-questionmark-button img.buble {
  filter: var(--filter) drop-shadow(2px 0 0 var(--border-color)) 
  drop-shadow(0 2px 0 var(--border-color))
  drop-shadow(-2px 0 0 var(--border-color)) 
  drop-shadow(0 -2px 0 var(--border-color));
}

.audio-fragment-questionmark-button:not(.large) img {
  display: block !important;
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.audio-welcome-text .audio-fragment-questionmark-button.large {
  height: 112px;
  width: 112px;
  animation: pulse 3s infinite;
}

.audio-welcome-text .audio-fragment-questionmark-button.large img {
  display: block !important;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.audio-welcome-text.disabled .audio-fragment-questionmark-button.large {
  filter: grayscale(100%);
}

.audio-welcome-text p {
  margin: 0;
}

@keyframes pulse {
  0% {
    transform: scale(.8);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(.8);
  }
}

.audio-fragment-questionmark-button.large:hover {
  transform: scale(1);
  animation: none;
} 

.audio-question.disabled .audio-fragment-question-title {
  color: #999;
}

.audio-question.disabled .audio-fragment-questionmark-button {
  filter: grayscale(100%);
}

.audio-question.disabled .audio-answer-container,
.audio-question.disabled img,
.audio-question.disabled .audio-fragment-question-button {
  display: none !important;
}

.audio-question.disabled .audio-fragment-questionmark-button img {
  display: block !important;
}

.audio-fragment-done-button {
  font-weight: bold;
  font-size: 20px;
  background-color: #efefef;
  border-radius: 10px;
  border: 1px solid black;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  padding: 5px 10px;
}

.audio-fragment-done-button:hover {
  background-color: #ebf2da;
}

.audio-chapters {
    height: 100%;
}

/*.audio-chapter {
        border: 1px solid gray;
        border-radius: 2vw;
        padding: 3%;
        display: block;
    }

    .audio-chapter:hover {
        background-color: #ebf2da;
        border-radius: 4vw;
        cursor: pointer;
    }*/

.audio-chapter-select {
  padding: 2vmax 5vmax;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: auto;
  touch-action: pan-y;
}

.audio-chapter-select .audio-chapter {
  background-color: white;
  border: 3px solid var(--border-color);
  border-radius: 10px;
  margin: 0.5%;
  padding: 0;
  box-sizing: border-box;
  flex: 1 1 100%;
  overflow: hidden;
}

.audio-chapter-select.images .audio-chapter {
  flex: 0 1 100%;
}

.audio-chapter img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.audio-chapter-tree {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid gray;
  overflow: hidden;
  flex: 1 0 auto;
}

#id_audio_chapter_tree {
  overflow-y: auto;
  font-size: 150%;
  flex: 1 1 0;
}

.audio-chapter-frag {
  display: flex;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  margin: 5px;
  padding: 3px 6px;
  flex-direction: column;
  align-items: flex-start;
}

.audio-chapter-frag .audio-chapter-frag {
  flex: 1 1 100%;
}

.audio-chapter-frag .audio-chapter-frag.selected {
  background-color: #ffefd5;
}

.audio-chapter-frag .audio-chapter-frag:hover {
  background-color: #ebf2da;
  cursor: pointer;
}

.audio-chapter-frag .audio-chapter-frag .audio-chapter-frag {
  display: none;
}

.audio-chapter-content {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.audio-chapter-title,
.audio-chapter-frag {
  font-size: 3vmax;
}

.audio-chapter-select.images .audio-chapter-title {
  display: none;
}

.audio-chapter-select.texts img {
  display: none;
}

.audio-player-title {
  color: white;
  text-align: center;
}

.audio-menu {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.5s ease-in-out;
  z-index: 10;
  top: 5vmax;
  background-color: white;
  padding: 10px 0;
  width: 100%;
  filter: drop-shadow(0 0 2px black);
}

.audio-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  background-color: white;
  border: 3px solid var(--border-color);
  border-radius: 10px;
  margin: 0.25vmax 1vmax;
  padding: 1vmax;
}

.audio-menu .audio-menu-item {
  font-size: 2vmax;
}

.audio-chapter-buttons {
  display: flex;
  flex-wrap: wrap;
}

.audio-chapter-buttons .audio-menu-item {
  flex: 1 1 calc(50% - 2vmax);
}

.audio-menu-item > div {
  flex: 1 1 auto;
}

.audio-menu-item > img {
  max-height: 3vmax;
}

.audio-image-anchor {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.audio-image-close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 6px;
  top: 0px;
  z-index: 9;
}

.audio-image-close img {
  width: 7vmax;
  height: 7vmax;
  max-width: 48px;
  max-height: 48px;
  transition: all 0.2s ease-in-out;
}

.audio-image-close img.link-img {
  width: 5vmax;
  height: 5vmax;
  max-width: 32px;
  max-height: 32px;
  transform: none !important;
}

.audio-image-anchor.hidden .audio-image-close img {
  transform: rotate(180deg);
}

.audio-image-anchor.hidden {
  display: flex;
}

.audio-image-anchor.hidden #id_audio_image img {
  max-height: 0;
  padding: 0;
}

#id_audio_image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

#id_audio_image img {
  max-width: 100%;
  max-height: min(40vh, 150px);
  height: auto;
  width: auto;
  box-sizing: border-box;
  transition: max-height 0.5s ease-in-out;
  border-radius: 10px;
}

#id_audio_image img.audio-question-image {
  max-height: 20vh;
}

.audio-content-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  overflow: hidden;
}

.audio-fragment-answer {
  margin-bottom: 10px;
}

.audio-main-fragment img.audio-answer-image {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 360px;
  object-fit: contain;
}

.audio-fragment audio.audio-answer-audio {
  display: block;
  width: 100%;
  max-width: 360px;
}

.audio-answer-text {
  width: 100%;
  box-sizing: border-box;
  height: 56px;
  resize: vertical;
  border-radius: 10px;
  padding: 10px;
}

.audio-answer-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(max(20%, 180px), 1fr)
  );
  grid-gap: 1em;
}

.audio-scale-container {
  display: flex;
}

.audio-answer-scale {
  -webkit-appearance: none; /* Remove default styling */
  width: 100%;
  height: 15px;
  margin: 20px 10px;
  background: transparent; /* Transparent background for the input itself */
  --thumb-color: hsl(60, 100%, 50%);
  filter: grayscale(100%);
  opacity: 0.5;
}

.audio-answer-scale:focus {
  outline: none; /* Remove focus outline */
}

.audio-answer-scale::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  background: linear-gradient(to left, 
    hsl(120, 100%, 50%), /* Lime */
    hsl(90, 100%, 50%),  /* Chartreuse */
    hsl(60, 100%, 50%),  /* Yellow */
    hsl(30, 100%, 50%),  /* Orange */
    hsl(0, 100%, 50%)    /* Red */
  );
  border: none;
  border-radius: 8px;
  height: 100%;
}

.audio-answer-scale::-webkit-slider-thumb {
  -webkit-appearance: none; /* Remove default styling */
  width: 60px;
  height: 60px;
  background: var(--thumb-color);
  border: 2px solid #000;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -23px; /* Center the thumb vertically */
}

.audio-answer-scale:active::-webkit-slider-thumb {
  background: #fff;
}

.audio-answer-scale::-moz-range-track {
  width: 100%;
  height: 15px;
  background: linear-gradient(to left,
    hsl(120, 100%, 50%), /* Lime */
    hsl(90, 100%, 50%),  /* Chartreuse */
    hsl(60, 100%, 50%),  /* Yellow */
    hsl(30, 100%, 50%),  /* Orange */
    hsl(0, 100%, 50%)    /* Red */
  );
  border: none;
  border-radius: 8px;
  height: 100%;
}

.audio-answer-scale::-moz-range-thumb {
  width: 40px;
  height: 40px;
  background: var(--thumb-color);
  border: 2px solid #000;
  border-radius: 50%;
  cursor: pointer;
}

.audio-answer-scale:active::-moz-range-thumb {
  background: #fff;
}

.audio-answer-scale::-ms-track {
  width: 100%;
  height: 15px;
  background: transparent; /* Transparent background for the input itself */
  border-color: transparent;
  color: transparent;
}

.audio-answer-scale::-ms-fill-lower {
  background: linear-gradient(to left, 
    hsl(120, 100%, 50%), /* Lime */
    hsl(90, 100%, 50%),  /* Chartreuse */
    hsl(60, 100%, 50%),  /* Yellow */
    hsl(30, 100%, 50%),  /* Orange */
    hsl(0, 100%, 50%)    /* Red */
  );
  border: none;
  border-radius: 8px;
  height: 100%;
}

.audio-answer-scale::-ms-fill-upper {
  background: linear-gradient(to left, 
    hsl(120, 100%, 50%), /* Lime */
    hsl(90, 100%, 50%),  /* Chartreuse */
    hsl(60, 100%, 50%),  /* Yellow */
    hsl(30, 100%, 50%),  /* Orange */
    hsl(0, 100%, 50%)    /* Red */
  );
  border: none;
  border-radius: 8px;
  height: 100%;
}

.audio-answer-scale::-ms-thumb {
  width: 60px;
  height: 60px;
  background: var(--thumb-color);
  border: 2px solid #000;
  border-radius: 50%;
  cursor: pointer;
}

.audio-answer-scale:active::-ms-thumb {
  background: #fff;
}

.audio-fragment.selected .audio-answer-scale {
  filter: none;
  opacity: 1;
}

label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 2px solid var(--border-color);
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

label.no_padding {
  padding: 0;
}

label:not(.disabled):hover {
  background-color: var(--highlight-color);
  transform: scale(1.05);
}

input[type="radio"]:disabled:not(.correct) + label,
input[type="checkbox"]:disabled:not(.correct) + label {
  filter: grayscale(100%);
  color: #999;
}

input[type="radio"]:disabled + label img, input[type="checkbox"]:disabled + label img {
  opacity: 0.5;
}

.hidden {
  display: none;
}

.teacher {
  display: none;
}

input[type="radio"].correct + label, input[type="checkbox"].correct + label {
  border: 2px solid #95c11e;
  background-color: #ebf2da;
}

.audio-questions-select-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 20px 10px;
  flex-wrap: wrap;
}

.audio-questions-select {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 15px;
  margin: 15px;
  box-sizing: border-box;
  border: 2px solid var(--border-color);
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-size: 18pt;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-align: center;
  color: black;
  text-decoration: none;
}

.audio-questions-select:hover {
  background-color: #ebf2da;
  transform: scale(1.1);
}

.audio-scale-labels-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.audio-scale-labels {
  display: flex;
  justify-content: space-between;
  flex: 1;
}

.audio-scale-label {
  width: 6%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  cursor: pointer;
}

.audio-scale-label.selected {
  border: 3px solid #000;
  box-sizing: border-box;
}

.scale-arrow-left {
  color: hsl(240, 100%, 50%);
  width: 5%;
  font-size: 4vw;
  cursor: pointer;
  user-select: none;
  webkit-user-select: none;
}

.scale-arrow-right {
  color: hsl(0, 100%, 50%);
  width: 5%;
  font-size: 4vw;
  cursor: pointer;
  user-select: none;
  webkit-user-select: none;
  transform: rotate(180deg);
}

.audio-content-end-button {
  position: relative;
  flex: 1;
  width: 100%;
  margin: 15px;
  box-sizing: border-box;
  border: 2px solid var(--border-color);
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  color: black;
  background-color: white;
  text-decoration: none;
  min-width: 200px;
  padding: 0;
}

.audio-content-end-button img {
  display: block !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-height: 200px;
}

.audio-content-end-button img.audio-content-end-button-icon {
  display: block !important;
  position: absolute;
  width: 100%;
  height: auto;
  max-height: 100%;
  right: 0;
  bottom: 0;
  object-fit: contain;
  object-position: center;
}

.audio-content-end-button .button-white-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0.7;
  left: 0;
  top: 0;
}

.audio-content-end-button:hover {
  transform: scale(1.1);
}

.audio-welcome-text {
  text-align: left;
}

.show {
  display: initial !important;
}

.links-container {
  height: 100%;
  overflow: visible;
}

#id_links {
  position: relative;
  max-height: 100%;
  height: 100%;
  transition: max-height 0.5s ease-in-out;
  padding-top: 30px;
  overflow: visible;
}

#id_links.hidden {
  display: block !important;
  max-height: 0 !important;
}

#id_links.hidden .links-container {
  overflow: hidden;
}

#id_links.hidden .audio-image-close img {
  transform: rotate(180deg);
}

.questionmark_image {
  position: relative;
}

.questionmark_image img.questionmark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/*@media only screen and (pointer: coarse) and (min-width: 320px) and (max-width: 812px) and (orientation: landscape) {*/
@media only screen and (orientation: landscape) {
  /*html {
        transform: rotate(-90deg);
        transform-origin: left top;
        position: absolute;
        top: 100%;
        left: 0;
        }*/
  .audio-content-wrap {
    flex-direction: row;
  }

  #id_audio_main {
    font-size: 150%;
  }

  .audio-image-anchor .audio-image-close img {
    /*width: 5vh; 
            height: 5vh;*/
    display: none;
  }

  #id_audio_image {
    width: 40vw;
  }

  #id_audio_image img {
    max-width: 100%;
    max-height: 100% !important;
    height: auto;
    width: auto;
    box-sizing: border-box;
  }

  .audio-menu {
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
  }

  .audio-chapter-select.images .audio-chapter {
    flex: 0 1 49%;
  }

  .audio-chapter-frag .audio-chapter-frag {
    flex: 1 1 40%;
  }

  .scale-arrow-left,
  .scale-arrow-right {
    font-size: 3vw;
  }
}
