/* ==================================================
   FARMNOVA AI
   GLOBAL LOADER
================================================== */


/* ==================================================
   LOADER CONTAINER
================================================== */

.farmnova-loader {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.96);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    z-index: 99999;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}


/* ==================================================
   ACTIVE STATE
================================================== */

.farmnova-loader.is-active {
    opacity: 1;

    visibility: visible;

    pointer-events: all;
}


/* ==================================================
   LOADER CONTENT
================================================== */

.farmnova-loader-content {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    min-width: 220px;
}


/* ==================================================
   ORBIT
================================================== */

.farmnova-loader-orbit {

    position: relative;

    width: 100px;
    height: 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(47, 143, 53, 0.15);

    border-radius: 50%;

    animation: farmNovaOrbitPulse 2.2s ease-in-out infinite;
}


/* ==================================================
   INNER LOGO
================================================== */

.farmnova-loader-logo {

    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #2f8f35;

    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(47, 143, 53, 0.28);

    animation: farmNovaLogoPulse 2s ease-in-out infinite;
}


/* ==================================================
   LEAF
================================================== */

.loader-leaf {

    color: #ffffff;

    font-size: 28px;

    line-height: 1;
}


/* ==================================================
   ANIMATED DOTS
================================================== */

.loader-dot {

    position: absolute;

    width: 8px;
    height: 8px;

    background: #2f8f35;

    border-radius: 50%;

    box-shadow:
        0 0 12px rgba(47, 143, 53, 0.4);
}


/* ==================================================
   DOT POSITIONS
================================================== */

.loader-dot-1 {
    top: -4px;
    left: 50%;

    transform: translateX(-50%);
}

.loader-dot-2 {
    right: -4px;
    top: 50%;

    transform: translateY(-50%);
}

.loader-dot-3 {
    bottom: -4px;
    left: 50%;

    transform: translateX(-50%);
}

.loader-dot-4 {
    left: -4px;
    top: 50%;

    transform: translateY(-50%);
}


/* ==================================================
   BRAND
================================================== */

.farmnova-loader-brand {

    margin-top: 24px;

    font-size: 24px;

    font-weight: 700;

    letter-spacing: -0.04em;

    color: #202020;
}


.farmnova-loader-brand strong {

    color: #2f8f35;

    font-weight: 800;

    margin-left: 3px;
}


/* ==================================================
   MESSAGE
================================================== */

.farmnova-loader-message {

    margin: 8px 0 0;

    color: #6c757d;

    font-size: 14px;

    font-weight: 500;

    min-height: 21px;
}


/* ==================================================
   PROGRESS BAR
================================================== */

.farmnova-loader-progress {

    position: relative;

    width: 120px;

    height: 3px;

    margin-top: 18px;

    overflow: hidden;

    background: rgba(47, 143, 53, 0.12);

    border-radius: 20px;
}


.farmnova-loader-progress span {

    position: absolute;

    left: -40%;

    top: 0;

    width: 40%;

    height: 100%;

    background: #2f8f35;

    border-radius: inherit;

    animation: farmNovaLoaderProgress 1.4s ease-in-out infinite;
}


/* ==================================================
   ANIMATIONS
================================================== */

@keyframes farmNovaOrbitPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}


@keyframes farmNovaLogoPulse {

    0%,
    100% {
        transform: scale(1);

        box-shadow:
            0 10px 30px rgba(47, 143, 53, 0.28);
    }

    50% {
        transform: scale(1.08);

        box-shadow:
            0 14px 38px rgba(47, 143, 53, 0.38);
    }
}


@keyframes farmNovaLoaderProgress {

    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}


/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {

    .farmnova-loader-orbit,
    .farmnova-loader-logo,
    .farmnova-loader-progress span {
        animation: none;
    }

}