/* =========================================================================
   Loader do Metas — conceito "Broto / crescimento" (verde-safra)
   Versão CSS para o fluxo de recuperação de senha (forgot-password.php).
   Espelha css/loading.css para manter o loader padronizado em todo o sistema.
   Antes este arquivo era um HTML de demonstração do Bravuscor (lobo/fogo)
   servido como stylesheet — não renderizava nada. Agora é CSS válido.
   ========================================================================= */
:root {
    --seed-base:  #2fae6a;                 /* verde-safra (base)  */
    --seed-light: #5fd18d;                 /* verde claro (broto) */
    --seed-glow:  rgba(47, 174, 106, 0.30);
    --seed-soil:  #4a3d2e;                 /* terra              */
}

/* Overlay centralizado */
.loading-overlay {
    position: fixed;
    inset: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 29, 0.96);
    backdrop-filter: blur(8px);
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
    padding: 20px;
    box-sizing: border-box;
}

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

/* Logo da empresa (pequeno, acima do broto) */
.loading-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    height: 46px;
}
.loading-brand img {
    max-height: 46px;
    max-width: 180px;
    object-fit: contain;
    opacity: .95;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* ===================== Broto ===================== */
.sprout-loader {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}

.sprout-loader .soil {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: 92px;
    height: 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, transparent, #3a3026 12%, var(--seed-soil) 50%, #3a3026 88%, transparent);
    opacity: .8;
}

.sprout-loader .plant {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sprout-loader .stem {
    fill: none;
    stroke: url(#metasSeedGrad);
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-dasharray: 78;
    stroke-dashoffset: 78;
    animation: seedGrow 3.4s ease-in-out infinite;
}

@keyframes seedGrow {
    0%   { stroke-dashoffset: 78; }
    50%  { stroke-dashoffset: 0; }
    82%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 78; }
}

.sprout-loader .leaf {
    fill: var(--seed-base);
    transform-box: fill-box;
    transform-origin: bottom center;
    opacity: 0;
}
.sprout-loader .leaf-l { animation: seedLeaf 3.4s ease-in-out infinite; }
.sprout-loader .leaf-r { animation: seedLeaf 3.4s ease-in-out infinite; animation-delay: .18s; }

@keyframes seedLeaf {
    0%,20% { opacity: 0; transform: scale(0) rotate(0deg); }
    46%    { opacity: 1; transform: scale(1) rotate(0deg); }
    82%    { opacity: 1; transform: scale(1); }
    100%   { opacity: 0; transform: scale(.6); }
}

.sprout-loader .bud {
    fill: var(--seed-light);
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: seedBud 3.4s ease-in-out infinite;
}

@keyframes seedBud {
    0%,42% { opacity: 0; transform: scale(0); }
    58%    { opacity: 1; transform: scale(1.15); }
    82%    { opacity: 1; transform: scale(1); }
    100%   { opacity: 0; transform: scale(.5); }
}

.sprout-loader .grain {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--seed-light);
    opacity: 0;
    bottom: 34px;
    filter: drop-shadow(0 0 4px var(--seed-glow));
}
.sprout-loader .grain:nth-child(1) { left: 30%; animation: seedRise 3.4s ease-out infinite; animation-delay: .2s; }
.sprout-loader .grain:nth-child(2) { left: 50%; animation: seedRise 3.4s ease-out infinite; animation-delay: 1.1s; }
.sprout-loader .grain:nth-child(3) { left: 68%; animation: seedRise 3.4s ease-out infinite; animation-delay: 1.9s; }

@keyframes seedRise {
    0%   { opacity: 0; transform: translateY(0) scale(.6); }
    25%  { opacity: .9; }
    100% { opacity: 0; transform: translateY(-72px) scale(1); }
}

/* ===================== Textos ===================== */
.loading-text {
    color: var(--seed-base);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 6px;
    margin-bottom: 6px;
    animation: textPulse 2s ease-in-out infinite;
    text-align: center;
}

@keyframes textPulse {
    0%,100% { opacity: 0.75; }
    50% { opacity: 1; }
}

.loading-message {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 6px;
    text-align: center;
    max-width: 320px;
}

.motto {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
    text-align: center;
}

@media (max-width: 480px) {
    .sprout-loader {
        width: 120px;
        height: 120px;
        margin-bottom: 12px;
    }
    .loading-text { font-size: 16px; }
    .loading-message { font-size: 13px; max-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
    .sprout-loader .stem { animation: none; stroke-dashoffset: 0; }
    .sprout-loader .leaf,
    .sprout-loader .bud  { animation: none; opacity: 1; transform: none; }
    .sprout-loader .grain,
    .loading-text        { animation: none; }
}

.sprout-loader .stem,
.sprout-loader .leaf,
.sprout-loader .bud,
.sprout-loader .grain,
.loading-text {
    will-change: transform, opacity;
    backface-visibility: hidden;
}
