/* ===================================
   PRELOADER - Versão 1 e 2
   =================================== */

/* Cores do Template - Versão 1 */
:root[data-theme="1"] {
    --cor-primaria: #59205D;
    --cor-secundaria: #4A1C52;
    --cor-terciaria: #6B2569;
}

/* Cores do Template - Versão 2 */
:root[data-theme="2"] {
    --cor-primaria: #01448A;
    --cor-secundaria: #013970;
    --cor-terciaria: #0155A4;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#preloader.fade-out {
    opacity: 0;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* Container dos anéis */
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
}

/* Anéis do spinner */
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--cor-primaria);
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--cor-terciaria);
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: var(--cor-secundaria);
    animation-delay: 0.4s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Dots (bolinhas animadas) */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.loading-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

/* Cores dos dots */
.loading-dots .dot {
    background-color: var(--cor-primaria);
}

.loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

.loading-dots .dot:nth-child(4) {
    animation-delay: 0.16s;
}

.loading-dots .dot:nth-child(5) {
    animation-delay: 0.32s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Texto de carregamento */
.loading-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cor-primaria);
}

/* Responsivo */
@media (max-width: 768px) {
    .spinner-container {
        width: 60px;
        height: 60px;
    }

    .loading-text {
        font-size: 14px;
    }
}
