/* SpinnerModal - Estilos del componente de carga */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Mayor que cualquier modal (10000) */
    animation: fadeInOverlay 0.3s ease-out;
}

/* Modo claro - overlay blanco con texto oscuro */
:root.light-mode .loading-overlay {
    background-color: rgba(255, 255, 255, 0.7);
}

.loading-overlay *:not(.loading-spinner) {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
    position: relative;
    background: conic-gradient(
        from 0deg,
        #F07400 0%,
        #00b4ff 25%,
        #F07400 50%,
        #00b4ff 75%,
        transparent 75%,
        transparent 100%
    );
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 4px),
        white calc(100% - 4px)
    );
    mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 4px),
        white calc(100% - 4px)
    );
}

/* Modo claro - mismo gradiente */
:root.light-mode .loading-spinner {
    background: conic-gradient(
        from 0deg,
        #F07400 0%,
        #00b4ff 25%,
        #F07400 50%,
        #00b4ff 75%,
        transparent 75%,
        transparent 100%
    );
}

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

.loading-text {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none !important;
    border: none !important;
    pointer-events: none;
}

/* Modo claro - texto oscuro */
:root.light-mode .loading-text {
    color: #1a1a1a;
}
