/* ===== Приложение: всплывающее окно и кнопка «Скачать» ===== */

.app-promo-wrap {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    pointer-events: none;
}

.app-promo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.app-promo {
    position: relative;
    width: 100%;
    max-width: 360px;
    padding: 2rem 1.5rem 1.4rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.app-promo-wrap.show .app-promo-backdrop { opacity: 1; }
.app-promo-wrap.show .app-promo { opacity: 1; transform: none; }

.app-promo-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.07);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
}

.app-promo-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    margin-bottom: 1rem;
}

.app-promo-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 1.2rem;
}

.app-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.app-dl-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.app-dl-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.app-dl-hint {
    margin-top: 0.6rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-2);
    text-align: center;
}

/* Кнопка в профиле — между карточкой профиля и счётчиками */
.app-dl-row { margin-bottom: 1rem; }

/* ПК: окно в правом верхнем углу, без затемнения; кнопки в профиле нет */
@media (min-width: 900px) {
    .app-promo-wrap {
        align-items: flex-start;
        justify-content: flex-end;
        padding: 20px 28px;
    }
    .app-promo-backdrop { display: none; }
    .app-promo { max-width: 320px; transform: translateY(-16px) scale(0.96); }
    .app-dl-row { display: none; }
}
