/* ==========================================================================
   QuickComm Animated Loader Suite (Big-Company / Quick-Commerce Grade)
   Supports: Cold Boot Splash, Top Progress Bar, Modal Glassmorphic Overlay,
             Skeleton Shimmer Placeholders, and Reconnect Modal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Cold-Boot & App Splash Loader
   -------------------------------------------------------------------------- */
#app-splash-loader {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    top: -99999px !important;
}

.qc-splash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    max-width: 360px;
    padding: 24px;
}

/* --------------------------------------------------------------------------
   2. Delivery Vehicle & Motion Graphics
   -------------------------------------------------------------------------- */
.qc-stage-container {
    position: relative;
    width: 160px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Pulsing background ambient aura */
.qc-ambient-glow {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, rgba(245, 158, 11, 0.12) 60%, transparent 80%);
    filter: blur(14px);
    animation: qcPulseGlow 2.4s ease-in-out infinite;
    pointer-events: none;
}

/* Road surface & speed shadow */
.qc-road-track {
    position: absolute;
    bottom: 8px;
    width: 140px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #cbd5e1, #94a3b8, transparent);
    border-radius: 2px;
    overflow: hidden;
}

[data-theme="dark"] .qc-road-track {
    background: linear-gradient(90deg, transparent, #334155, #475569, transparent);
}

.qc-road-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 100%;
    background: #059669;
    animation: qcRoadDash 0.7s linear infinite;
}

/* Scooter suspension bob */
.qc-scooter-group {
    animation: qcBobbing 0.55s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

/* Scooter wheels */
.qc-wheel-spin {
    animation: qcWheelRotate 0.6s linear infinite;
    transform-origin: center;
}

/* Speed wind trails */
.qc-wind-line {
    stroke-dasharray: 20, 30;
    animation: qcWindStream 0.65s linear infinite;
}

.qc-wind-line-2 {
    stroke-dasharray: 15, 25;
    animation: qcWindStream 0.85s linear infinite;
    animation-delay: 0.15s;
}

/* Delivery parcel bounce */
.qc-parcel-bounce {
    animation: qcParcelJiggle 0.55s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

/* --------------------------------------------------------------------------
   3. Typography & Badges
   -------------------------------------------------------------------------- */
.qc-brand-title {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 6px 0;
    background: linear-gradient(120deg, #059669 0%, #10b981 40%, #f59e0b 80%, #059669 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: qcTextGradient 3.2s ease infinite;
}

.qc-eta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .qc-eta-pill {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.qc-beacon-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
}

.qc-beacon-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: qcPingRadar 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Fluid bottom progress meter - Permanently Deactivated */
.qc-meter-track,
.qc-meter-bar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   4. Global Navigation Top Progress Bar (YouTube / GitHub / Linear style)
   -------------------------------------------------------------------------- */
#eq-top-loader,
[id="eq-top-loader"],
.eq-top-loader,
#eq-top-loader *,
#eq-top-loader::before,
#eq-top-loader::after,
#eq-top-loader.active,
#eq-top-loader.finishing,
#eq-top-loader.fading {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    top: -999999px !important;
    left: -999999px !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(100%) !important;
    content: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
}

/* --------------------------------------------------------------------------
   5. Interactive Full-Screen / Modal Animated Overlay
   -------------------------------------------------------------------------- */
.eq-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: eqFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.eq-loader-dialog {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.96);
    animation: eqPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="dark"] .eq-loader-dialog {
    background: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.eq-loader-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--eq-text-primary, #0f172a);
    margin: 8px 0 4px 0;
    line-height: 1.3;
}

.eq-loader-subtitle {
    font-size: 0.82rem;
    color: var(--eq-text-muted, #64748b);
    margin-bottom: 16px;
    line-height: 1.4;
}

.eq-tips-ticker {
    font-size: 0.74rem;
    font-weight: 600;
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
    padding: 6px 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

[data-theme="dark"] .eq-tips-ticker {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}

/* --------------------------------------------------------------------------
   6. Modern Skeleton Shimmer Elements (Blinkit & Amazon Grade)
   -------------------------------------------------------------------------- */
.eq-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: eqShimmerWave 1.6s infinite linear;
    border-radius: 8px;
}

[data-theme="dark"] .eq-skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

.eq-skeleton-card {
    background: var(--eq-surface, #ffffff);
    border: 1px solid var(--eq-border-subtle, #e2e8f0);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eq-skeleton-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
}

.eq-skeleton-line {
    height: 14px;
    border-radius: 6px;
}

.eq-skeleton-line-sm {
    height: 10px;
    width: 60%;
    border-radius: 4px;
}

.eq-skeleton-btn {
    height: 34px;
    border-radius: 8px;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   7. Reconnect Modal Styling (Clean Branded Alert)
   -------------------------------------------------------------------------- */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal.components-reconnect-show {
    display: flex !important;
}

.eq-reconnect-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

[data-theme="dark"] .eq-reconnect-box {
    background: #1e293b;
    color: #f8fafc;
}

/* --------------------------------------------------------------------------
   8. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes qcWheelRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes qcBobbing {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-2.5px) rotate(-0.5deg); }
    100% { transform: translateY(1.5px) rotate(0.5deg); }
}

@keyframes qcParcelJiggle {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes qcRoadDash {
    0% { transform: translateX(0); }
    100% { transform: translateX(140px); }
}

@keyframes qcWindStream {
    0% { transform: translateX(20px); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateX(-30px); opacity: 0; }
}

@keyframes qcPulseGlow {
    0%, 100% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

@keyframes qcTextGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes qcPingRadar {
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

@keyframes qcLiquidSweep {
    0% { left: -40%; width: 30%; }
    50% { left: 35%; width: 50%; }
    100% { left: 100%; width: 30%; }
}

@keyframes eqFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes eqPopIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes eqShimmerWave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
