/**
 * PWA Koia - Estilos de Instalación
 * Versión: Wollo Brand (Naranja)
 */

/* =========================================
   1. BOTÓN PRINCIPAL (SHORTCODE)
   ========================================= */
.pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    /* Gradiente Naranja Wollo */
    background: linear-gradient(135deg, #FF6B00 0%, #FF8F00 100%);
    color: white;
    
    border: none;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px; /* Estilo Pill (Cápsula) */
    
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    -webkit-appearance: none;
    line-height: 1.2;
}

.pwa-install-button i {
    font-size: 1.2rem;
}

.pwa-install-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.5);
    filter: brightness(1.05);
}

.pwa-install-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

/* =========================================
   2. SISTEMA DE MODALES (POPUPS)
   ========================================= */
.pwa-modal-overlay {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    
    /* Fondo oscuro con desenfoque (Glassmorphism) */
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pwa-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.pwa-modal-card {
    background: #ffffff;
    border-radius: 24px; /* Bordes muy redondeados estilo iOS */
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.pwa-modal-overlay.is-active .pwa-modal-card {
    transform: scale(1) translateY(0);
}

/* Botón de cerrar modal */
.pwa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.pwa-modal-close:hover {
    background: #e2e8f0;
    color: #ef4444;
}

/* Tipografía del Modal */
.pwa-modal-card h2 {
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    color: #0f172a;
    font-weight: 800;
}

.pwa-modal-card p {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* --- GUÍA VISUAL PASO A PASO (iOS) --- */
.ios-guide-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff7ed; /* Fondo naranja muy sutil */
    border: 1px solid #ffedd5;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-align: left;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.ios-guide-step:hover {
    background: #fff0d9;
}

.ios-guide-step svg, 
.ios-guide-step img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Estilo para el QR */
#pwa-qr-code-img {
    max-width: 220px;
    width: 100%;
    border-radius: 16px;
    border: 4px solid #f8fafc;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* =========================================
   3. BANNER FLOTANTE (ESTILO NOTIFICACIÓN)
   ========================================= */
#pwa-floating-banner {
    display: flex;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    
    /* Fondo blanco casi opaco con desenfoque */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
    
    border-radius: 20px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1), 
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
        
    padding: 10px 14px;
    align-items: center;
    gap: 12px;
    
    max-width: 360px;
    width: 90%; /* Responsive en móviles */
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#pwa-floating-banner.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Icono del banner (Logo) */
.pwa-banner-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: white;
    border-radius: 10px;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.pwa-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Contenido de texto */
.pwa-banner-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pwa-banner-content strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
}

.pwa-banner-content span {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* Botón CTA dentro del banner */
.pwa-banner-cta {
    background: #FF6B00; /* Naranja Wollo */
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(255, 107, 0, 0.3);
}

/* Botón cerrar banner */
.pwa-banner-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s;
    z-index: 5;
}

.pwa-banner-close:hover {
    color: #ef4444;
    border-color: #fca5a5;
}