/* E06_U05_1 – Wer macht mit? D&D tabela 5×5 (5 stolpcev, 5 vrstic). Po E06_U04. */

.exercise-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
  max-height: calc(100vh - 11rem);
  min-height: 0;
}

.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 0;
}

.items-table {
  width: 100%;
  max-width: 70rem;
  flex-shrink: 0;
  border-collapse: separate;
  /* večji vodoravni razmak med stolpci za natančnejše odlaganje na touch napravah */
  border-spacing: 2.8rem 0.2rem;
}

.items-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0.15rem;
  box-sizing: border-box;
}

.cell-photo img {
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  border-radius: 0.75rem;
}

.cell-activity {
  font-size: 1rem;
  color: #333;
}

.cell-activity .label {
  display: inline-block;
  margin: 0 0.3rem 0 0;
  vertical-align: middle;
}

.cell-activity img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* Drop in drag +30 %: 5rem → 6.5rem */
.cell-drop {
  width: 9rem;
}

.drop_element {
  width: 9rem;
  height: 9rem;
  min-width: 9rem;
  min-height: 9rem;
  border: 0.2rem solid #F9B002;
  background-color: rgba(249, 176, 2, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 0 auto;
  box-sizing: border-box;
}

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

.drag_element {
  width: 10rem;
  height: 10rem;
  min-width: 10rem;
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 0.75rem;
  cursor: grab;
  user-select: none;
  background-color: #FFF;
  border: 0.2rem solid transparent;
  overflow: hidden;
  padding: 0;
}

.drag_element img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Slika v drag elementu nekoliko povečana */
.answers-container .drag_element img {
  transform: scale(1.12);
}

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

.drop_element .drag_element {
  border: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.drop_element .drag_element img {
  transform: none;
}

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

.drop_element.incorrect,
.drag_element.incorrect {
  border-color: #FF0000;
  background-color: rgba(255, 0, 0, 0.1);
}

/* V eni vrsti pod drop stolpci – 5 stolpcev kot tabela */
.answers-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  width: 100%;
  max-width: 50rem;
  justify-items: center;
  align-items: center;
}

.answers-container > .drag_element {
  justify-self: center;
}

@media (max-width: 48rem) {
  .content-container {
    flex-direction: column;
    align-items: center;
  }

  .cell-photo img {
    width: 4rem;
    height: 4rem;
  }

  /* večji cilji in več razmika za touch naprave */
  .items-table {
    border-spacing: 1.4rem 0.2rem;
  }

  .cell-drop,
  .drop_element,
  .drag_element {
    width: 6rem;
    height: 6rem;
    min-width: 6rem;
    min-height: 6rem;
  }

  .answers-container {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(5, 1fr);
  }
}
