/* =============================================================================
   SISTEMA GLOBAL DE LOADER & PROGRESSO (FRONT OFFICE / CLIENTE)
   Caminho: front/assets/css/front_loader.css
   ============================================================================= */

/* 1. OVERLAY DE BLOQUEIO TOTAL */
.padel-db-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.padel-db-loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* 2. CAIXA DO MODAL DO FRONT OFFICE */
.padel-db-loader-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.85rem 1.75rem;
    width: 380px;
    max-width: 90vw;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Modo de Consulta Simples (apenas anel giratório com a % no centro, sem card) */
.padel-db-loader-card.is-simple {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    min-width: auto !important;
}

.padel-db-loader-card.is-simple .padel-db-loader-icon-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0;
}

.padel-db-loader-card.is-simple .padel-db-spinner-ring {
    width: 82px;
    height: 82px;
    border-width: 3.5px;
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: #2563eb;
}

.padel-db-loader-card.is-simple .padel-db-center-content {
    display: flex !important;
}

.padel-db-loader-card.is-simple .padel-db-loader-content {
    display: none !important;
}

/* 3. ÍCONE / SPINNER SIMPLES (Oculto no modo mutação do Front) */
.padel-db-loader-icon-container {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.padel-db-spinner-box {
    position: relative;
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.padel-db-spinner-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 3.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: padelDbSpin 0.9s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
    box-sizing: border-box;
}

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

.padel-db-center-content {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Pilha Central com Número 100% Centrado e % Abaixo Menor */
.padel-db-center-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.padel-db-num {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.padel-db-unit {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.padel-db-loading-caption {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.85rem;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    user-select: none;
    line-height: 1;
}

.padel-db-simple-percent {
    display: none;
}

/* 4. BLOCO DE CONTEÚDO DO FRONT (SEM ÍCONES, DESIGN SIMPLES E AMIGÁVEL) */
.padel-db-loader-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.padel-db-loader-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.padel-db-loader-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

/* 5. PROGRESS BAR */
.padel-db-progress-wrapper {
    width: 100%;
}

.padel-db-progress-track {
    width: 100%;
    height: 7px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.6rem;
}

.padel-db-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 99px;
    transition: width 0.2s ease-out;
}

.padel-db-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.775rem;
    font-weight: 600;
    color: #64748b;
}

.padel-db-progress-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.padel-db-status-dot {
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    display: inline-block;
    animation: padelDotPulse 1.2s infinite;
}

@keyframes padelDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.padel-db-progress-percentage {
    color: #2563eb;
    font-weight: 700;
}
