/**
 * PWA Styles - Banner de instalación y notificaciones
 */

/* Banner de instalación */
.pwa-install-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: bottom 0.3s ease-in-out;
}

.pwa-install-banner.show {
    bottom: 0;
}

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

.pwa-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.pwa-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.pwa-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.pwa-banner-actions .btn {
    white-space: nowrap;
}

/* Notificaciones PWA */
.pwa-notification,
.pwa-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pwa-banner-icon {
        font-size: 1.5rem;
    }
    
    .pwa-banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .pwa-banner-actions .btn {
        flex: 1;
    }
    
    .pwa-notification,
    .pwa-update-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Estilos cuando la app está instalada (standalone mode) */
@media (display-mode: standalone) {
    /* Ocultar elementos que no son necesarios en la app */
    .browser-only {
        display: none !important;
    }
    
    /* Agregar padding top para compensar la barra de estado */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* iOS Safari específico */
@supports (-webkit-touch-callout: none) {
    .pwa-install-banner {
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
}

/* Splash screen personalizado (solo visual) */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10000;
    animation: fadeOut 0.5s ease-out 2s forwards;
}

.pwa-splash-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.pwa-splash-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.pwa-splash-subtitle {
    font-size: 1rem;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
