
/* ============================================
   Morph Pose Slider (منزلق أوضاع التحولات) v4.8.2
   ============================================ */
.morph-pose-slider {
    padding: 3px 10px 4px;
    background: var(--bg-panel);
    border-bottom: 1px solid rgba(42, 45, 53, 0.5);
}

/* الشريط العلوي: مقبض سحب صغير (يسار) + اسم المجموعة (يمين) — سحبه يحرك الشريط */
.morph-pose-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    direction: ltr;
    cursor: move;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.morph-pose-grip {
    flex: 0 0 auto;
    width: 26px;
    height: 4px;
    border-radius: 2px;
    background: var(--text-dim);
    opacity: 0.7;
}
.morph-pose-float .morph-pose-grip {
    background: var(--text-bright);
    opacity: 0.9;
}
.morph-pose-title {
    margin-left: auto;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.2;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
}

/* الشريط العائم فوق المسرح (سحب + تحجيم + خلفية عادية) */
.morph-pose-float {
    position: fixed;
    z-index: 9000;
    width: 240px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.24);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.morph-pose-float .morph-pose-title {
    color: var(--text-bright);
}

/* إضاءة خلفية الشريط أثناء سحبه فوق المسرح */
.morph-pose-float.morph-pose-dragging {
    background: rgba(99, 102, 241, 0.14);
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}

/* مقبض تغيير الحجم (يظهر فقط عند العوم) */
.morph-pose-resize {
    display: none;
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
    border-right: 2px solid var(--text-dim);
    border-bottom: 2px solid var(--text-dim);
    border-bottom-right-radius: 2px;
    opacity: 0.8;
    pointer-events: auto;
}
.morph-pose-float .morph-pose-resize {
    display: block;
}
.morph-pose-float .morph-pose-label {
    padding-right: 12px;
}
.morph-pose-track {
    position: relative;
    height: 24px;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(99,102,241,0.10), rgba(99,102,241,0.04));
    border: 1px solid rgba(99,102,241,0.18);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.morph-pose-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
}
.morph-pose-fill {
    position: absolute;
    left: 0;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(to right, rgba(99,102,241,0.9), #818cf8);
    border-radius: 1px;
    pointer-events: none;
    z-index: 1;
}
.morph-pose-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.22);
    z-index: 2;
    cursor: pointer;
}
.morph-pose-tick.active {
    background: #818cf8;
    box-shadow: 0 0 6px rgba(99,102,241,0.8);
}
.morph-pose-num {
    position: absolute;
    left: 50%;
    bottom: 1px;
    transform: translateX(-50%);
    font-size: 7px;
    line-height: 1;
    color: var(--text-dim);
    background: rgba(0,0,0,0.55);
    border-radius: 3px;
    padding: 1px 3px;
    white-space: nowrap;
}
.morph-pose-tick.active .morph-pose-num {
    color: #fff;
    background: rgba(99,102,241,0.9);
}
.morph-pose-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    border: 2px solid #818cf8;
    box-shadow: 0 0 8px rgba(99,102,241,0.6);
    pointer-events: none;
    z-index: 3;
}
.morph-pose-label {
    margin-top: 2px;
    text-align: center;
    font-size: 8px;
    color: var(--text-dim);
    direction: ltr;
}

/* رقم ترتيب الوضعية + السحب والإفلات لإعادة الترتيب في بطاقة الوضعية */
.morph-pose-order-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 4px;
    background: var(--bg-panel-alt);
    border-top: 1px solid rgba(42, 45, 53, 0.4);
}
.morph-pose-order-badge {
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    background: rgba(99,102,241,0.12);
    border: 1px solid var(--accent);
    border-radius: 8px;
    direction: ltr;
}
.morph-pose-drag-hint {
    font-size: 12px;
    line-height: 1;
    color: var(--text-dim);
    cursor: grab;
    user-select: none;
}
.morph-variant-item[draggable="true"] {
    cursor: grab;
}
.morph-variant-item[draggable="true"]:active {
    cursor: grabbing;
}
.morph-variant-dragging {
    opacity: 0.45;
    transform: scale(0.96);
}
.morph-variant-drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.35) inset;
}

/* زر إظهار/إخفاء شريط الأوضاع (بجانب زر تصدير المجموعة) */
.morph-pose-vis-btn {
    transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.morph-pose-vis-btn.off {
    opacity: 0.45;
}
.morph-pose-vis-btn:hover {
    background: rgba(99,102,241,0.12);
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
