/* ====================================
   PWA 安装提示样式 - 基于小熊健身色彩系统
   ==================================== */

.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF7A45 0%, #F36A38 100%);
    color: white;
    padding: 16px;
    box-shadow: 0 -4px 24px rgba(255, 122, 69, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: none;
}

.pwa-install-banner.show {
    transform: translateY(0);
}

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

.pwa-install-icon {
    font-size: 32px;
    flex-shrink: 0;
}

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

.pwa-install-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pwa-install-description {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    white-space: nowrap;
    background: white !important;
    color: #FF7A45 !important;
    border: none !important;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pwa-install-btn:hover {
    background: #FFF9F3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-dismiss-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 13px;
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pwa-dismiss-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
}

/* 响应式布局 */
@media (max-width: 576px) {
    .pwa-install-content {
        flex-wrap: wrap;
    }
    
    .pwa-install-icon {
        font-size: 24px;
    }
    
    .pwa-install-title {
        font-size: 14px;
    }
    
    .pwa-install-description {
        font-size: 12px;
    }
    
    .pwa-install-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
    
    .pwa-install-btn {
        padding: 6px 16px;
    }
}

/* iOS Safari 特殊样式 */
@supports (-webkit-touch-callout: none) {
    .pwa-install-banner {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* ====================================
   PWA 安装指引模态框
   ==================================== */

.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.pwa-install-modal.show {
    opacity: 1;
}

.pwa-install-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 42, 42, 0.7);
    backdrop-filter: blur(4px);
}

.pwa-install-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.pwa-install-modal.show .pwa-install-modal-content {
    transform: scale(1);
}

.pwa-install-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F4EFEA;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    color: #5F5F5F;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pwa-install-modal-close:hover {
    background: #FFE3D3;
    color: #FF7A45;
}

.install-guide-steps {
    margin-top: 20px;
}

.install-guide-steps h5 {
    color: #2A2A2A;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7A45 0%, #F36A38 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(255, 122, 69, 0.3);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #2A2A2A;
    margin-bottom: 12px;
}

.step-icon {
    text-align: center;
    padding: 20px;
    background: #FFF9F3;
    border-radius: 16px;
    border: 2px solid #FFE3D3;
}

.pwa-modal-confirm {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF7A45 0%, #F36A38 100%);
    border: none;
    border-radius: 12px;
    color: white;
    transition: all 0.2s ease;
}

.pwa-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 122, 69, 0.4);
}

.pwa-modal-confirm:active {
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 576px) {
    .pwa-install-modal-content {
        padding: 24px;
        width: 95%;
        border-radius: 20px;
    }
    
    .step-title {
        font-size: 14px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .step-icon {
        padding: 16px;
    }
    
    .step-icon i {
        font-size: 24px !important;
    }
    
    .pwa-modal-confirm {
        width: 100%;
        padding: 12px 24px;
    }
}

