/* ================================================================
   IBS Visuals CSS — الواجهة الأمامية
   ================================================================ */

/* ── الجسيمات المتحركة ───────────────────────────────────────── */
.ibs-particle {
    position: absolute;
    pointer-events: none;
    z-index: 999999999;
    font-family: "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif !important;
}
.ibs-particle::before { content: attr(data-emoji); }

.ibs-fall-down  { top:-10vh;    animation-name:ibsFall;  animation-timing-function:linear; animation-fill-mode:forwards; }
.ibs-float-up   { bottom:-10vh; animation-name:ibsFloat; animation-timing-function:linear; animation-fill-mode:forwards; }

@keyframes ibsFall  {
    0%   { transform:translateY(0)     rotate(0deg);   opacity:var(--ibs-op-start,1); }
    100% { transform:translateY(110vh) rotate(360deg); opacity:var(--ibs-op-end,0);   }
}
@keyframes ibsFloat {
    0%   { transform:translateY(0)      rotate(0deg);   opacity:var(--ibs-op-start,1); }
    100% { transform:translateY(-110vh) rotate(360deg); opacity:var(--ibs-op-end,0);   }
}

/* ── مدافع الكونفيتي ─────────────────────────────────────────── */
.ibs-confetti-piece {
    position:absolute; width:10px; height:25px; pointer-events:none;
    border-radius:2px;
    animation:ibsConfettiBurst 3.5s cubic-bezier(.25,.46,.45,.94) forwards;
}
@keyframes ibsConfettiBurst {
    0%   { transform:translate(0,0) rotate(0deg) scale(0);   opacity:var(--ibs-op-start,1); }
    40%  { transform:translate(var(--vx),var(--vy)) rotate(180deg) scale(1.2); opacity:var(--ibs-op-start,1); }
    100% { transform:translate(var(--vx),calc(var(--vy) + 60vh)) rotate(720deg) scale(.5); opacity:var(--ibs-op-end,0); }
}

/* ── Lottie Particles ────────────────────────────────────────── */
.ibs-lottie-particle {
    position:absolute;
    pointer-events:none;
    z-index:999999999;
    width:var(--ibs-lottie-size, 60px);
    height:var(--ibs-lottie-size, 60px);
}
.ibs-lottie-particle--falling {
    top:-80px;
    animation:ibsLottieFall linear forwards;
    animation-duration:var(--ibs-duration, 4s);
}
.ibs-lottie-particle--floating {
    bottom:-80px;
    animation:ibsLottieFloat linear forwards;
    animation-duration:var(--ibs-duration, 4s);
}
@keyframes ibsLottieFall {
    0%   { transform:translateY(0)     rotate(0deg); opacity:var(--ibs-op-start,1); }
    100% { transform:translateY(110vh) rotate(var(--ibs-rot,30deg)); opacity:var(--ibs-op-end,0); }
}
@keyframes ibsLottieFloat {
    0%   { transform:translateY(0)      rotate(0deg); opacity:var(--ibs-op-start,1); }
    100% { transform:translateY(-110vh) rotate(var(--ibs-rot,30deg)); opacity:var(--ibs-op-end,0); }
}

/* ── Lottie Static (ثابت في الزاوية) ────────────────────────── */
.ibs-lottie-static {
    position:fixed;
    z-index:999999999;
    pointer-events:none;
    width:200px;
    height:200px;
}

/* ── الصور الثابتة ───────────────────────────────────────────── */
.ibs-static-img   { position:fixed; z-index:999999999; }
.ibs-pos-top-right    { top:10px;    right:10px;   max-width:250px; }
.ibs-pos-top-left     { top:10px;    left:10px;    max-width:250px; }
.ibs-pos-bottom-right { bottom:10px; right:10px;   max-width:250px; }
.ibs-pos-bottom-left  { bottom:10px; left:10px;    max-width:250px; }
.ibs-pos-top-bar      { top:0;  left:0; width:100vw; text-align:center; display:flex; justify-content:center; }
.ibs-pos-bottom-bar   { bottom:0; left:0; width:100vw; text-align:center; display:flex; justify-content:center; }
.ibs-pos-center       { top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; display:flex; justify-content:center; }

/* ── العداد التنازلي ─────────────────────────────────────────── */
.ibs-countdown-wrapper { display:flex; gap:15px; padding:15px; border-radius:8px; direction:ltr; pointer-events:auto !important; box-shadow:0 4px 15px rgba(0,0,0,.3); }
.ibs-countdown-box     { display:flex; flex-direction:column; align-items:center; justify-content:center; width:70px; height:70px; border:2px solid; background:rgba(0,0,0,.5); backdrop-filter:blur(5px); }
.ibs-shape-circle  { border-radius:50%; }
.ibs-shape-square  { border-radius:10px; }
.ibs-shape-rect    { border-radius:5px; width:80px; height:60px; }
.ibs-cd-val   { font-size:24px; font-weight:bold; line-height:1; }
.ibs-cd-label { font-size:12px; margin-top:5px; text-transform:uppercase; }

/* ── Popup Animate ───────────────────────────────────────────── */
@keyframes ibsPopupFadeIn {
    0%   { opacity:0; transform:scale(.7); }
    70%  { transform:scale(1.05); }
    100% { opacity:1; transform:scale(1); }
}
.ibs-popup-animate { animation:ibsPopupFadeIn .5s cubic-bezier(.175,.885,.32,1.275) forwards; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width:768px) {
    .ibs-popup-container  { width:92% !important; padding:10px !important; }
    .ibs-popup-close-btn  { width:30px !important; height:30px !important; line-height:28px !important; font-size:20px !important; top:-12px !important; right:-12px !important; }
    .ibs-lottie-static    { width:120px; height:120px; }
}
