/**
 * PWA Install Prompt
 * แสดง Popup แจ้งเตือนให้ติดตั้ง App
 */

/* CSS for Install Popup */
.install-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.install-prompt.show {
    display: block;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.install-prompt-text {
    flex: 1;
}

.install-prompt-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.install-prompt-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

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

.install-btn {
    padding: 8px 20px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .install-prompt {
        padding: 12px 15px;
    }
    
    .install-prompt-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .install-prompt-text h4 {
        font-size: 14px;
    }
    
    .install-prompt-text p {
        font-size: 12px;
    }
    
    .install-prompt-actions {
        width: 100%;
    }
    
    .install-btn,
    .close-btn {
        flex: 1;
        padding: 10px;
        font-size: 14px;
    }
}

/* Install Button in Navbar (Alternative) */
.install-app-btn {
    display: none;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    align-items: center;
    gap: 8px;
}

.install-app-btn.show {
    display: flex;
}

.install-app-btn i {
    font-size: 16px;
}