/* Пригласить друга (static/invite.js): страница #/invite, окно для пришедшего по ссылке, строка на главной */

.inv-kicker { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }

/* ---------- страница ---------- */
.inv-page { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; }
.inv-top {
  position: relative; overflow: hidden; padding: 32px 28px 28px; border-radius: 22px; color: #ffffff;
  background:
    radial-gradient(70% 120% at 85% 0, rgba(164, 44, 170, .85), transparent 72%),
    radial-gradient(80% 140% at 10% 0, rgba(206, 66, 36, .95), transparent 74%),
    radial-gradient(60% 90% at 60% 120%, rgba(249, 138, 60, .35), transparent 70%), var(--surface);
}
.inv-top::after { content: ""; position: absolute; inset: 0; background: var(--grain, none); opacity: .2; mix-blend-mode: overlay; pointer-events: none; }
.inv-top > * { position: relative; z-index: 1; }
.inv-top h1 { margin: 10px 0 8px; font-size: clamp(28px, 4.4vw, 40px); text-wrap: balance; }
.inv-lead { max-width: 600px; margin: 0; font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, .86); text-wrap: pretty; }

.inv-link { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.inv-link-field {
  flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border-radius: 999px; background: rgba(0, 0, 0, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.inv-link-ic { display: grid; color: rgba(255, 255, 255, .7); }
.inv-link-ic svg { width: 16px; height: 16px; }
.inv-link-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none;
  color: #ffffff; font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; text-overflow: ellipsis;
}
.inv-link-field:focus-within { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.inv-link-acts { display: flex; gap: 10px; }
.inv-link-acts .btn { height: 44px; padding: 0 18px; gap: 8px; }
.inv-link-acts .btn svg { width: 16px; height: 16px; }
.inv-link-acts .btn:not(.primary) { background: rgba(0, 0, 0, .3); color: #ffffff; }
.inv-link-acts .btn:not(.primary):hover { background: rgba(0, 0, 0, .45); }
.inv-link-acts .btn.done { background: var(--ok); color: var(--ink); }

.inv-guest { margin-top: 22px; display: grid; gap: 12px; }
.inv-guest p { margin: 0; color: rgba(255, 255, 255, .86); }

.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inv-step { display: grid; align-content: start; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); }
.inv-step b { font-size: 15px; font-weight: 600; }
.inv-step .sub { font-size: 14px; line-height: 1.4; }
.inv-step-ic { position: relative; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.inv-step-ic svg { width: 20px; height: 20px; }
.inv-step-ic i {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--aura); color: #ffffff; font-style: normal; font-size: 11px; font-weight: 700;
}

.inv-friends { display: grid; gap: 16px; }
.inv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inv-stats div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.inv-stats b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.inv-stats span { font-size: 13px; color: var(--muted); }
.inv-friend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.inv-friend { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; border-top: 1px solid var(--border); }
.inv-friend:first-child { border-top: 0; }
.inv-friend .avatar { flex: none; }
.inv-friend-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.inv-friend.gone .inv-friend-name { color: var(--faint); font-weight: 400; }
.inv-friend .chip { flex: none; }
.inv-empty { margin: 0; text-wrap: pretty; }

.inv-rules { padding: 4px 20px; border-radius: var(--radius); background: var(--surface); }
.inv-rules summary { padding: 14px 0; cursor: pointer; font-weight: 600; }
.inv-rules ul { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- карточка на странице аккаунта ---------- */
.card.inv-acc {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: radial-gradient(90% 160% at 0 0, rgba(240, 81, 106, .22), transparent 70%), var(--surface);
}
.inv-acc .grow { flex: 1 1 240px; min-width: 0; }
.inv-acc b { display: block; margin-bottom: 2px; font-size: 16px; font-weight: 600; }
.inv-acc-ic, .inv-strip-ic, .inv-hello-ic { flex: none; display: grid; place-items: center; background: var(--aura); color: #ffffff; }
.inv-acc-ic { width: 44px; height: 44px; border-radius: 14px; }
.inv-acc-ic svg { width: 22px; height: 22px; }

/* ---------- гость пришёл по ссылке ---------- */
.inv-strip {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 12px 10px 10px; border-radius: 16px;
  background:
    radial-gradient(120% 150% at 0 0, rgba(240, 81, 106, .45), transparent 70%),
    radial-gradient(120% 150% at 100% 100%, rgba(164, 44, 170, .4), transparent 70%), var(--surface-2);
}
.inv-strip-ic { width: 36px; height: 36px; border-radius: 11px; }
.inv-strip-ic svg { width: 20px; height: 20px; }
.inv-strip-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.inv-strip-text b { font-size: 14px; font-weight: 600; }
.inv-strip-text small { font-size: 12px; color: rgba(255, 255, 255, .72); }
.inv-strip .btn { flex: none; }

.modal .card.inv-card { width: min(420px, 100%); overflow: hidden; }
.pay-card > .pay-close + .inv-hello { margin-top: -20px; }
.inv-hello {
  position: relative; margin: -20px -20px 0; padding: 32px 24px 22px; color: #ffffff;
  background:
    radial-gradient(70% 120% at 82% 0, rgba(164, 44, 170, .85), transparent 74%),
    radial-gradient(80% 130% at 18% 0, rgba(206, 66, 36, .95), transparent 76%), var(--surface);
}
.inv-hello-ic { width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.inv-hello-ic svg { width: 28px; height: 28px; }
.inv-hello h2 { margin: 6px 32px 6px 0; font-size: 26px; font-weight: 500; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.inv-hello p { margin: 0; color: rgba(255, 255, 255, .86); }
.inv-hello-list { margin-bottom: 18px; }
.inv-hello-list svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
@media (prefers-reduced-motion: no-preference) {
  .inv-hello-ic, .inv-strip-ic { animation: inv-nudge 3.6s ease-in-out infinite; }
}
@keyframes inv-nudge {
  0%, 80%, 100% { transform: none; }
  84% { transform: rotate(-10deg) scale(1.05); }
  88% { transform: rotate(8deg) scale(1.05); }
  92% { transform: rotate(-4deg); }
  96% { transform: rotate(2deg); }
}

/* строка в окне регистрации */
.inv-note {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.35;
}
.inv-note svg { flex: none; width: 18px; height: 18px; color: var(--accent-text); }

@media (max-width: 700px) {
  .inv-top { padding: 24px 18px 20px; border-radius: 18px; }
  .inv-link-acts { flex: 1 1 100%; }
  .inv-link-acts .btn { flex: 1; }
  .inv-steps { grid-template-columns: 1fr; }
  .inv-step { grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 2px; padding: 14px; }
  .inv-step-ic { grid-row: span 2; margin: 0; }
  .inv-stats { gap: 8px; }
  .inv-stats div { padding: 12px; }
  .inv-stats b { font-size: 22px; }
  .inv-friend { flex-wrap: wrap; row-gap: 4px; }
  .inv-friend-name { flex: 1 1 110px; } /* длинная метка «Подписка оформлена…» уходит на вторую строку, а не съедает имя */
  .inv-friend .chip { margin-left: auto; }
  .inv-stats span { font-size: 12px; }
  .inv-strip-text small { display: none; }
}

/* шапка телефона: пока подарок не открыт (а после регистрации по ссылке он ждёт почти всегда), его кнопка
   выталкивала переключатель языка за край экрана — номер версии у логотипа на это время прячем */
@media (max-width: 440px) {
  .sidebar:has(.gift-side) .brand .ver { display: none; }
}
