
    /* ╔══════════════════════════════════════════════════════════════╗
       ║  STANDALONE: .ai-progress                                   ║
       ║  Works anywhere — inside or outside .waiting_wrapper.       ║
       ║  Inherits Bootstrap's theme automatically.                  ║
       ║  Override duration:  style="--progress-duration: 30s"       ║
       ╚══════════════════════════════════════════════════════════════╝ */

    .ai-progress {
      --progress-duration: 50s;

      /* Accent colours — light mode */
      --ap-a: #3b82f6;   /* cyan-blue  */
      --ap-b: #8b5cf6;   /* violet     */
      --ap-c: #ec4899;   /* pink       */
    }

    [data-bs-theme="dark"] .ai-progress {
      --ap-a: #63b3ed;
      --ap-b: #b794f4;
      --ap-c: #f687b3;
    }

    /* The track — uses Bootstrap's .progress sizing,
       but we supply our own colour via var(--bs-border-color) fallback */
    .ai-progress .ai-progress-track {
      position: relative;
      height: 20px;
      background: var(--bs-tertiary-bg, rgba(0,0,0,0.07));
      border-radius: 999px;
      border: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.1));
      overflow: visible;      /* lets the underglow bleed */
    }

    /* The moving bar */
    .ai-progress .ai-progress-bar {
      height: 100%;
      border-radius: 999px;
      overflow: hidden;
      width: 0%;
      background: linear-gradient(90deg, var(--ap-a), var(--ap-b), var(--ap-c));
      background-size: 200% 100%;
      animation:
        ap-fill    var(--progress-duration) cubic-bezier(0.12, 0.6, 0.85, 1) forwards,
        ap-shimmer 2.5s linear infinite;
    }

    /* Soft glow beneath the bar — decorative, doesn't affect layout */
    .ai-progress .ai-progress-track::after {
      content: '';
      position: absolute;
      bottom: -5px; left: 0;
      height: 8px; border-radius: 4px;
      background: linear-gradient(90deg, var(--ap-a), var(--ap-b));
      filter: blur(7px);
      opacity: 0.35;
      width: 0%;
      pointer-events: none;
      animation: ap-fill var(--progress-duration) cubic-bezier(0.12, 0.6, 0.85, 1) forwards;
    }

 

    @keyframes ap-fill {
      0%   { width: 0%;   }
      10%  { width: 8%;   }
      25%  { width: 22%;  }
      40%  { width: 38%;  }
      55%  { width: 54%;  }
      70%  { width: 69%;  }
      85%  { width: 83%;  }
      95%  { width: 93%;  }
      100% { width: 100%; }
    }
    @keyframes ap-shimmer {
      0%   { background-position:  200% center; }
      100% { background-position: -200% center; }
    }


    /* ╔══════════════════════════════════════════════════════════════╗
       ║  WAITING WRAPPER                                            ║
       ║  • No background, border, shadow, or body overrides.       ║
       ║  • Blends into whatever Bootstrap theme the host uses.     ║
       ║  • All colours auto-flip via data-bs-theme on <html>.      ║
       ║  • Override duration: style="--wait-duration: 30s"         ║
       ╚══════════════════════════════════════════════════════════════╝ */

    .waiting_wrapper {
      --wait-duration: 50s;
      --orbit-duration: 25s;

      /* Accent palette — light */
      --clr-cyan:   #3b82f6;
      --clr-violet: #8b5cf6;
      --clr-gold:   #d97706;
      --clr-pink:   #ec4899;
      --clr-muted:  var(--bs-secondary-color, #6c757d);
      --clr-text:   var(--bs-body-color, #212529);

      /* Internal UI tokens — light */
      --clr-label-bg:  rgba(59,130,246,0.06);
      --clr-label-bdr: rgba(59,130,246,0.18);
      --clr-divider:   rgba(79,130,210,0.18);
    }

    [data-bs-theme="dark"] .waiting_wrapper {
      --clr-cyan:   #63b3ed;
      --clr-violet: #b794f4;
      --clr-gold:   #f6c90e;
      --clr-pink:   #f687b3;

      --clr-label-bg:  rgba(255,255,255,0.04);
      --clr-label-bdr: rgba(99,179,237,0.25);
      --clr-divider:   rgba(99,179,237,0.14);
    }

    /* Wrapper itself: no bg, no border, no shadow — inherits host */
    .waiting_wrapper {
      position: relative;
      color: var(--clr-text);
  
    }

    /* ── Eye candy stage ──────────────────────────────────────── */
    .waiting_eye_candy {
      position: relative;
      height: 200px;
      z-index: 1;
    }

    .waiting_main_1,
    .waiting_main_2 {
      position: absolute;
      width: 120px; height: 120px;
      border-radius: 50%;
      overflow: hidden;
      border: 3px solid var(--clr-pink);
      box-shadow: 0 0 22px rgba(236,72,153,0.35), 0 0 55px rgba(236,72,153,0.1);


 
      z-index: 3;
      top: 50%; margin-top: -60px;
    }
    .waiting_main_1 img,
    .waiting_main_2 img { width:100%; height:100%; object-fit:cover; display:block; }

    .waiting_main_1 {
      left: calc(50% - 140px);
      animation: orbit-left var(--orbit-duration) linear infinite,
                 pulse-pink 3s ease-in-out infinite;
    }
    .waiting_main_2 {
      left: calc(50% + 20px);
      border-color: var(--clr-violet);
      box-shadow: 0 0 22px rgba(183,148,244,0.35), 0 0 55px rgba(183,148,244,0.1);
      animation: orbit-right var(--orbit-duration) linear infinite,
                 pulse-violet 3s ease-in-out infinite 1.5s;
    }

    /* Merge beam */
    .waiting_beam {
      position: absolute;
      left: 50%; top: 50%;
      transform: translate(-50%, -50%);
      width: 80px; height: 3px;
      background: linear-gradient(90deg, var(--clr-cyan), var(--clr-violet));
      border-radius: 2px;
      filter: blur(1px);
      z-index: 2;
      animation: beam-pulse 2s ease-in-out infinite;
    }
    .waiting_beam::before,
    .waiting_beam::after {
      content: '';
      position: absolute;
      top: 50%; width: 8px; height: 8px;
      border-radius: 50%; transform: translateY(-50%);
    }
    .waiting_beam::before { left:0;   background:var(--clr-cyan);   animation: orb-l 2.4s ease-in-out infinite; }
    .waiting_beam::after  { right:0;  background:var(--clr-violet); animation: orb-r 2.4s ease-in-out infinite 1.2s; }

    /* Floating icons */
    .waiting_icon { position:absolute; z-index:4; line-height:1; }

    .wi-wand  { top:8px;     left:50%;   font-size:1.6rem; color:var(--clr-gold);   animation: bounce-c 2.8s ease-in-out infinite, spin-slow 8s linear infinite; }
    .wi-hat   { top:14px;    right:12%;  font-size:1.4rem; color:var(--clr-violet); animation: bounce-a 3.6s ease-in-out infinite 1s, sway 4s ease-in-out infinite; }
    .wi-star1 { top:20px;    left:14%;   font-size:1rem;   color:var(--clr-cyan);   animation: twinkle 1.6s ease-in-out infinite; }
    .wi-star2 { bottom:20px; right:16%;  font-size:0.7rem; color:var(--clr-violet); animation: twinkle 2.1s ease-in-out infinite 0.4s; }
    .wi-star3 { top:28px;    right:30%;  font-size:1.1rem; color:var(--clr-gold);   animation: twinkle 1.3s ease-in-out infinite 0.9s; }
    .wi-star4 { bottom:12px; left:22%;   font-size:0.9rem; color:var(--clr-pink);   animation: twinkle 2.4s ease-in-out infinite 0.2s; }
    .wi-face  { bottom:16px; left:50%;   font-size:1.5rem; color:var(--clr-pink);   animation: bounce-c 3.2s ease-in-out infinite 0.5s, scale-p 2s ease-in-out infinite; }
    .wi-eye   { bottom:18px; right:12%;  font-size:1.1rem; color:var(--clr-cyan);   animation: scan-blink 3s ease-in-out infinite; }
    .wi-sp1   { top:50%; left:50%; font-size:0.6rem; color:var(--clr-cyan);   animation: orbit-particle 6s linear infinite; }
    .wi-sp2   { top:50%; left:50%; font-size:0.5rem; color:var(--clr-violet); animation: orbit-particle 8s linear infinite -2s; }
    .wi-sp3   { top:50%; left:50%; font-size:0.6rem; color:var(--clr-cyan);   animation: orbit-particle 5s linear infinite -4s; }

    /* ── Divider ──────────────────────────────────────────────── */
    .waiting_divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--clr-divider), transparent);
      margin: 1rem 0;
    }

    /* ── Text section ─────────────────────────────────────────── */
    .waiting_text { text-align: center; }

    .waiting_label {
      display: inline-flex; align-items: center; gap: 0.4rem;
      font-size: 0.72rem;
     
      letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--clr-muted);
      background: var(--clr-label-bg);
      border: 1px solid var(--clr-label-bdr);
      border-radius: 999px;
      padding: 0.2rem 0.75rem;
      margin-bottom: 0.6rem;
      animation: label-flicker 4s ease-in-out infinite;
    }
    .waiting_label .dot {
      width:6px; height:6px; border-radius:50%;
      background: var(--clr-cyan);
      animation: dot-ping 1.2s ease-in-out infinite;
    }

    /* Fixed-height clip — one message at a time */
    .waiting_text_inner {
      position: relative;
      height: 2rem;
      overflow: hidden;
    }
    .waiting_text_inner span {
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.95rem; letter-spacing: 0.02em;
      color: var(--clr-text);
      opacity: 0;
      transform: translateY(14px);
      animation: msg-show calc(var(--wait-duration) / 8) ease both;
    }
    .waiting_text_inner span:nth-child(1) { animation-delay: calc(var(--wait-duration) * 0 / 8); }
    .waiting_text_inner span:nth-child(2) { animation-delay: calc(var(--wait-duration) * 1 / 8); }
    .waiting_text_inner span:nth-child(3) { animation-delay: calc(var(--wait-duration) * 2 / 8); }
    .waiting_text_inner span:nth-child(4) { animation-delay: calc(var(--wait-duration) * 3 / 8); }
    .waiting_text_inner span:nth-child(5) { animation-delay: calc(var(--wait-duration) * 4 / 8); }
    .waiting_text_inner span:nth-child(6) { animation-delay: calc(var(--wait-duration) * 5 / 8); }
    .waiting_text_inner span:nth-child(7) { animation-delay: calc(var(--wait-duration) * 6 / 8); }
    .waiting_text_inner span:nth-child(8) { animation-delay: calc(var(--wait-duration) * 7 / 8); }

    @keyframes msg-show {
      0%   { opacity:0; transform:translateY(14px);  }
      12%  { opacity:1; transform:translateY(0);     }
      80%  { opacity:1; transform:translateY(0);     }
      100% { opacity:0; transform:translateY(-10px); }
    }

    /* ── Keyframes ────────────────────────────────────────────── */
    @keyframes orbit-left {
      0%   { left:calc(50% - 140px); margin-top:-60px; }
      25%  { left:calc(50% - 165px); margin-top:-80px; }
      50%  { left:calc(50% - 70px);  margin-top:-60px; }
      75%  { left:calc(50% - 155px); margin-top:-40px; }
      100% { left:calc(50% - 140px); margin-top:-60px; }
    }
    @keyframes orbit-right {
      0%   { left:calc(50% + 20px); margin-top:-60px; }
      25%  { left:calc(50% + 35px); margin-top:-40px; }
      50%  { left:calc(50% - 70px); margin-top:-60px; }
      75%  { left:calc(50% + 30px); margin-top:-80px; }
      100% { left:calc(50% + 20px); margin-top:-60px; }
    }

