/* =====================================================================
   synapse-fixes.css — правки оформления, которых не хватало в style.css и theme.css.
   Подключается после theme.css на странице входа и в чате.
   ===================================================================== */

/* ---------- кнопка «вниз» в чате (раньше без стилей) ----------
   Позиционируется относительно .chat-main, который уже position: relative (ПК) и absolute (телефон). */

.scroll-bottom-btn {
    position: absolute;
    right: 18px;
    bottom: 104px;
    z-index: 20;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.12));
    background: var(--bg-2, #171b27);
    color: var(--text-main, #e9ecf4);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px) scale(0.92);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.scroll-bottom-btn svg { display: block; }
.scroll-bottom-btn.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-bottom-btn:hover { background: var(--accent-soft, rgba(138, 166, 255, 0.14)); }
.scroll-bottom-btn:focus-visible { outline: 2px solid var(--accent, #8aa6ff); outline-offset: 2px; }

/* ---------- всплывающая ошибка (например, неверный старый пароль) ---------- */

.app-flash {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: min(92vw, 460px);
    padding: 11px 12px 11px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 114, 134, 0.45);
    background: rgba(255, 114, 134, 0.14);
    color: var(--danger, #ff7286);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.app-flash-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.app-flash-close:hover { background: rgba(255, 114, 134, 0.18); }

/* ---------- страница входа: подпись к полю аватарки ---------- */

.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field-title { color: var(--text-dim, #8a93a8); font-size: 12.5px; font-weight: 500; }
