/* Google Font - League Spartan */
@font-face {
  font-family: 'League Spartan';
  src: url('../assets/fonts/LeagueSpartan-VariableFont_wght.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* Main Container */
.exercise-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
}

/* Table Container */
.table-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Exercise Table */
.exercise-table {
  border-collapse: separate;
  border-spacing: 1.5rem;
  margin: 0 auto;
}

/* Audio Row */
.audio-row td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: middle;
}

/* Drop Row */
.drop-row td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: middle;
}

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

.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;
}

/* Drop Element */
.drop_element {
  width: 7rem;
  height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #ddd;
  margin: 0 auto; /* Center the drop element */
}

/* Drag Container */
.drag-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
}

/* Drag Element */
.drag_element {
  width: 7rem;
  height: 7rem;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid #ddd;
  position: relative; /* Add position relative */
}

.drag_element img {
  width: 100%; /* Use fixed width instead of max-width */
  height: 100%; /* Use fixed height instead of max-height */
  object-fit: contain;
  pointer-events: none; /* Prevent the image from receiving pointer events */
}

.drag_element.dragging {
  opacity: 0.6;
  cursor: grabbing;
  z-index: 1000; /* Ensure dragged element appears above others */
}



/* Media Query for smaller screens */
@media (max-width: 768px) {
  .exercise-table {
    border-spacing: 1rem;
  }
  
  .drop_element, .drag_element {
    width: 6rem;
    height: 6rem;
  }
  
  .audio-button {
    width: 4rem;
    height: 4rem;
  }
  
  .drag-container {
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  }
}

/* Touch Device Support */
@media (hover: none) {
  .drag_element {
    touch-action: none;
  }
} 
.audio-player{
  position: relative;
  left: auto !important;
  top: auto !important;
  padding-left: 1.1rem;
}

.drop_element .drag_element {
  border:0;
  background:none;
}
/* Correct and Incorrect Styles */
.drop_element.correct {
  border: 2px solid #4CAF50; /* Green border for correct answers */
}

.drop_element.incorrect {
  border: 2px solid #F44336; /* Red border for incorrect answers */
}