/* Main Container */
.exercise-container {
  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 */
.dialogue-section {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  width: 100%;
  margin-bottom: 1rem;
}

/* Audio Container */
.audio-container {
  flex: 0 0 5rem;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

/* 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: flex-start;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

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

.image-answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1rem;
}

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

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

/* Multiline dialogue line - icon aligns with first line */
.dialogue-line-multiline {
  align-items: flex-start;
}

/* 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%;
}

/* For multiline dialogue, align icon with first line of text */
.dialogue-line-multiline {
  align-items: flex-start;
}

.dialogue-line-multiline .speaker {
  align-items: flex-start;
}

/* Fine-tune vertical position for multiline speech bubbles */
.dialogue-line:has(.speech-bubble-multiline) .speaker .bullet {
  margin-top: 1rem;
}

/* Fine-tune vertical position for specific two-line yellow bullet (4th dialogue line) */
.dialogue-container .dialogue-line:nth-child(4) .speaker .bullet {
  margin-top: -1.5rem;
}

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

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

/* Speech Bubble */
.speech-bubble {
  position: relative;
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 0rem 1rem;
  flex: 1;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

/* Multiline speech bubble */
.speech-bubble-multiline {
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 1rem;
}

.speech-bubble-multiline .speech-line {
  width: 100%;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.speech-bubble-multiline .speech-line:last-child {
  margin-bottom: 0;
}

/* Drop Element in Speech Bubble */
.speech-bubble .drop_element {
  width: 100%;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  padding: 0.25rem;
  box-sizing: border-box;
}

.speech-bubble-multiline .drop_element {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 0.5rem;
}

/* 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 */
.drag_element {
  padding: 0.5rem 1rem;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
  min-width: 10rem;
  max-width: 100%;
  width: 24rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
}

.drag_element.dragging {
  opacity: 0.6;
  cursor: grabbing;
}

/* Using styles from main.css */
.drop_element.correct {
  border-color: #258174;
}

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

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

.drop_element .drag_element {
  border: none;
  background: transparent;
  width: 100%;
  padding: 0.25rem 0.5rem;
}

