/**
 * Hobbys – D&D: table + drag elements on the right
 * Table shape/layout same as E08_U05_2
 */

.exercise-container {
  width: 100%;
  max-width: 75rem;
  height: 100%;
  max-height: 42rem;
  margin: 0 auto;
  padding: 0.25rem 0.75rem;
  font-family: 'League Spartan', sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.table-and-answers {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  min-height: 0;
}

/* Table form same as E08_U05_2 – brez obrob in črt */
.hobby-table {
  flex: 1 1 auto;
  min-width: 0;
  width: 46.25rem;
  border-collapse: collapse;
  background-color: #fff;
  font-family: 'League Spartan', sans-serif;
  table-layout: fixed;
}

.hobby-table td {
  padding: 0.5rem 0.5rem;
  vertical-align: middle;
  text-align: left;
  min-height: 3.0rem;
  height: 3.0rem;
}

/* Razmak med 2. in 3. vrstico ter med 6. in 7. vrstico */
.hobby-table tbody tr:nth-child(4) td,
.hobby-table tbody tr:nth-child(7) td {
  padding-top: 1.25rem;
}

.img-cell {
  width: 20%;
  text-align: left;
}

.img-cell img {
  max-width: 100%;
  max-height: 2.6rem;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0;
}

/* Left column images: align to right edge of the cell */
.hobby-table tr td.img-cell:first-child {
  text-align: right;
}

.hobby-table tr td.img-cell:first-child img {
  margin-left: auto;
  margin-right: 0;
}

.img-cell:empty::after {
  content: none;
}

.sentence-cell {
  font-size: 0.95rem;
  line-height: 1.3;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem; 

}

.sentence-cell .sentence {
  font-family: 'League Spartan', sans-serif;
}

/* Drop same size as drag (longest word: fotografiert) */
.sentence-cell .drop_element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11rem;
  min-width: 11rem;
  height: 2rem;
  min-height: 2rem;
  flex-shrink: 0;
}

.drop_element {
  border: 0.15rem solid #F9B002;
  border-radius: 0.9rem;
  background-color: #fff;
  padding: 0 0.4rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.drop_element.dragover {
  background-color: rgba(249, 176, 2, 0.15);
}

.drop_element.correct {
  border-color: #258174;
  background-color: rgba(37, 129, 116, 0.1);
}

.drop_element.incorrect {
  border-color: #e00;
  background-color: rgba(255, 0, 0, 0.08);
}

.drop_element .drag_element {
  border: 0;
  background-color: transparent;
}

/* Drag elements – right side, same size as drop (longest word: fotografiert) */
.answers-container {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 16rem;
  min-width: 16rem;
}

.drag_element {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: 1rem;
  user-select: none;
  width: 11rem;
  min-width: 11rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.5rem;
  box-sizing: border-box;
  background-color: #fff;
  border: 0.15rem solid #00699F;
  border-radius: 0.9rem;
}

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

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

.drag_element.incorrect {
  border-color: #e00;
}
@media (hover: none) {
  .drag_element {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

@media (max-width: 64rem) {
  .exercise-container {
    padding: 0.2rem 0.5rem;
  }

  .img-cell img {
    max-height: 2.2rem;
  }

  .sentence-cell {
    font-size: 0.9rem;
  }
}

