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

/* --- Container & Layout --- */
.content-container {
  display: grid;
  grid-template-columns: 1fr 11.5rem;
  column-gap: 1.75rem;
  align-items: start;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2rem 3rem 2rem 2rem;
}

.clues-container {
  grid-column: 1;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
}

.clues-container .clue {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
  padding: 0;
  color: #333;
  display: block;
}

/* --- Table Styles (The Fix for Vertical Layout) --- */
.schedules-table {
  grid-column: 1;
  width: 100%;
  max-width: 80rem;
  margin-bottom: 1rem;
}

.schedules-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'League Spartan', sans-serif;
  table-layout: fixed; /* Forces the 25% width to be respected */
}

.schedules-table td {
  padding: 0.5rem;
  text-align: center;      /* Centers images/dropzones horizontally */
  vertical-align: middle;  /* Centers images/dropzones vertically */
  width: 25%;              /* Sets 4 equal columns */
  position: relative;
  display: table-cell;     /* Reverts flexbox override to keep row structure */
}

/* --- Content Inside Table --- */
.schedule-image {
  width: 15rem;
  border-radius: 0.5rem;
  object-fit: contain;
  display: inline-block;
}

.drop_element {
  width: 10rem;
  height: 7.5rem;
  border: 0.125rem dashed #F9B002;
  border-radius: 0.5rem;
  background-color: rgba(249, 176, 2, 0.05);
  box-sizing: border-box;
  display: flex;           /* Flex is okay here to center the drag element inside */
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 0 auto;          /* Ensures the box is centered in the table cell */
}

/* --- Drag Elements & States --- */
.drag-elements-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  max-width: 12.5rem;
  margin: 0;
  padding: 0;
}

/* --- Targeted layout tweaks (per request) --- */
.schedules-table table tbody tr:first-child td.image-cell:nth-child(1) {
  padding-right: 0.25rem;
}

.schedules-table table tbody tr:first-child td.drop-cell:nth-child(2) {
  padding-left: 0.25rem;
}

.schedules-table table tbody tr:first-child td.image-cell:nth-child(3) {
  padding-right: 0.25rem;
}

.schedules-table table tbody tr:first-child td.drop-cell:nth-child(4) {
  padding-left: 0.25rem;
}

.schedules-table table tbody tr:nth-child(2) td.image-cell:nth-child(1) {
  padding-right: 0.25rem;
}

.schedules-table table tbody tr:nth-child(2) td.drop-cell:nth-child(2) {
  padding-left: 0.25rem;
}

.drag_element {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  padding: 0.5rem;
  background-color: white;
  border: 0.125rem solid #00699F;
  border-radius: 0.5rem;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
  width: 10rem;
  height: 7.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.drag_element.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: scale(1.05);
}

/* --- Feedback States --- */
.drop_element.dragover {
  border-color: #00699F;
  background-color: rgba(0, 105, 159, 0.1);
  border-style: solid;
}

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

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

/* --- Drag Element inside Drop Zone adjustments --- */
.drop_element .drag_element {
  width: 100%;
  height: 100%;
  border: 0;
  background-color: transparent;
}

.name-image {
  width: auto;
  height: auto;
  max-width: 8.5rem;
  max-height: 5.5rem;
  border-radius: 0.25rem;
  object-fit: contain;
  flex-shrink: 0;
}

.name-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #00699F;
  margin-top: auto;
  align-self: center;
}
