/* ============================================================
   SocialNet — стили дополнительных функций
   ============================================================ */

/* Бейдж на иконке заявок в друзья */
.header-requests { position: relative; }

/* Кнопки малого размера */
.btn.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn.btn-danger { color: #dc2626; border-color: #fecaca; }

/* Композер: эмодзи + статус черновика */
.composer-actions .js-emoji-toggle { font-size: 16px; padding: 6px 10px; }
.composer-draft-status { flex: 1; font-size: 12px; color: var(--muted); }

/* Новые кнопки под постом */
.action-bookmark, .action-pin { opacity: .55; transition: opacity .15s, transform .15s; }
.action-bookmark:hover, .action-pin:hover { opacity: 1; }
.action-bookmark.active, .action-pin.active { opacity: 1; transform: scale(1.12); }
.action-bookmark.loading { pointer-events: none; opacity: .3; }
.js-show-likers { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Хэштеги и упоминания */
.sn-hashtag, .sn-mention { color: var(--primary); text-decoration: none; font-weight: 500; }
.sn-hashtag:hover, .sn-mention:hover { text-decoration: underline; }

/* Закреплённая запись */
.pinned-post-wrap {
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 20px;
}
.pinned-post-label { font-size: 13px; font-weight: 600; color: var(--primary); padding: 6px 12px 2px; }
.pinned-post-wrap .post-card { margin-bottom: 0; box-shadow: none; }

/* «Показать ещё» */
.feed-load-more-wrap { margin: 16px 0 32px; }
.btn.btn-block { display: block; width: 100%; text-align: center; }

/* Чат: статусы, «печатает», блокировка */
.chat-read-status { margin-left: 4px; font-size: 11px; color: var(--muted); letter-spacing: -2px; }
.chat-read-status.is-read { color: var(--primary); }
.chat-typing {
    padding: 4px 16px 6px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-typing-dots { display: inline-flex; gap: 3px; }
.chat-typing-dots i {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--muted);
    animation: sn-typing 1.2s infinite ease-in-out;
}
.chat-typing-dots i:nth-child(2) { animation-delay: .15s; }
.chat-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sn-typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-blocked-notice {
    padding: 14px 16px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 14px;
}

/* Индикатор «в сети» */
.online-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px var(--card);
    vertical-align: middle;
    margin-right: 4px;
}

/* Виджеты правой колонки */
.sn-widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}
.sn-widget .widget-title { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.sn-widget-count {
    margin-left: auto;
    background: var(--bg);
    color: var(--muted);
    font-size: 12px;
    border-radius: 10px;
    padding: 1px 8px;
}
.sn-widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sn-widget-list li { display: flex; align-items: center; gap: 10px; }
.sn-widget-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sn-widget-list img { border-radius: 50%; display: block; }
.sn-widget-name {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sn-widget-list small { color: var(--muted); font-size: 12px; }
.sn-birthdays li.is-today .sn-widget-name { color: #db2777; }

.sn-online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.sn-online-item { position: relative; display: block; }
.sn-online-item img { border-radius: 50%; width: 44px; height: 44px; object-fit: cover; display: block; }
.sn-online-item .online-dot { position: absolute; right: 0; bottom: 2px; margin: 0; }

/* Настройки приватности / чёрный список */
.blocked-list { display: flex; flex-direction: column; gap: 8px; }
.blocked-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-weight: 400 !important;
    font-size: 14px;
}
.blocked-item img { border-radius: 50%; }
.blocked-item span { flex: 1; }
.profile-bio { white-space: normal; line-height: 1.5; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }

/* Модальное окно */
.sn-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.sn-modal {
    background: var(--card);
    color: var(--text);
    width: 100%; max-width: 380px; max-height: 80vh;
    border-radius: 16px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.sn-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; font-weight: 600;
    border-bottom: 1px solid var(--border);
}
.sn-modal-close { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); }
.sn-modal-body { padding: 12px 16px; overflow-y: auto; }
.sn-modal-loading { color: var(--muted); text-align: center; padding: 20px; }
.sn-likers { list-style: none; margin: 0; padding: 0; }
.sn-likers a {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0;
    text-decoration: none;
    color: var(--text);
}
.sn-likers img { border-radius: 50%; }

/* Эмодзи-панель */
.sn-emoji-panel {
    position: absolute;
    z-index: 10001;
    width: 300px; max-width: calc(100vw - 16px);
    max-height: 220px; overflow-y: auto;
    display: grid; grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.sn-emoji {
    background: none; border: 0;
    font-size: 20px; line-height: 1;
    padding: 5px 0;
    border-radius: 8px;
    cursor: pointer;
}
.sn-emoji:hover { background: var(--bg); }

/* Тост */
.sn-toast {
    position: fixed;
    left: 50%; bottom: 24px;
    transform: translate(-50%, 20px);
    background: #111827; color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 10002;
    opacity: 0;
    transition: all .25s ease;
    pointer-events: none;
}
.sn-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Тёмная тема */
html.theme-dark .composer-file-btn,
html.theme-dark .btn.btn-sm { background: var(--card); }
html.theme-dark .btn.btn-danger { border-color: #7f1d1d; color: #fca5a5; }
html.theme-dark .sn-toast { background: #f1f5f9; color: #0f172a; }
