/* 
 * hc-loader.css — Honestia Connect Education 
 * ==========================================
 * Estilos para el App Mask y Loader Premium.
 * Previene el FOUC (Flash of Unstyled Content) y saltos de layout.
 */

#hc-app-mask {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hc-loader-logo {
    width: 220px;
    height: auto;
    margin-bottom: 2.5rem;
    animation: hc-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.03));
}

.hc-spinner-minimal {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0, 113, 227, 0.08);
    border-top-color: #0071E3; /* Apple Blue */
    border-radius: 50%;
    animation: hc-spin 0.8s linear infinite;
}

@keyframes hc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes hc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
}

/* Estado activo del body */
body.hc-mask-active {
    overflow: hidden !important;
}

/* Dark mode support basic (OS-level) */
@media (prefers-color-scheme: dark) {
    #hc-app-mask {
        background-color: #000000;
    }
    .hc-spinner-minimal {
        border-color: rgba(255,255,255,0.1);
        border-top-color: #0071E3;
    }
    .hc-loader-logo {
        filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(255,255,255,0.03));
    }
}

/* Dark mode support (App-level via .dark class) */
html.dark #hc-app-mask {
    background-color: #000000;
}
html.dark .hc-spinner-minimal {
    border-color: rgba(255,255,255,0.1);
    border-top-color: #0071E3;
}
html.dark .hc-loader-logo {
    filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(255,255,255,0.03));
}
