/* Use project fonts from assets/fonts (League Spartan via main.css) */
.exercise-container {
  font-family: "League Spartan", sans-serif;
  width: 68rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Main Content with Audio and Dialogue */
.main-content {
  display: flex;
  width: 68rem;
  max-width: 80rem;
  margin: 0 auto;
}

/* Content Container */
.content-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 68rem;
}

/* Dialogue Section: first row = audio + dialogue (desno od gumba), second row = image-container */
.dialogue-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  flex: 1 1 auto;
  gap: 0 1rem;
  margin-bottom: 1rem;
}

/* Audio Container – levo, dialog desno od njega */
.audio-container {
  flex: 0 0 auto;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

/* Dialogue Container – desno od audio, zavzame preostanek vrstice */
.dialogue-section > .dialogue-container {
  flex: 1 1 0;
  min-width: 0;
}

/* Image Container – cela širina v naslednji vrstici */
.dialogue-section > .image-container {
  flex: 0 0 100%;
  width: 100%;
}

/* Audio Button */
.audio-button {
  width: 5rem;
  height: 5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-button:hover {
  transform: scale(1.05);
}

.audio-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.audio-button .pause-icon {
  display: none;
}

.audio-button.playing .play-icon {
  display: none;
}

.audio-button.playing .pause-icon {
  display: block;
}

/* Image Container */
.image-container {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  align-self: stretch;
  margin-left: 0;
  margin-top: auto;
}

.scene-image {
  max-width: 24rem;
  height: auto;
  border-radius: 0.5rem;
}

/* Odgovori v 2 vrstici (2×2) */
.image-answers-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 44rem;
  margin-top: 1rem;
  justify-items: center;
  align-content: start;
}

/* Dialogue Container */
.dialogue-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

/* Dialogue Line */
.dialogue-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* Speaker */
.speaker {
  flex: 0 0 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.speaker .bullet {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
}

/* Poseben vertikalni odmik za dvovrstične balončke (speech-bubble-flow) */
.dialogue-line:has(.speech-bubble-flow) {
  align-items: flex-start;
}

.dialogue-line:has(.speech-bubble-flow) .speaker {
  align-items: flex-start;
}

.dialogue-line:has(.speech-bubble-flow) .speaker .bullet {
  margin-top: 1rem;
}

.bullet.blue {
  background-color: #00699F;
}

.bullet.yellow {
  background-color: #F9B002;
}

/* Speech Bubble */
.speech-bubble {
  position: relative;
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Speech bubble with inline flow – text and drop in same line (form/sizes from E04_U01_1) */
.speech-bubble-flow {
  display: block;
  line-height: 1.5;
}

/* Drop zones – enaka širina kot najdaljši drag (answer3) */
.speech-bubble-flow .drop_element {
  display: inline-flex;
  vertical-align: middle;
  width: 24rem;
  min-width: 24rem;
  max-width: 24rem;
  height: 2.5rem;
  min-height: 2.5rem;
  border: 0.125rem solid #F9B002;
  border-radius: 1.25rem;
  background-color: white;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 0.25rem;
}

.speech-bubble-flow .drop_element.dragover {
  background-color: rgba(249, 176, 2, 0.1);
}

/* Answers Container */
.answers-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  background-color: #f5f7fa;
  border-radius: 0.75rem;
  margin: 0 auto 1rem;
  min-height: 5rem;
  max-width: 80rem;
  width: 100%;
}

/* Drag Element – form/sizes from E04_U01_1 */
.drag_element {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10rem;
  min-width: 10rem;
  height: 2.5rem;
  border: 0.125rem solid #00699F;
  border-radius: 1.25rem;
  padding: 0.75rem 1rem;
  color: #00699F;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

.image-answers-container .drag_element {
  width: 24rem;
  max-width: 24rem;
  white-space: nowrap;
  justify-self: center;
}

.drag_element.dragging {
  cursor: grabbing;
  z-index: 100;
  transform: scale(1.05);
}

.drag_element.correct {
  border-color: #258174;
}

.drag_element.incorrect {
  border-color: #FF0000;
}

.drop_element.correct {
  border-color: #258174;
}

.drop_element.incorrect {
  border-color: #FF0000;
}

/* Ko je drag v drop (enako kot E04_U01_1) */
.drop_element .drag_element {
  border: 0;
  background: none;
  color: #00699F;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Touch Device Support */
@media (hover: none) {
  .drag_element {
    touch-action: none;
  }
}

