/* assets/github-preview.css — всплывашка живой проверки GitHub-ника (логика: assets/github-preview.js). Signal-тема
   кабинета. Позицию (fixed, справа от поля / под полем) выставляет JS замером места; здесь только вид. */
.ghp {
  position: fixed;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  background: #17092b;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink, #e6edf3);
  animation: ghp-in 0.16s ease;
}
.ghp[hidden] { display: none; }
@keyframes ghp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* GitHub login is at most 39 characters. A full-card empty field looked like a free-form essay.
   max-width still lets it fill narrow phones and survives later input{width:100%} rules. */
input[data-gh-preview] {
  max-width: 420px;
}

/* ФОТО — ОСНОВНОЙ ЭЛЕМЕНТ (решение владельца 2026-08-08): было 48px, стало как у Discord и в
   карточках. GitHub и Discord обязаны выглядеть ОДИНАКОВО — человек не должен гадать, почему
   в одном поле лицо крупное, а в соседнем мелкое. */
.ghp-av {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}
.ghp-info { min-width: 0; }
.ghp-ok { color: #3fb950; font-weight: 800; font-size: 0.78rem; }
.ghp-login {
  display: block;
  font-weight: 800;
  color: var(--cyan, #3b5bff);
  text-decoration: none;
  margin: 2px 0;
  word-break: break-all;
}
.ghp-login:hover { text-decoration: underline; }
.ghp-name { color: var(--muted, #8b949e); font-size: 0.78rem; }
.ghp-use {
  margin-top: 8px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--cyan, #3b5bff), var(--pink, #ffb020));
  color: #0e1116;
}
.ghp-txt { min-width: 0; }
.ghp-muted { color: var(--muted, #8b949e); }

/* «Нет такого аккаунта» — красная рамка + значок. */
.ghp-notfound { border-color: rgba(255, 107, 107, 0.6); }
.ghp-notfound .ghp-x { color: #ff6b6b; font-weight: 900; flex: 0 0 auto; }
.ghp-notfound strong { color: #ff9a9a; }

/* Спиннер «проверяю…». */
.ghp-spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--cyan, #3b5bff);
  display: inline-block;
  flex: 0 0 auto;
  margin-top: 2px;
  animation: ghp-spin 0.7s linear infinite;
}
@keyframes ghp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ghp { animation: none; }
  .ghp-spin { animation-duration: 1.6s; }
}

/* Аватар «подключённого» аккаунта, втянутый в кабинет (server-render в шаге ③ + правки клиента). */
.gh-account-av { border-radius: 50%; object-fit: cover; border: 1px solid var(--line, rgba(255, 255, 255, 0.14)); vertical-align: middle; }
.gh-account-av--inline { margin-left: 10px; }
/* Server-render аватара в шаге ③ «GitHub connected» — слева от текста. */
.nstep-desc > .gh-account-av { float: left; margin: 1px 12px 4px 0; width: 84px; height: 84px; }
/* Поле с подтверждённым аккаунтом — зелёная рамка. */
.ghp-verified { border-color: rgba(63, 185, 80, 0.6) !important; }
