/* Estilos PWA */
.install-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* Alterado para gradiente institucional Azul */
    background: linear-gradient(135deg, #3a90c9 0%, #1e5a87 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.notification-permission-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff3cd;
    border-top: 2px solid #ffeaa7;
    padding: 15px;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    /* Mantido verde para "Permitir" (Ação de sucesso) */
    background: #28a745; 
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    /* Mantido cinza para "Cancelar" */
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

/* Modo standalone (app instalado) */
.standalone .header {
    padding-top: env(safe-area-inset-top);
    padding-bottom: 20px;
}

.standalone .install-button {
    display: none !important;
}

/* Indicador de offline */
.offline::before {
    content: "📴 Você está offline";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 1001;
    font-size: 14px;
}

/* Splash screen para PWA */
@media all and (display-mode: standalone) {
    .splash-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* Alterado para gradiente institucional Azul */
        background: linear-gradient(135deg, #3a90c9 0%, #1e5a87 100%); 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        color: white;
    }
    
    .splash-screen.hidden {
        display: none;
    }
    
    .splash-logo {
        font-size: 48px;
        margin-bottom: 20px;
    }
    
    .splash-text {
        font-size: 24px;
        font-weight: 300;
    }
}

/* Melhorias para mobile */
@media (max-width: 768px) {
    .install-button {
        bottom: 70px;
        right: 15px;
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .notification-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.install-button, .notification-permission-banner {
    animation: fadeIn 0.5s ease-out;
}