﻿/* Prefijo 'cb-load-' utilizado para evitar conflictos con Tailwind CSS v4 */
/* ===================================================================== */
/* 1. LOADER: CON BASE (PRIMARIA)                                        */
/* ===================================================================== */
.cb-load-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    z-index: 9999;
    perspective: 1000px;
}

.cb-load-wrapper {
    display: flex;
    align-items: center;
    gap: 35px;
    transform: scale(1.3);
    padding-left: 15px;
}

.cb-load-stack {
    display: flex;
    flex-direction: column;
    margin-top: -30px;
}

.cb-load-cube {
    width: 45px;
    height: 45px;
    position: relative;
    transform-style: preserve-3d;
    margin-bottom: -6px;
    transform: rotateX(-30deg) rotateY(45deg);
}

.cb-load-face {
    position: absolute;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-weight: 900;
    font-size: 45px;
    line-height: 1;
    color: white;
    backface-visibility: hidden;
}

.cb-load-face-top {
    transform: rotateX(90deg) translateZ(22.5px);
}

.cb-load-face-left {
    transform: rotateY(-90deg) translateZ(22.5px);
}

.cb-load-face-right {
    transform: translateZ(22.5px);
}

/* Colores Cubos */
.cb-load-cube-a {
    z-index: 3;
    animation: cb-swingNormal 5s infinite ease-in-out;
}

    .cb-load-cube-a .cb-load-face-top {
        background-color: #fca5a5;
    }

    .cb-load-cube-a .cb-load-face-left {
        background-color: #ef4444;
    }

    .cb-load-cube-a .cb-load-face-right {
        background-color: #b91c1c;
    }

.cb-load-cube-b {
    z-index: 2;
    animation: cb-swingInverse 5s infinite ease-in-out;
}

    .cb-load-cube-b .cb-load-face-top {
        background-color: #93c5fd;
    }

    .cb-load-cube-b .cb-load-face-left {
        background-color: #3b82f6;
    }

    .cb-load-cube-b .cb-load-face-right {
        background-color: #1d4ed8;
    }

.cb-load-cube-c {
    z-index: 1;
    animation: cb-swingNormal 5s infinite ease-in-out;
}

    .cb-load-cube-c .cb-load-face-top {
        background-color: #fdba74;
    }

    .cb-load-cube-c .cb-load-face-left {
        background-color: #f97316;
    }

    .cb-load-cube-c .cb-load-face-right {
        background-color: #c2410c;
    }

@keyframes cb-swingNormal {
    0%, 50%, 100% {
        transform: rotateX(-30deg) rotateY(45deg);
    }

    25% {
        transform: rotateX(-30deg) rotateY(70deg);
    }

    75% {
        transform: rotateX(-30deg) rotateY(20deg);
    }
}

@keyframes cb-swingInverse {
    0%, 50%, 100% {
        transform: rotateX(-30deg) rotateY(45deg);
    }

    25% {
        transform: rotateX(-30deg) rotateY(20deg);
    }

    75% {
        transform: rotateX(-30deg) rotateY(70deg);
    }
}

.cb-load-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 0.8;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 900;
    font-size: 56px;
    letter-spacing: -2px;
}

.cb-load-text-con {
    color: #0ea5e9;
}

.cb-load-text-base {
    color: #0369a1;
}

.cb-load-msg {
    margin-top: 60px;
    color: #64748b;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: cb-pulseText 3s infinite;
}

/* ===================================================================== */
/* 2. LOADER: SECUNDARIA AVANZA (NUEVO LOGO POLIGONAL 3D)                */
/* ===================================================================== */
.sa-load-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    z-index: 9999;
    perspective: 1000px;
}

.sa-load-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
    transform: scale(1.1);
}

.sa-load-star-container {
    animation: sa-spin 5s infinite linear;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sa-star-svg {
    overflow: visible;
    filter: drop-shadow(0px 10px 15px rgba(2, 132, 199, 0.2));
}

.sa-star-inner {
    animation: sa-pulse 2.5s ease-in-out infinite alternate;
}

.sa-star-inner-dark {
    animation: sa-pulse-dark 2.5s ease-in-out infinite alternate-reverse;
}

.sa-star-inner-light {
    animation: sa-pulse-light 2s ease-in-out infinite alternate;
}

@keyframes sa-spin {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@keyframes sa-pulse {
    0% {
        opacity: 0.7;
        fill: #0ea5e9;
    }

    100% {
        opacity: 1;
        fill: #38bdf8;
    }
}

@keyframes sa-pulse-dark {
    0% {
        opacity: 0.8;
        fill: #0369a1;
    }

    100% {
        opacity: 1;
        fill: #0284c7;
    }
}

@keyframes sa-pulse-light {
    0% {
        opacity: 0.6;
        fill: #7dd3fc;
    }

    100% {
        opacity: 1;
        fill: #0ea5e9;
    }
}

.sa-load-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 900;
    font-size: 52px;
    letter-spacing: -1.5px;
}

.sa-load-text-secundaria {
    color: #0284c7;
}

.sa-load-text-avanza {
    color: #0ea5e9;
}

.sa-load-msg {
    margin-top: 60px;
    color: #64748b;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: cb-pulseText 3s infinite;
}

@keyframes cb-pulseText {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===================================================================== */
/* 3. RESPONSIVE GLOBAL                                                  */
/* ===================================================================== */
@media (max-width: 600px) {
    .cb-load-wrapper {
        transform: scale(0.75);
        gap: 25px;
        padding-left: 0;
    }

    .sa-load-wrapper {
        transform: scale(0.85);
        gap: 20px;
    }

    .cb-load-msg, .sa-load-msg {
        margin-top: 40px;
        font-size: 16px;
    }

    .sa-load-text-wrapper {
        font-size: 42px;
    }
}
