/* ============================================================
   SocialNet 1.3.55 — приложение (PWA): плашки установки и уведомлений
   ============================================================ */
.snpwa-banner {
    position: fixed; z-index: 100050;
    left: 12px; right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; gap: 12px;
    max-width: 520px; margin: 0 auto;
    padding: 12px 10px 12px 12px; border-radius: 18px;
    background: var(--card); color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .22);
    opacity: 0; transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}
.snpwa-banner.is-in { opacity: 1; transform: none; }
.snpwa-banner img { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; }
.snpwa-bell { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: rgba(99, 102, 241, .12); }
.snpwa-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.snpwa-banner-text b { font-size: 15px; }
.snpwa-banner-text small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.snpwa-banner .btn { flex: 0 0 auto; padding: 9px 14px; white-space: nowrap; }
.snpwa-x {
    flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 14px;
}
.snpwa-x:hover { background: var(--bg); }
@media (min-width: 901px) {
    .snpwa-banner { bottom: 24px; left: auto; right: 24px; width: 420px; }
}

/* Подсказка для iPhone */
.snpwa-ios {
    position: fixed; inset: 0; z-index: 100060;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 23, 42, .55);
    opacity: 0; transition: opacity .2s ease;
}
.snpwa-ios.is-in { opacity: 1; }
.snpwa-ios-card {
    width: 100%; max-width: 380px; padding: 22px 20px 18px; border-radius: 22px;
    background: var(--card); color: var(--text); text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.snpwa-ios-card img { width: 64px; height: 64px; border-radius: 16px; }
.snpwa-ios-card h3 { margin: 12px 0 10px; font-size: 18px; }
.snpwa-ios-card ol { margin: 0 0 12px; padding-left: 22px; text-align: left; line-height: 1.6; font-size: 14px; }
.snpwa-ios-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.snpwa-ios-card .btn { width: 100%; padding: 12px; }
.snpwa-ios-share {
    display: inline-block; width: 14px; height: 17px; vertical-align: -3px;
    border: 2px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; position: relative; margin: 0 2px;
}
.snpwa-ios-share::before { content: ''; position: absolute; left: 50%; top: -7px; width: 2px; height: 12px; margin-left: -1px; background: currentColor; }
.snpwa-ios-share::after  { content: ''; position: absolute; left: 50%; top: -7px; width: 6px; height: 6px; margin-left: -4px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }

html.theme-dark .snpwa-banner,
html.theme-dark .snpwa-ios-card { background: #1e293b; border-color: rgba(148, 163, 184, .2); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }

/* Установленное приложение: отступ под «чёлку» iPhone */
@media (display-mode: standalone) {
    body { -webkit-tap-highlight-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .snpwa-banner, .snpwa-ios { transition: none; }
}

/* 1.3.63: приглашение в «Дурака» — та же плашка, аватар круглый */
.sndk-pop img { border-radius: 50%; object-fit: cover; }
.sndk-pop .btn { padding: 9px 12px; }
@media (max-width: 420px) {
    .sndk-pop { flex-wrap: wrap; }
    .sndk-pop .snpwa-banner-text { flex-basis: calc(100% - 100px); }
    .sndk-pop .sndk-play, .sndk-pop .sndk-no { flex: 1; }
}
