/* ========================================================
   Qubenix OS — Reusable Drag & Drop Visual Styles
   Accent: #3C32A3 | Enterprise Micro-interactions
   ======================================================== */

.qubenix-draggable {
  cursor: grab !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.qubenix-draggable:active {
  cursor: grabbing !important;
}

/* Original element state while being dragged */
.qubenix-dragging {
  opacity: 0.38 !important;
  transform: scale(0.98) !important;
  box-shadow: none !important;
}

/* Drop target zones */
.qubenix-drop-zone {
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Active hover state when dragging over a valid target */
.qubenix-drop-active {
  background-color: rgba(60, 50, 163, 0.05) !important;
  outline: 2px dashed #3C32A3 !important;
  outline-offset: -2px;
}

.qubenix-drop-invalid {
  background-color: rgba(220, 53, 69, 0.04) !important;
  outline: 2px dashed #DC3545 !important;
  outline-offset: -2px;
}

/* Placement placeholder indicator */
.qubenix-drop-placeholder {
  border: 2px dashed rgba(60, 50, 163, 0.35);
  border-radius: 8px;
  background: rgba(60, 50, 163, 0.03);
  margin: 6px 0;
  min-height: 48px;
  transition: all 0.15s ease;
  pointer-events: none;
}

/* Drag Ghost Overlay (Custom drag clone) */
.qubenix-drag-ghost {
  position: fixed;
  top: -1000px;
  left: -1000px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0.95;
  transform: rotate(2deg) scale(1.03);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(60, 50, 163, 0.25);
  border-radius: 8px;
  background: #ffffff;
  max-width: 320px;
  overflow: hidden;
}

/* Optimistic Saving Indicator Badge */
.qubenix-saving-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #3C32A3;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 12px;
  animation: pulseSaving 1.2s infinite ease-in-out;
}

@keyframes pulseSaving {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}
