/**
 * PWA 安装提示样式
 * 隆相.中国 产品身份信息保障系统
 * 
 * @author FREDERIC.LTD
 * @version 1.0.0
 * @date 2025-10-20
 */

/* PWA安装横幅 */
.pwa-install-banner {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 0;
}

.pwa-install-banner.show {
    bottom: 0;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

.pwa-install-icon {
    flex-shrink: 0;
}

.pwa-install-icon img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-install-info {
    flex: 1;
    color: #ffffff;
}

.pwa-install-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.pwa-install-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.pwa-install-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pwa-btn-primary,
.pwa-btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pwa-btn-primary {
    background: #ffffff;
    color: #667eea;
}

.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.pwa-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 12px;
}

.pwa-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* iOS安装指引 */
.pwa-ios-guide {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-height: 80vh;
    overflow-y: auto;
}

.pwa-ios-guide.show {
    bottom: 0;
}

.pwa-ios-content {
    padding: 24px;
}

.pwa-ios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.pwa-ios-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1d1d1f;
    font-weight: 700;
}

.pwa-close-btn {
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 18px;
}

.pwa-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pwa-ios-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.step-content {
    flex: 1;
    padding-top: 8px;
}

.step-content p {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.step-content i {
    font-size: 20px;
    vertical-align: middle;
    margin: 0 4px;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .pwa-install-content {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    
    .pwa-install-icon img {
        width: 48px;
        height: 48px;
    }
    
    .pwa-install-info h3 {
        font-size: 16px;
    }
    
    .pwa-install-info p {
        font-size: 13px;
    }
    
    .pwa-install-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .pwa-btn-primary {
        flex: 1;
        justify-content: center;
    }
}

/* 桌面端全屏安装提示 */
.pwa-install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pwa-install-overlay.show {
    display: flex;
    opacity: 1;
}

.pwa-install-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pwa-install-overlay.show .pwa-install-modal {
    transform: scale(1);
}

.pwa-modal-icon {
    margin-bottom: 24px;
}

.pwa-modal-icon img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pwa-modal-content h2 {
    margin: 0 0 12px 0;
    font-size: 28px;
    color: #1d1d1f;
    font-weight: 700;
}

.pwa-modal-content p {
    margin: 0 0 32px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.pwa-modal-features {
    text-align: left;
    margin: 24px 0 32px 0;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
}

.pwa-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-feature:last-child {
    margin-bottom: 0;
}

.pwa-feature i {
    color: #667eea;
    font-size: 20px;
    width: 24px;
}

.pwa-feature span {
    color: #333;
    font-size: 15px;
}

.pwa-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pwa-modal-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pwa-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    flex: 1;
}

.pwa-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pwa-modal-btn-secondary {
    background: #f0f0f0;
    color: #666;
    padding: 14px 24px;
}

.pwa-modal-btn-secondary:hover {
    background: #e0e0e0;
}

/* 动画效果 */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pwa-install-banner.show {
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pwa-install-overlay.show {
    animation: fadeIn 0.3s ease;
}

