/* ============================================================
   ags-item-dragdrop.css
   ============================================================ */

/* ── Topbar drag zone ─────────────────────────────────────── */
/* Toată bara de sus e zonă de drag (JS filtrează elementele interactive).
   Cursor grab pe zona liberă a topbarului; butoanele/input-urile resetează cursorul. */

.ags-dd-topbar {
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.ags-dd-topbar:active {
    cursor: grabbing;
}

/* Butoanele și elementele interactive din topbar nu moștenesc cursorul grab. */
.ags-dd-topbar button,
.ags-dd-topbar input,
.ags-dd-topbar select,
.ags-dd-topbar textarea,
.ags-dd-topbar [role="button"] {
    cursor: pointer;
}

/* ── Sursa în curs de drag — semitransparentă + mică ─────── */

.ags-dd-source-active {
    opacity: 0.38;
    transform: scale(0.97);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

/* ── Ghost card care urmărește cursorul ──────────────────── */

.ags-dd-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: #fff;
    border: 2px solid #7c3aed;
    border-radius: 10px;
    padding: 6px 14px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.22);
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: rotate(-2deg);
    animation: ags-dd-ghost-in 0.12s ease-out;
}

@keyframes ags-dd-ghost-in {
    from { opacity: 0; transform: rotate(-2deg) scale(0.85); }
    to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

/* ── Body în timp ce drag e activ ────────────────────────── */

body.ags-dd-body-dragging {
    cursor: grabbing !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.ags-dd-body-dragging * {
    cursor: grabbing !important;
}

body.ags-dd-body-dragging.ags-dd-deny-cursor,
body.ags-dd-body-dragging.ags-dd-deny-cursor * {
    cursor: not-allowed !important;
}

/* ── Sidebar tasks — hint vizual că sunt drop zones ─────── */

body.ags-dd-body-dragging .ags-tli-root {
    transition: background 0.12s ease, box-shadow 0.12s ease;
}

/* ── Drop zone hover ──────────────────────────────────────── */

.ags-dd-drop-hover {
    background: #ede9fe !important;
    box-shadow: inset 0 0 0 2px #7c3aed !important;
    border-radius: 8px;
}

/* ── Drop zone deny (same task) ──────────────────────────── */

.ags-dd-drop-deny {
    background: #fee2e2 !important;
    box-shadow: inset 0 0 0 2px #ef4444 !important;
    border-radius: 8px;
}

/* ── Ghost deny — border roșu când e deasupra task-ului sursă */

.ags-dd-ghost.ags-dd-ghost-deny {
    border-color: #ef4444;
    color: #991b1b;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.22);
}

/* ── Intra-task reorder indicator line ───────────────────── */

.ags-dd-intra-indicator {
    height: 2px;
    background: #7c3aed;
    border-radius: 2px;
    margin: 0 8px;
    pointer-events: none;
    position: relative;
    animation: ags-dd-intra-in 0.1s ease-out;
}

.ags-dd-intra-indicator::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7c3aed;
}

@keyframes ags-dd-intra-in {
    from { opacity: 0; transform: scaleX(0.7); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* ── Flash verde după drop reușit ────────────────────────── */

.ags-dd-drop-success {
    animation: ags-dd-flash 0.65s ease-out;
}

@keyframes ags-dd-flash {
    0%   { background: #bbf7d0 !important; box-shadow: inset 0 0 0 2px #10b981 !important; }
    100% { background: inherit; box-shadow: none; }
}
