/*
  ===============================================================
  animations-loading.css
  هذا الملف مسؤول عن حركات التحميل والمؤثرات البصرية في شاشة البداية.
  الجزء 1: تعريف keyframes للحركة (دوران/نبض/انزلاق).
  الجزء 2: كلاسات شاشة التحميل الفاخرة fb-luxe-*.
  الجزء 3: كلاس animate-slideDown الخاص بتنبيه الهبوط من أعلى.
  ملاحظة: لا توجد أي قواعد تتحكم في منطق React أو البيانات هنا.
  ===============================================================
*/

/* شريط التحميل أثناء الانتقال بين الصفحات */
@keyframes loading-bar {
  0% {
    transform: translateX(100%);
  }
  50% {
    transform: translateX(-20%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* الجزء التفصيلي: تعريف حركات التحميل والتنبيهات البصرية */
/* App entry styles - Tailwind and fonts are loaded from index.html (legacy comment) */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fbLuxeDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -10px, 0) scale(1.03);
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fbLuxeSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fbLuxePulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes fbLuxeSweep {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(115%);
  }
}

.fb-luxe-bg {
  background:
    radial-gradient(1100px 460px at -10% -12%, rgba(37, 99, 235, 0.42), transparent 58%),
    radial-gradient(980px 420px at 112% -10%, rgba(59, 130, 246, 0.38), transparent 56%),
    linear-gradient(165deg, #0b1531 0%, #112145 36%, #183675 100%);
}

.fb-luxe-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.8;
  pointer-events: none;
  will-change: transform;
  animation: fbLuxeDrift 5.2s ease-in-out infinite;
}

.fb-luxe-blob--one {
  width: 15.5rem;
  height: 15.5rem;
  top: -4rem;
  right: -4.5rem;
  background: rgba(96, 165, 250, 0.5);
}

.fb-luxe-blob--two {
  width: 16.5rem;
  height: 16.5rem;
  bottom: -4.5rem;
  left: -5rem;
  background: rgba(59, 130, 246, 0.42);
  animation-delay: -1.3s;
}

.fb-luxe-card {
  width: min(92vw, 26rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: linear-gradient(165deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  box-shadow: 0 25px 60px -15px rgba(30, 58, 138, 0.5), 0 8px 24px -8px rgba(0, 0, 0, 0.3);
}

.fb-luxe-loader {
  width: 82px;
  height: 82px;
  position: relative;
  display: grid;
  place-items: center;
}

.fb-luxe-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 4px solid rgba(147, 197, 253, 0.25);
  border-top-color: #60a5fa;
  border-right-color: #2563eb;
  animation: fbLuxeSpin 1s linear infinite;
}

.fb-luxe-loader__ring--alt {
  inset: 10px;
  border-width: 3px;
  border-color: rgba(191, 219, 254, 0.18);
  border-top-color: #93c5fd;
  border-left-color: #3b82f6;
  animation-direction: reverse;
  animation-duration: 1.35s;
}

.fb-luxe-loader__core {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 28% 24%, #dbeafe 0%, #60a5fa 44%, #1d4ed8 100%);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2);
  animation: fbLuxePulse 1.8s ease-in-out infinite;
}

.fb-luxe-progress {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(219, 234, 254, 0.26);
  border: 1px solid rgba(147, 197, 253, 0.4);
}

.fb-luxe-progress > span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #93c5fd 0%, #3b82f6 52%, #1d4ed8 100%);
  box-shadow: 0 8px 14px -10px rgba(30, 64, 175, 0.82);
  animation: fbLuxeSweep 1.35s ease-in-out infinite;
}

.animate-slideDown {
  animation: slideDown 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.25s ease-out both;
}

/* ── Dashboard staggered entrance ── */
@keyframes dhStaggerIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dh-stagger-1 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.dh-stagger-2 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.dh-stagger-3 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.dh-stagger-4 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.dh-stagger-5 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.dh-stagger-6 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.dh-stagger-7 { animation: dhStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }

/* Progress bar glow */
.dh-progress-glow {
  box-shadow: 0 0 8px -1px rgba(20, 184, 166, 0.4);
}

/* عدسة متحركة (Shine Sweep) للعنوان البرّاق */
@keyframes dh-brand-shine {
  0% {
    background-position: 200% 50%;
  }
  100% {
    background-position: -200% 50%;
  }
}

.dh-brand-shine {
  background-image: linear-gradient(
    110deg,
    #ffffff 0%,
    #f8fafc 38%,
    #fde68a 46%,
    #fbbf24 49%,
    #f59e0b 50%,
    #fbbf24 51%,
    #fde68a 54%,
    #f8fafc 62%,
    #ffffff 100%
  );
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px #0f172a;
  paint-order: stroke fill;
  animation: dh-brand-shine 3s ease-in-out 1;
}

