/* ══════════════════════════════════════════
   RapiDisk — Loader & Processing Animation
══════════════════════════════════════════ */

/* ── Top progress bar ── */
#rd-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 99999;
    pointer-events: none;
}
#rd-topbar .rd-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #f59e0b, #00d4ff);
    background-size: 300% 100%;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.8), 0 0 24px rgba(124, 58, 237, 0.4);
    animation: topBarShimmer 1.2s linear infinite;
    transition: width 0.1s ease;
}
#rd-topbar.running .rd-bar-fill {
    width: 85%;
    transition: width 2.5s cubic-bezier(0.1, 0.05, 0, 1);
}
#rd-topbar.done .rd-bar-fill {
    width: 100%;
    opacity: 0;
    transition: width 0.15s ease, opacity 0.3s ease 0.1s;
}
@keyframes topBarShimmer {
    0%   { background-position: 300% center; }
    100% { background-position: 0% center; }
}

/* ── Order processing full-screen overlay ── */
#rd-processing {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(5, 5, 8, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#rd-processing.active {
    opacity: 1;
    pointer-events: all;
}

/* Orbit rings */
.rd-orbit {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 36px;
}
.rd-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}
.rd-ring-1 {
    border-top-color: #00d4ff;
    border-right-color: rgba(0, 212, 255, 0.2);
    animation: rdSpin 1.2s linear infinite;
}
.rd-ring-2 {
    inset: 16px;
    border-bottom-color: #7c3aed;
    border-left-color: rgba(124, 58, 237, 0.2);
    animation: rdSpin 1.8s linear infinite reverse;
}
.rd-ring-3 {
    inset: 32px;
    border-top-color: #f59e0b;
    border-right-color: rgba(245, 158, 11, 0.2);
    animation: rdSpin 2.4s linear infinite;
}
@keyframes rdSpin {
    to { transform: rotate(360deg); }
}

/* Text */
.rd-proc-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-align: center;
}
.rd-proc-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 32px;
    text-align: center;
}

/* Step indicators */
.rd-steps {
    display: flex;
    gap: 8px;
    align-items: center;
}
.rd-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    transition: color 0.3s;
}
.rd-step.done  { color: #4ade80; }
.rd-step.active { color: #00d4ff; }
.rd-step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #374151;
    transition: background 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}
.rd-step.done  .rd-step-dot  { background: #4ade80; }
.rd-step.active .rd-step-dot  {
    background: #00d4ff;
    animation: rdDotPulse 0.8s ease-in-out infinite;
}
@keyframes rdDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(0, 212, 255, 0); }
}
.rd-step-sep {
    width: 24px; height: 1px;
    background: #1f2937;
}

/* Floating particles */
.rd-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.rd-particle {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    opacity: 0;
    animation: rdFloat var(--dur, 4s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes rdFloat {
    0%   { opacity: 0; transform: translateY(100vh) scale(0); }
    10%  { opacity: 1; }
    90%  { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-20vh) scale(1.5); }
}
