/* PWA Install Prompt - Шторка сверху */
.pwa-install-shade {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pwa-install-shade.visible {
    top: 0;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-icon img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

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

.pwa-install-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.pwa-install-description {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pwa-install-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

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

.pwa-install-button:active {
    transform: translateY(0);
}

.pwa-install-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

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

.pwa-install-close::before,
.pwa-install-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.pwa-install-close::before {
    transform: rotate(45deg);
}

.pwa-install-close::after {
    transform: rotate(-45deg);
}

/* Адаптивность для мобильных */
@media screen and (max-width: 768px) {
    .pwa-install-shade {
        padding: 12px 16px;
    }

    .pwa-install-icon {
        width: 40px;
        height: 40px;
    }

    .pwa-install-icon img {
        width: 28px;
        height: 28px;
    }

    .pwa-install-title {
        font-size: 14px;
    }

    .pwa-install-description {
        font-size: 12px;
    }

    .pwa-install-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pwa-install-close {
        width: 32px;
        height: 32px;
    }
}

/* Альтернативный стиль - модальное окно */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 20px;
}

.pwa-install-modal.visible {
    opacity: 1;
    visibility: visible;
}

.pwa-install-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    padding: 32px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
}

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

.pwa-install-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-modal-icon img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.pwa-install-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.pwa-install-modal-description {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.pwa-install-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pwa-install-modal-button {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.pwa-install-modal-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pwa-install-modal-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pwa-install-modal-button.secondary {
    background: #f5f5f5;
    color: #666;
}

.pwa-install-modal-button.secondary:hover {
    background: #ebebeb;
}

/* iOS специфично */
.pwa-install-ios-instruction {
    display: none;
    text-align: left;
    margin-top: 16px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.pwa-install-ios-instruction.visible {
    display: block;
}

.pwa-install-ios-instruction strong {
    color: #333;
}
