/* ============================================================
   СТАТУСЫ ПРИСУТСТВИЯ И КНОПКА «ПОДЕЛИТЬСЯ»
   Профиль пользователя, чат, карточка объявления.
   ============================================================ */

/* ---------- Индикатор онлайн / был(а) ---------- */

.presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 550;
    line-height: 1.2;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
}

.presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: none;
    background: currentColor;
}

.presence.is-online {
    color: #1d7a3e;
    background: #e8f6ed;
}

.presence.is-online .presence-dot {
    background: #22a45a;
    box-shadow: 0 0 0 3px rgba(34, 164, 90, .18);
    animation: presence-pulse 2s ease-in-out infinite;
}

.presence.is-offline {
    color: #736b62;
    background: #f1ede8;
}

.presence.is-offline .presence-dot {
    background: #b3aaa0;
}

@keyframes presence-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 164, 90, .18); }
    50%      { box-shadow: 0 0 0 5px rgba(34, 164, 90, .07); }
}

/* В заголовке профиля статус стоит рядом с именем */
.profile-info h1 .presence {
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: 3px;
}

/* ---------- «Поделиться ссылкой» ---------- */

.profile-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.profile-url {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: #43566b;
    background: #f4f6f9;
    border: 1px solid #e3e8ee;
    border-radius: 7px;
    padding: 4px 9px;
    word-break: break-all;
}

.profile-share .btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

/* ---------- Статус в шапке чата ---------- */

.chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chat-head .presence {
    font-size: 12px;
    padding: 2px 8px 2px 6px;
}

.chat-head .presence-dot {
    width: 6px;
    height: 6px;
}

.chat-head .presence.is-online {
    background: #e8f6ed;
}

/* ---------- Мобильные ---------- */

@media (max-width: 640px) {
    .profile-info h1 .presence {
        display: inline-flex;
        margin-left: 0;
        margin-top: 6px;
        vertical-align: baseline;
    }

    .profile-share {
        gap: 7px;
    }

    .profile-url {
        font-size: 11.5px;
        width: 100%;
    }
}
