/**
 * Elite Meet - Loading Numérico Styles
 * Loading de progresso premium (1% - 100%)
 */

/* =====================================================
   OVERLAY DE LOADING
   ===================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   LOADING NUMÉRICO (Obrigatório)
   ===================================================== */
.loading-numeric {
    text-align: center;
}

.loading-percentage {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-md);
}

.loading-text {
    color: var(--cinza-texto);
    font-size: 0.875rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* =====================================================
   BARRA DE PROGRESSO
   ===================================================== */
.loading-progress-container {
    width: 200px;
    margin: var(--spacing-lg) auto 0;
}

.loading-progress-bar {
    height: 3px;
    background: var(--cinza-escuro);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 100ms ease;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    bottom: -2px;
    width: 10px;
    background: var(--dourado-premium);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--dourado-premium);
}

/* =====================================================
   LOADING EM BOTÃO
   ===================================================== */
.btn-loading-state {
    position: relative;
    pointer-events: none;
}

.btn-loading-state .btn-text {
    opacity: 0;
}

.btn-loading-state .btn-loading-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-loading-percent {
    font-weight: 700;
    color: var(--preto-absoluto);
}

/* Mini barra de progresso no botão */
.btn-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--roxo-moderno);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    width: 0%;
    transition: width 100ms ease;
}

/* =====================================================
   LOADING INLINE
   ===================================================== */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--dourado-premium);
    font-size: 0.875rem;
}

.loading-inline-percent {
    font-weight: 600;
    min-width: 40px;
}

/* =====================================================
   LOADING DOTS (Alternativo)
   ===================================================== */
.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--dourado-premium);
    border-radius: var(--radius-full);
    animation: loading-dot-bounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

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

/* =====================================================
   SPINNER CIRCULAR (Alternativo)
   ===================================================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cinza-escuro);
    border-top-color: var(--dourado-premium);
    border-radius: var(--radius-full);
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   LOADING CARD
   ===================================================== */
.loading-card {
    background: var(--cinza-escuro);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
}

.loading-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-card-icon .loading-spinner {
    width: 30px;
    height: 30px;
}

/* =====================================================
   ANIMAÇÕES DE ENTRADA/SAÍDA
   ===================================================== */
.loading-fade-enter {
    animation: loading-fade-in var(--transition-fast) ease;
}

.loading-fade-exit {
    animation: loading-fade-out var(--transition-fast) ease forwards;
}

@keyframes loading-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loading-fade-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* =====================================================
   LOADING PREMIUM (com brilho)
   ===================================================== */
.loading-premium {
    position: relative;
}

.loading-premium::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        circle,
        rgba(212, 175, 55, 0.2) 0%,
        transparent 70%
    );
    animation: loading-glow-pulse 2s ease-in-out infinite;
}

@keyframes loading-glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =====================================================
   LOADING PAGE TRANSITION
   ===================================================== */
.page-loading {
    position: fixed;
    inset: 0;
    background: var(--preto-absoluto);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-loading-logo {
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loading-logo img {
    max-width: 150px;
    height: auto;
}

.page-loading-bar {
    width: 120px;
    height: 2px;
    background: var(--cinza-escuro);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.page-loading-bar-fill {
    height: 100%;
    background: var(--dourado-premium);
    width: 0%;
    animation: page-loading-fill 2s ease forwards;
}

@keyframes page-loading-fill {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 80%; }
    100% { width: 100%; }
}
