/* PWA Splash Screen - Cometa Marketing */

/* Splash screen para iOS */
@media screen and (max-width: 1024px) {
    /* Configurações específicas para splash screen */
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Estilo para quando o PWA está sendo carregado */
    .pwa-loading {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #a50dee 0%, #8a0bc7 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999999;
        color: white;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }
    
    .pwa-loading .splash-logo {
        width: 120px;
        height: 120px;
        background: white;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        animation: pulse 2s infinite;
    }
    
    .pwa-loading .splash-logo img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        border: none;
    }
    
    .pwa-loading .splash-text {
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .pwa-loading .splash-subtitle {
        font-size: 16px;
        opacity: 0.8;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .pwa-loading .splash-progress {
        width: 200px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        overflow: hidden;
    }
    
    .pwa-loading .splash-progress-bar {
        height: 100%;
        background: white;
        border-radius: 2px;
        width: 0%;
        transition: width 0.3s ease;
        animation: progress 2s ease-in-out infinite;
    }
    
    @keyframes pulse {
        0% {
            transform: scale(1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        50% {
            transform: scale(1.05);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
    }
    
    @keyframes progress {
        0% {
            width: 0%;
        }
        50% {
            width: 70%;
        }
        100% {
            width: 100%;
        }
    }
}

/* Configurações específicas para Android */
@media screen and (max-width: 768px) {
    .pwa-loading .splash-logo {
        width: 100px;
        height: 100px;
        border-radius: 16px;
    }
    
    .pwa-loading .splash-logo img {
        width: 60px;
        height: 60px;
    }
    
    .pwa-loading .splash-text {
        font-size: 20px;
    }
    
    .pwa-loading .splash-subtitle {
        font-size: 14px;
    }
}

/* Configurações para telas muito pequenas */
@media screen and (max-width: 480px) {
    .pwa-loading .splash-logo {
        width: 80px;
        height: 80px;
        border-radius: 12px;
    }
    
    .pwa-loading .splash-logo img {
        width: 50px;
        height: 50px;
    }
    
    .pwa-loading .splash-text {
        font-size: 18px;
    }
    
    .pwa-loading .splash-subtitle {
        font-size: 13px;
    }
    
    .pwa-loading .splash-progress {
        width: 150px;
    }
}

/* Fade out animation */
.pwa-loading.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
    pointer-events: none;
}

/* Garantir que o splash screen seja sempre visível durante o carregamento */
.pwa-loading {
    display: flex !important;
}

/* Esconder splash screen quando o app estiver carregado */
body.pwa-loaded .pwa-loading {
    display: none !important;
}