@keyframes pulse-pink {
  0%,100% { box-shadow:0 0 18px rgba(236,72,153,0.35),0 0 50px rgba(236,72,153,0.1);  }
  50%      { box-shadow:0 0 32px rgba(236,72,153,0.65),0 0 80px rgba(236,72,153,0.25); }
}     
    @keyframes pulse-cyan {
      0%,100% { box-shadow:0 0 18px rgba(99,179,237,0.35),0 0 50px rgba(99,179,237,0.1);  }
      50%      { box-shadow:0 0 32px rgba(99,179,237,0.65),0 0 80px rgba(99,179,237,0.25); }
    }
    @keyframes pulse-violet {
      0%,100% { box-shadow:0 0 18px rgba(183,148,244,0.35),0 0 50px rgba(183,148,244,0.1);  }
      50%      { box-shadow:0 0 32px rgba(183,148,244,0.65),0 0 80px rgba(183,148,244,0.25); }
    }
    @keyframes beam-pulse {
      0%,100% { opacity:0.35; transform:translate(-50%,-50%) scaleX(1);    }
      50%      { opacity:1;    transform:translate(-50%,-50%) scaleX(1.18); }
    }
    @keyframes orb-l {
      0%   { opacity:0; transform:translateY(-50%); }
      15%  { opacity:1; }
      100% { opacity:0; transform:translateY(-50%) translateX(80px); }
    }
    @keyframes orb-r {
      0%   { opacity:0; transform:translateY(-50%); }
      15%  { opacity:1; }
      100% { opacity:0; transform:translateY(-50%) translateX(-80px); }
    }
    @keyframes bounce-c {
      0%,100% { transform:translateX(-50%) translateY(0);    }
      50%      { transform:translateX(-50%) translateY(-8px); }
    }
    @keyframes bounce-a {
      0%,100% { transform:translateY(0);    }
      50%      { transform:translateY(-7px); }
    }
    @keyframes spin-slow { to { transform:translateX(-50%) rotate(360deg); } }
    @keyframes sway {
      0%,100% { transform:rotate(-8deg); }
      50%      { transform:rotate(8deg);  }
    }
    @keyframes twinkle {
      0%,100% { opacity:1;   transform:scale(1);    }
      50%      { opacity:0.2; transform:scale(0.55); }
    }
    @keyframes scale-p {
      0%,100% { transform:translateX(-50%) scale(1);    }
      50%      { transform:translateX(-50%) scale(1.2);  }
    }
    @keyframes scan-blink {
      0%,100%  { opacity:1;   }
      40%,60%  { opacity:0.1; }
    }
    @keyframes orbit-particle {
      from { transform:rotate(0deg)   translateX(55px); }
      to   { transform:rotate(360deg) translateX(55px); }
    }
    @keyframes label-flicker {
      0%,94%,100% { opacity:1;   }
      96%,98%     { opacity:0.4; }
    }
    @keyframes dot-ping {
      0%,100% { transform:scale(1);   opacity:1;   }
      50%      { transform:scale(1.7); opacity:0.5; }
    }
