/**
 * Eduplayify Template: ordering
 * يطابق أصناف ordering.js فعليًا (ord-wrap / ord-instruction / ord-slots / ord-slot / ord-pool / ord-item-btn / ord-reveal).
 * ملاحظة: كل سطر px قبل clamp هو fallback مقصود للمتصفحات القديمة (نفس أسلوب wheel.css).
 */
.ord-wrap {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    padding-top: 4px;
    padding-top: clamp(4px, 1vh, 8px);
    padding-bottom: 2px;
}
/* إبقاء التوافق الخلفي مع أي اسم قديم */
.ord-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ord-card {
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.ord-card:active { cursor: grabbing; }
.ord-handle { color: #94a3b8; font-size: 1.1rem; }
.ord-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
}
.ord-instruction {
    font-weight: 700;
    color: #1e2438;
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
}
.ord-slots {
    min-height: 72px;
    min-height: clamp(60px, 12vw, 84px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border: 3px dashed #e4e7f1;
    border-radius: 16px;
    background: #eef0fd;
    padding: 10px;
    padding: clamp(8px, 1.5vw, 12px);
    margin: 0 auto 12px;
    margin-bottom: 12px;
    margin-bottom: clamp(10px, 1.8vh, 16px);
}
.ord-slots.correct { border-style: solid; border-color: #1faa6b; background: #e9f9f0; }
.ord-slots.shake { border-color: #e5484d; }
.ord-slot {
    margin: 4px;
    min-width: 80px;
    min-width: clamp(70px, 22vw, 90px);
    min-height: 58px;
    min-height: clamp(52px, 12vw, 68px);
    position: relative;
    background: #fff;
    border: 2px solid #e4e7f1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    touch-action: none;
}
.ord-slot.filled { border-color: #3d4fe0; cursor: grab; }
.ord-slot-num {
    position: absolute;
    top: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffb020;
    color: #3a2900;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    inset-inline-start: -10px;
    box-shadow: 0 0 0 3px #fff;
}
.ord-item-image { max-width: 100%; object-fit: contain; border-radius: 6px; max-height: 50px; max-height: clamp(40px, 9vw, 60px); }
.ord-item-text { font-weight: 700; color: #1e2438; font-size: 0.9rem; font-size: clamp(0.85rem, 3.6vw, 0.95rem); }
.ord-pool {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    margin-bottom: clamp(10px, 1.8vh, 16px);
}
.ord-item-btn {
    min-width: 76px;
    min-width: clamp(66px, 20vw, 86px);
    max-width: 150px;
    margin: 3px 5px;
    border: 0;
    border-radius: 12px;
    background: #ffb020;
    color: #3a2900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    padding: 8px 9px;
    padding: clamp(7px, 1.3vh, 9px) clamp(7px, 2vw, 11px);
    box-shadow: 0 3px 0 #d98e00;
    touch-action: none;
}
.ord-item-btn .ord-item-text { color: #3a2900; }
.ord-item-btn:hover:not(:disabled) { transform: translateY(-3px); }
.ord-item-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #d98e00; }
.ord-item-btn:disabled, .ord-item-btn.used { background: #e4e7f1; visibility: hidden; box-shadow: none; cursor: default; }
.ord-slot.drop-hover { border-color: #3d4fe0; background: #eef0fd; }
.ord-slots.drop-hover { border-style: solid; border-color: #3d4fe0; }
.ord-reveal { margin-top: 6px; text-align: center; }
.ord-reveal-label { font-weight: 800; color: #5b6178; margin-bottom: 10px; }
.ord-reveal-list { display: flex; flex-wrap: wrap; justify-content: center; }
.ord-reveal-item {
    position: relative;
    min-width: 90px;
    min-height: 68px;
    background: #e9f9f0;
    border: 2px solid #1faa6b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    margin: 5px;
}
.ord-reveal-item .ord-slot-num { background: #1faa6b; color: #fff; }
/* fallback flex-gap للقديم: الهوامش أعلاه (margin: 4px/5px) تكفي، لا gap إلزامي هنا */
