/* primitives/dnd.css
   Neutral base styles for the generic drag-and-drop primitive (dnd-* prefix).
   Question-types can override/extend within their own module scope.
*/

.dnd-container {
  width: 100%;
  margin: 12px 0;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #1f2937;
}

/* Reorder */
.dnd-reorder .dnd-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* Buckets */
.dnd-buckets .dnd-buckets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.dnd-buckets .dnd-targets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 760px) {
  .dnd-buckets .dnd-buckets-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dnd-buckets .dnd-targets {
    grid-template-columns: 1fr 1fr;
  }
}

.dnd-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e6e9ee;
  box-shadow: 0 1px 0 rgba(16,24,40,0.02);
  cursor: grab;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.dnd-item:active {
  cursor: grabbing;
}
.dnd-item:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(14,165,233,0.08);
  border-color: #0ea5e9;
  transform: translateY(-2px);
}
.dnd-item .dnd-item-handle {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #e2e8f0;
  margin-top: 2px;
  flex-shrink: 0;
}

.dnd-item.dnd-dragging {
  opacity: 0.85;
  transform: scale(0.98);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.08);
}

.dnd-source,
.dnd-target {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  min-height: 72px;
}
.dnd-target .dnd-target-label {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.dnd-target .dnd-target-dropzone {
  min-height: 42px;
}

.dnd-over {
  border-color: #60a5fa !important;
  box-shadow: inset 0 0 0 2px rgba(96,165,250,0.2);
}

.dnd-correct {
  border-color: #10b981 !important;
  background: linear-gradient(180deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02));
  box-shadow: 0 8px 20px rgba(16,185,129,0.06);
}
.dnd-incorrect {
  border-color: #ef4444 !important;
  background: linear-gradient(180deg, rgba(239,68,68,0.04), rgba(239,68,68,0.02));
  box-shadow: 0 8px 20px rgba(239,68,68,0.04);
}

.dnd-source .dnd-item,
.dnd-target .dnd-item,
.dnd-list .dnd-item {
  margin-bottom: 8px;
}
.dnd-source .dnd-item:last-child,
.dnd-target .dnd-item:last-child,
.dnd-list .dnd-item:last-child {
  margin-bottom: 0;
}