.agro-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 22% 18%, rgba(22, 101, 52, .12), transparent 34rem),
        radial-gradient(circle at 78% 86%, rgba(202, 138, 4, .16), transparent 28rem),
        rgba(247, 248, 242, .88);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    backdrop-filter: blur(12px);
}

.agro-loader.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.agro-loader-card {
    width: min(92vw, 460px);
    overflow: hidden;
    border: 1px solid rgba(6, 78, 59, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 24px 70px rgba(6, 78, 59, .18);
}

.agro-loader-scene {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(236, 253, 245, .9) 0%, rgba(255, 251, 235, .82) 58%, rgba(220, 252, 231, .78) 100%);
}

.agro-loader-sun {
    position: absolute;
    top: 22px;
    right: 36px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #f5b334;
    box-shadow: 0 0 0 9px rgba(245, 179, 52, .14);
}

.agro-loader-furrows {
    position: absolute;
    inset: auto -10px 0;
    height: 54px;
    background:
        repeating-linear-gradient(165deg, rgba(132, 94, 34, .16) 0 8px, transparent 8px 23px),
        linear-gradient(180deg, rgba(22, 101, 52, .11), rgba(22, 101, 52, .18));
}

.agro-loader-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 48px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(6, 78, 59, .35), transparent);
}

.agro-loader-tractor {
    position: absolute;
    left: 0;
    bottom: 46px;
    width: 112px;
    height: 70px;
    color: #166534;
    transform: translateX(-130px);
    animation: agro-tractor-drive 4.6s linear infinite;
}

.agro-loader-tractor svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 12px 10px rgba(22, 101, 52, .16));
}

.agro-loader-wheel {
    transform-box: fill-box;
    transform-origin: center;
    animation: agro-wheel-spin .72s linear infinite;
}

.agro-loader-dust {
    position: absolute;
    left: 12px;
    bottom: 55px;
    display: flex;
    gap: 8px;
    transform: translateX(-80px);
    animation: agro-dust-drive 4.6s linear infinite;
}

.agro-loader-dust span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(132, 94, 34, .22);
    animation: agro-dust-pulse .9s ease-in-out infinite;
}

.agro-loader-dust span:nth-child(2) {
    animation-delay: .18s;
}

.agro-loader-dust span:nth-child(3) {
    animation-delay: .34s;
}

.agro-loader-copy {
    padding: 22px;
    text-align: center;
}

.agro-loader-kicker {
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.agro-loader-title {
    margin-top: 8px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.18;
}

.agro-loader-message {
    margin: 10px auto 0;
    max-width: 330px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.agro-loader-bar {
    position: relative;
    height: 8px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.agro-loader-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, #047857, #d6a21f);
    animation: agro-loader-bar 1.45s ease-in-out infinite;
}

@keyframes agro-tractor-drive {
    0% { transform: translateX(-130px) translateY(0); }
    18% { transform: translateX(90px) translateY(-1px); }
    44% { transform: translateX(220px) translateY(1px); }
    72% { transform: translateX(360px) translateY(-1px); }
    100% { transform: translateX(520px) translateY(0); }
}

@keyframes agro-dust-drive {
    0% { transform: translateX(-90px); opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { transform: translateX(455px); opacity: 0; }
}

@keyframes agro-wheel-spin {
    to { transform: rotate(360deg); }
}

@keyframes agro-dust-pulse {
    0%, 100% { transform: translateY(0) scale(.75); opacity: .35; }
    50% { transform: translateY(-7px) scale(1.2); opacity: .75; }
}

@keyframes agro-loader-bar {
    0% { transform: translateX(-105%); }
    55% { transform: translateX(85%); }
    100% { transform: translateX(245%); }
}

@media (max-width: 640px) {
    .agro-loader-card {
        border-radius: 10px;
    }

    .agro-loader-scene {
        min-height: 152px;
    }

    .agro-loader-title {
        font-size: 21px;
    }

    .agro-loader-tractor {
        animation-duration: 4.2s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agro-loader,
    .agro-loader-tractor,
    .agro-loader-wheel,
    .agro-loader-dust,
    .agro-loader-dust span,
    .agro-loader-bar::before {
        animation: none;
        transition: none;
    }

    .agro-loader-tractor {
        transform: translateX(44vw);
    }

    .agro-loader-dust {
        display: none;
    }
}
