/* ============================================
   BANNER PWA PRINCIPAL
   ============================================ */
.cafe-pwa-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    z-index: 999998;
    animation: pwaSlideUp 0.4s ease-out;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes pwaSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pwaFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    padding: 18px;
    gap: 18px;
    position: relative;
}

.pwa-banner-icon {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pwa-banner-text {
    flex-grow: 1;
    min-width: 0;
}

.pwa-banner-text h4 {
    margin: 0 0 6px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.pwa-banner-text p {
    margin: 0 0 8px 0;
    color: #546e7a;
    font-size: 14px;
    line-height: 1.4;
}

.pwa-banner-note {
    display: block;
    font-size: 12px;
    color: #78909c;
}

.show-instructions-link {
    color: #3498db;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

.show-instructions-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.pwa-banner-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.pwa-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.pwa-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pwa-btn-secondary {
    background: #f5f5f5;
    color: #546e7a;
}

.pwa-btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.pwa-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 22px;
    color: #b0bec5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.pwa-close-btn:hover {
    background: #f5f5f5;
    color: #78909c;
}

/* ============================================
   MODAL DE INSTRUÇÕES
   ============================================ */
.pwa-instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    animation: pwaFadeIn 0.3s ease-out;
}

.pwa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.pwa-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 550px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: pwaSlideUp 0.4s ease-out;
}

.pwa-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
    z-index: 1;
}

.pwa-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.pwa-modal-header {
    margin-right: 40px;
    margin-bottom: 25px;
}

.pwa-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-modal-icon {
    font-size: 40px;
}

.pwa-modal-title {
    flex-grow: 1;
}

.pwa-modal-body {
    margin-bottom: 25px;
}

/* Conteúdo das instruções */
.pwa-instructions-content {
    margin-bottom: 20px;
}

.pwa-instructions-content h4 {
    color: #000;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.pwa-instructions-content ol,
.pwa-instructions-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pwa-instructions-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.pwa-instructions-content strong {
    color: #2c3e50;
}

/* Por que instalar */
.pwa-why-install {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    text-align: center;
}

.pwa-why-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pwa-why-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    font-size: 14px;
}

.pwa-feature {
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Rodapé do modal */
.pwa-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.pwa-modal-close-btn {
    padding: 12px 30px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
}

.pwa-modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: #5a6268;
}

.pwa-ios-share-btn {
    padding: 12px 30px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.pwa-ios-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
    background: #0062cc;
}

/* ============================================
   MENSAGEM DE SUCESSO
   ============================================ */
.pwa-success-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 25px 35px;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(46, 204, 113, 0.4);
    z-index: 999999;
    animation: pwaSlideUp 0.5s ease-out;
    max-width: 90%;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.pwa-success-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.pwa-success-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.pwa-success-text {
    font-size: 16px;
    opacity: 0.9;
}

/* ============================================
   ESTILOS ESPECÍFICOS POR DISPOSITIVO
   ============================================ */
/* iOS */
.pwa-instructions-content.ios-instructions {
    background: #f5f5f7;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.pwa-instructions-content.ios-instructions h4 {
    color: #000;
}

/* Android */
.pwa-instructions-content.android-instructions {
    background: #f1f8e9;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.pwa-instructions-content.android-instructions h4 {
    color: #0f9d58;
}

/* Desktop */
.pwa-instructions-content.desktop-instructions {
    background: #e8f0fe;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.pwa-instructions-content.desktop-instructions h4 {
    color: #4285f4;
}

/* ============================================
   DICAS E ALERTAS
   ============================================ */
.pwa-tip-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.pwa-tip-box.ios-tip {
    background: #e8f4f8;
    color: #2c3e50;
}

.pwa-tip-box.android-tip {
    background: #e8f4f8;
    color: #2c3e50;
}

.pwa-tip-box.desktop-tip {
    background: #f3e5f5;
    color: #4a148c;
}

.pwa-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .cafe-pwa-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .pwa-banner-actions {
        width: 100%;
        flex-direction: row;
    }
    
    .pwa-btn {
        flex: 1;
        padding: 12px;
    }
    
    .pwa-close-btn {
        top: 8px;
        right: 8px;
    }
    
    .pwa-modal-content {
        width: calc(100% - 20px);
        padding: 20px;
    }
    
    .pwa-modal-header h3 {
        font-size: 22px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pwa-modal-icon {
        font-size: 35px;
    }
    
    .pwa-modal-footer {
        flex-direction: column;
    }
    
    .pwa-modal-close-btn,
    .pwa-ios-share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pwa-why-features {
        grid-template-columns: 1fr 1fr;
    }
    
    .pwa-success-message {
        padding: 20px;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .pwa-banner-text h4 {
        font-size: 15px;
    }
    
    .pwa-banner-text p {
        font-size: 13px;
    }
    
    .pwa-btn {
        font-size: 13px;
        padding: 10px;
    }
    
    .pwa-why-features {
        grid-template-columns: 1fr;
    }
    
    .pwa-modal-content {
        padding: 15px;
    }
}