/* =====================================================================
   FOLAN LOADING — delivery style, manual control only
   (no auto show/hide baked in — you call showLoadingDelivery() /
   hideLoadingDelivery() whenever you want)
   ===================================================================== */

:root {
    --fld-first: var(--first-color, #ff0032);
    --fld-first-soft: var(--first-color-soft, #fff1f2);
    --fld-title: var(--title-color, #201a14);
    --fld-text-light: var(--text-color-light, #b9b2a8);
    --fld-font: var(--body-font, "Satoshi", sans-serif);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(15, 10, 8, .55);
    backdrop-filter: blur(3px);
    font-family: var(--fld-font);
}
.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 220px;
    padding: clamp(28px, 6vw, 36px);
    background-color: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .45);
    animation: fld-pop .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes fld-pop {
    from { opacity: 0; transform: translateY(16px) scale(.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- the road + the bike riding it, forever, until you hide it ---- */
.loading-track {
    position: relative;
    width: clamp(120px, 30vw, 150px);
    height: 60px;
}
.loading-track::before {
    content: "";
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 2px;
    background-image: linear-gradient(to right, var(--fld-first) 0 14px, transparent 14px 26px);
    background-size: 26px 3px;
    background-repeat: repeat-x;
    animation: fld-road .5s linear infinite;
}
@keyframes fld-road {
    from { background-position-x: 0; }
    to   { background-position-x: -26px; }
}

.loading-bike {
    position: absolute;
    bottom: 14px;
    left: 50%;
    font-size: clamp(30px, 7vw, 36px);
    color: var(--fld-first);
    animation: fld-bike-bounce .5s ease-in-out infinite alternate;
}
@keyframes fld-bike-bounce {
    from { transform: translate(-50%, -44%); }
    to   { transform: translate(-50%, -60%); }
}

/* tiny "speed" dust trailing behind the bike */
.loading-track .dust {
    position: absolute;
    bottom: 17px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--fld-first-soft);
    opacity: 0;
    animation: fld-dust .9s ease-out infinite;
}
.loading-track .dust:nth-child(2) { left: 58%; animation-delay: 0s; }
.loading-track .dust:nth-child(3) { left: 58%; animation-delay: .3s; }
@keyframes fld-dust {
    0%   { opacity: 0; transform: translateX(0) scale(1); }
    15%  { opacity: .8; }
    100% { opacity: 0; transform: translateX(16px) scale(.4); }
}

.loading-text {
    color: var(--fld-title);
    font-size: clamp(.85rem, .8rem + .2vw, .95rem);
    font-weight: 600;
    text-align: center;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .loading-card,
    .loading-track::before,
    .loading-bike,
    .loading-track .dust {
        animation: none;
    }
    .loading-bike {
        transform: translate(-50%, -52%);
    }
}