/**
 * Gegenstände im Klassenzimmer. - Exercise Styles
 * Drag-and-drop: words to numbers (same layout as E04_U06_2)
 */

@font-face {
  font-family: "League Spartan";
  src: url('../assets/fonts/LeagueSpartan-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.exercise-container {
  width: 74rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "League Spartan", sans-serif;
  flex: 1;
  min-height: 0;
  padding-bottom: 0.5rem;
}

/* Kompaktna mreža slik, da vsebina ne prekrije footerja */
/* Mreža 7×3, kvadratne celice (aspect-ratio 1:1) – višina vrstic iz vsebine */
.images-area {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 0.3rem;
  width: 56rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem;
  background-color: #f0f4f8;
  border-radius: 0.5rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Kvadratne celice – razmerje 1:1 glede na sliko */
.images-area .image-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.1);
}

.images-area .exercise-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.sentence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.1rem 1rem;
  width: 50rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.sentence-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
}

.sentence-label {
  flex-shrink: 0;
  width: 3rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00699f;
}

/* Enaka velikost kot .drag_element (po najdaljši besedi „Whiteboard“) */
.drop_element {
  width: 11ch;
  min-width: 11ch;
  height: 2.5rem;
  min-height: 2.5rem;
  border-radius: 1.25rem;
  border: 0.2rem solid #F9B002;
  background-color: rgba(249, 176, 2, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.drop_element.dragover {
  border-color: #00699f;
  background-color: rgba(0, 105, 159, 0.08);
}

.drop_element .drag_element {
  background-color: transparent;
  border: 0;
  margin: 0;
  width: 11ch;
  min-width: 11ch;
  cursor: default;
}

/* Natančno 2 vrstici × 5 elementov */
.answers-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 0.4rem;
  width: 60rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
  justify-items: center;
}

/* Vsi enaki po velikosti najdaljše besede (Whiteboard) */
.drag_element {
  width: 11ch;
  min-width: 11ch;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-family: "League Spartan", sans-serif;
  user-select: none;
  border-radius: 1.25rem;
  border: 0.2rem solid #00699F;
  background: #fff;
  cursor: grab;
  box-sizing: border-box;
}

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

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

.drop_element.incorrect, .drag_element.incorrect {
  border-color: #ff0000;
}

.ghost {
  pointer-events: none;
}
