/* sentence-builder.css - Styling for sentence builder questions */

.sentence-builder-container {
  width: 100%;
  margin: 1rem 0;
  position: relative;
}

/* Reset button */
.sentence-builder-reset {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--scandi-1);
  border: 2px solid var(--scandi-4);
  border-radius: 0.375rem;
  color: var(--scandi-7);
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.sentence-builder-reset:hover {
  background-color: var(--scandi-4);
  border-color: var(--scandi-5);
  color: var(--scandi-7);
}

.sentence-builder-reset i {
  display: inline-block;
  transition: transform 0.2s ease;
}

.sentence-builder-reset:hover i {
  transform: rotate(-180deg);
}

/* Sentence construction area */
.sentence-builder-construction {
  background-color: #ffffff;
  border: 2px solid var(--scandi-6);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* Word bank */
.sentence-builder-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 50px;
  margin-top: 1rem;
}

/* Individual word buttons in the bank */
.sentence-builder-word {
  background-color: var(--scandi-1);
  border: 2px solid var(--scandi-5);
  border-radius: 0.375rem;
  color: var(--scandi-7);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.sentence-builder-word:hover {
  background-color: var(--scandi-4);
  border-color: var(--scandi-5);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(131, 195, 255, 0.3);
}

/* Drop zone for sentence construction */
.sentence-builder-dropzone {
  position: relative;
  min-height: auto;
  background-color: var(--scandi-1);
  border: 2px dashed var(--scandi-4);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
  font-size: 1.1rem;
}

/* Placeholder text */
.sentence-builder-placeholder {
  color: var(--scandi-4);
  font-style: italic;
  width: 100%;
  text-align: center;
  padding: 0.4rem 0.8rem;
  line-height: 1.5;
  display: inline-block;
  font-size: 1rem;
}

/* Words placed in the sentence */
.sentence-builder-word-placed {
  background-color: var(--scandi-6);
  border: 2px solid var(--scandi-6);
  border-radius: 0.375rem;
  color: #ffffff;
  font-size: 1rem;
  padding: 0.4rem 0.8rem;
  cursor: move;
  user-select: none;
  transition: all 0.2s ease;
  margin: 0;
  line-height: 1.5;
}

.sentence-builder-word-placed:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
  background-color: var(--scandi-red) !important;
  border-color: var(--scandi-red) !important;
}

/* Drop indicator - show gap where word will be inserted */
.sentence-builder-word-placed.drag-over-before {
  margin-left: 3rem !important;
}

.sentence-builder-word-placed.drag-over-after {
  margin-right: 3rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sentence-builder-word,
  .sentence-builder-word-placed {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
  }

  .sentence-builder-dropzone {
    font-size: 1rem;
    line-height: 2.2;
  }
}
