Spaces:
Runtime error
Runtime error
| /* SalGram — минималистичная тёмно-серая тема. */ | |
| :root { | |
| --bg: #161618; /* фон страницы */ | |
| --card: #1f1f23; /* фон карточек и панелей */ | |
| --field: #29292e; /* поля ввода */ | |
| --border: #3a3a41; | |
| --text: #e8e8ea; | |
| --muted: #8b8b93; | |
| --accent: #44444c; /* брендовый тёмно-серый */ | |
| --accent-hover: #55555e; | |
| --error: #e07070; | |
| --danger: #b05050; | |
| --link: #8db6de; /* @юзернеймы, подписи закрепов, авторы в группах */ | |
| --field-focus: #2e2e34; /* фон поля ввода в фокусе */ | |
| --time-mine: #c5c5cc; /* время в своих сообщениях */ | |
| --wallpaper-dim: rgba(0, 0, 0, .35); /* затемнение обоев для читаемости */ | |
| --radius: 12px; | |
| } | |
| /* ===== Цветовые темы (data-theme на <html>, выбор в «Оформлении») ===== */ | |
| :root[data-theme="light"] { | |
| --bg: #f1f1f4; | |
| --card: #ffffff; | |
| --field: #e9e9ee; | |
| --border: #d7d7de; | |
| --text: #1d1d21; | |
| --muted: #73737e; | |
| --accent: #d3d3dc; | |
| --accent-hover: #c0c0cc; | |
| --error: #c4453f; | |
| --danger: #b05050; | |
| --link: #3a6ea8; | |
| --field-focus: #ffffff; | |
| --time-mine: #5b5b66; | |
| --wallpaper-dim: rgba(255, 255, 255, .25); | |
| } | |
| :root[data-theme="oled"] { | |
| --bg: #000000; | |
| --card: #0e0e10; | |
| --field: #1b1b1e; | |
| --border: #2c2c30; | |
| --accent: #2e2e36; | |
| --accent-hover: #3d3d47; | |
| --field-focus: #232327; | |
| } | |
| :root[data-theme="blue"] { | |
| --bg: #0e1621; | |
| --card: #17212b; | |
| --field: #242f3d; | |
| --border: #31404e; | |
| --muted: #7f91a4; | |
| --accent: #2b5278; | |
| --accent-hover: #36648f; | |
| --link: #6ab2f2; | |
| --field-focus: #2b3847; | |
| --time-mine: #9fb9d4; | |
| } | |
| * { box-sizing: border-box; margin: 0; } | |
| /* Атрибут hidden должен побеждать любые display-правила (.modal, .form и т.д.) */ | |
| [hidden] { display: none ; } | |
| body { | |
| font-family: "Segoe UI", system-ui, sans-serif; | |
| background: var(--bg); | |
| color: var(--text); | |
| } | |
| .muted { color: var(--muted); } | |
| .empty { color: var(--muted); font-size: 14px; text-align: center; padding: 16px; list-style: none; } | |
| .stub { color: var(--muted); font-size: 20px; } | |
| /* ===== Экран авторизации ===== */ | |
| .screen { | |
| min-height: 100vh; | |
| min-height: 100dvh; /* мобильные браузеры: высота без учёта панелей UI */ | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 16px; | |
| } | |
| .card { | |
| width: 100%; | |
| max-width: 380px; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 36px 32px; | |
| text-align: center; | |
| animation: fade-up .5s ease both; | |
| } | |
| .logo { font-size: 28px; letter-spacing: 1px; } | |
| .tagline { color: var(--muted); font-size: 14px; margin: 6px 0 24px; } | |
| .form { display: flex; flex-direction: column; gap: 12px; } | |
| .tos-row { | |
| display: flex; | |
| gap: 8px; | |
| align-items: center; | |
| font-size: 13px; | |
| color: var(--muted); | |
| text-align: left; | |
| } | |
| .tos-row input { accent-color: var(--accent-hover); } | |
| /* ===== Поля ввода ===== */ | |
| input:not([type=checkbox]), textarea, select { | |
| background: var(--field); | |
| border: 1px solid transparent; | |
| border-radius: var(--radius); | |
| padding: 12px 14px; | |
| font: inherit; | |
| font-size: 15px; | |
| color: var(--text); | |
| transition: border-color .2s, background .2s; | |
| } | |
| input::placeholder, textarea::placeholder { color: var(--muted); } | |
| input:focus, textarea:focus, select:focus { | |
| outline: none; | |
| border-color: var(--accent-hover); | |
| background: var(--field-focus); | |
| } | |
| textarea { resize: vertical; min-height: 90px; } | |
| /* ===== Кнопки ===== */ | |
| button { font: inherit; cursor: pointer; } | |
| .primary { | |
| background: var(--accent); | |
| color: var(--text); | |
| border: none; | |
| border-radius: var(--radius); | |
| padding: 12px; | |
| font-size: 15px; | |
| transition: background .2s, transform .1s; | |
| } | |
| .primary:hover { background: var(--accent-hover); } | |
| .primary:active { transform: scale(.98); } | |
| .link { | |
| background: none; | |
| border: none; | |
| padding: 0; | |
| color: var(--muted); | |
| font-size: 14px; | |
| text-decoration: underline; | |
| transition: color .2s; | |
| } | |
| .link:hover { color: var(--text); } | |
| .icon-btn { | |
| background: none; | |
| border: none; | |
| padding: 4px; | |
| color: var(--muted); | |
| display: inline-flex; | |
| border-radius: 8px; | |
| transition: color .2s, background .2s; | |
| } | |
| .icon-btn:hover { color: var(--text); background: var(--field); } | |
| .icon-btn svg { width: 16px; height: 16px; } | |
| .error { color: var(--error); font-size: 13px; animation: shake .3s ease; } | |
| /* ===== Макет мессенджера ===== */ | |
| .app-layout { display: flex; height: 100vh; height: 100dvh; } | |
| .sidebar { | |
| width: 300px; | |
| flex-shrink: 0; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--card); | |
| border-right: 1px solid var(--border); | |
| } | |
| .sidebar-head { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 16px 16px 10px; | |
| font-size: 18px; | |
| font-weight: 600; | |
| letter-spacing: 1px; | |
| } | |
| .sidebar-head .icon-btn svg { width: 20px; height: 20px; } | |
| .chat-list { flex: 1; overflow-y: auto; } | |
| /* --- Поиск --- */ | |
| .search-box { | |
| padding: 0 12px 10px; | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .search-box input { padding: 9px 12px; font-size: 14px; width: 100%; } | |
| .search-opts { display: flex; gap: 8px; } | |
| .search-opts select { flex: 1; padding: 7px 8px; font-size: 13px; } | |
| /* --- Строки списка чатов и поисковой выдачи --- */ | |
| .chat-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| width: 100%; | |
| padding: 10px 12px; | |
| background: none; | |
| border: none; | |
| color: var(--text); | |
| text-align: left; | |
| transition: background .15s; | |
| } | |
| .chat-row:hover, .chat-row.active { background: var(--field); } | |
| .chat-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } | |
| .chat-row-info span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| .chat-row-info small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| .chat-row time { color: var(--muted); font-size: 11px; flex-shrink: 0; } | |
| /* Кружок-аватарка: первая буква имени либо картинка поверх */ | |
| .ava { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background: var(--accent); | |
| color: var(--text); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 16px; | |
| flex-shrink: 0; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .ava img, .ava video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } | |
| /* Нижняя панель: настройки / профиль / выход */ | |
| .toolbar { | |
| display: flex; | |
| border-top: 1px solid var(--border); | |
| background: var(--card); | |
| } | |
| .toolbar button { | |
| flex: 1; | |
| padding: 14px 0; | |
| background: none; | |
| border: none; | |
| color: var(--muted); | |
| display: flex; | |
| justify-content: center; | |
| transition: color .2s, background .2s; | |
| } | |
| .toolbar button:hover, .toolbar button.active { color: var(--text); background: var(--field); } | |
| .toolbar svg { width: 22px; height: 22px; } | |
| .main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; } | |
| .view { flex: 1; padding: 32px; animation: fade-up .3s ease both; } | |
| .view-center { display: flex; align-items: center; justify-content: center; } | |
| .panel { max-width: 460px; margin: 0 auto; width: 100%; } | |
| /* ===== Чат ===== */ | |
| /* overflow: hidden + min-height: 0 не дают чату растягиваться по контенту: | |
| скроллится только .messages, поэтому поле ввода всегда закреплено снизу, | |
| а обои (.chat-bg) остаются размером с видимую область, а не со всю переписку. */ | |
| .view-chat { | |
| padding: 0; | |
| display: flex; | |
| flex-direction: column; | |
| position: relative; | |
| overflow: hidden; | |
| min-height: 0; | |
| } | |
| /* Обои чата: фото (фоном) или видео, с затемнением для читаемости */ | |
| .chat-bg { | |
| position: absolute; | |
| inset: 0; | |
| z-index: 0; | |
| background-size: cover; | |
| background-position: center; | |
| } | |
| .chat-bg video { width: 100%; height: 100%; object-fit: cover; } | |
| .chat-bg.has-wp::after { content: ""; position: absolute; inset: 0; background: var(--wallpaper-dim); } | |
| .view-chat > :not(.chat-bg) { position: relative; z-index: 1; } | |
| .chat-head { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| padding: 10px 16px; | |
| border-bottom: 1px solid var(--border); | |
| background: var(--card); | |
| cursor: pointer; | |
| } | |
| .chat-head-info { display: flex; flex-direction: column; gap: 1px; } | |
| .chat-head-info span:first-child { font-size: 15px; font-weight: 600; } | |
| .small { font-size: 12px; } | |
| .messages { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 16px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .msg { | |
| max-width: 65%; | |
| align-self: flex-start; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| border-bottom-left-radius: 4px; | |
| padding: 8px 12px 6px; | |
| animation: fade-up .2s ease both; | |
| position: relative; | |
| } | |
| /* Аватарка автора в группе — слева от пузыря, выровнена по нижнему краю */ | |
| .msg.has-ava { margin-left: 42px; } | |
| .msg-ava { | |
| position: absolute; | |
| left: -42px; | |
| bottom: 0; | |
| width: 32px; | |
| height: 32px; | |
| font-size: 13px; | |
| cursor: pointer; | |
| } | |
| .msg.mine { | |
| align-self: flex-end; | |
| background: var(--accent); | |
| border-color: transparent; | |
| border-bottom-left-radius: var(--radius); | |
| border-bottom-right-radius: 4px; | |
| } | |
| .msg p { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; } | |
| .msg img { max-width: 320px; max-height: 320px; border-radius: 8px; display: block; cursor: pointer; } | |
| .msg time { display: block; text-align: right; font-size: 10px; color: var(--muted); margin-top: 3px; } | |
| .msg.mine time { color: var(--time-mine); } | |
| /* Автор сообщения в группе (кликабельно — открывает профиль) */ | |
| .msg-author { | |
| display: block; | |
| color: var(--link); | |
| font-size: 12px; | |
| font-weight: 600; | |
| margin-bottom: 2px; | |
| cursor: pointer; | |
| } | |
| .msg-author:hover { text-decoration: underline; } | |
| .msg-form { | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 10px 12px; | |
| border-top: 1px solid var(--border); | |
| background: var(--card); | |
| transition: background .2s; | |
| } | |
| .msg-form.drag { background: var(--field); } | |
| .msg-form input[type=text], #msg-input { flex: 1; padding: 10px 14px; font-size: 14px; } | |
| .icon-btn.big { padding: 8px; } | |
| .icon-btn.big svg { width: 20px; height: 20px; } | |
| /* Поле ввода сообщения (contenteditable: поддерживает форматирование) */ | |
| .msg-input { | |
| position: relative; | |
| background: var(--field); | |
| border: 1px solid transparent; | |
| border-radius: var(--radius); | |
| color: var(--text); | |
| line-height: 1.4; | |
| max-height: 140px; | |
| overflow-y: auto; | |
| white-space: pre-wrap; | |
| word-break: break-word; | |
| outline: none; | |
| cursor: text; | |
| transition: border-color .2s, background .2s; | |
| } | |
| .msg-input:focus { border-color: var(--accent-hover); background: var(--field-focus); } | |
| .msg-input.is-empty::before { | |
| content: attr(data-placeholder); | |
| position: absolute; | |
| color: var(--muted); | |
| pointer-events: none; | |
| } | |
| /* Стили форматирования текста (в сообщениях и в поле ввода) */ | |
| .f-b { font-weight: 700; } | |
| .f-i { font-style: italic; } | |
| .f-u { text-decoration: underline; } | |
| .f-s { text-decoration: line-through; } | |
| .f-u.f-s, .f-s .f-u, .f-u .f-s { text-decoration: underline line-through; } | |
| .f-code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; | |
| background: rgba(127,127,127,.18); border-radius: 4px; padding: 0 3px; } | |
| .f-quote { display: inline-block; border-left: 3px solid var(--accent-hover); | |
| padding-left: 8px; margin: 1px 0; } | |
| /* Абсолютные размеры — чтобы вложенные/перекрывающие пометки не складывались, | |
| а «Обычный» сбрасывал размер обратно к базовому (14px). */ | |
| .f-size[data-size=huge] { font-size: 26px; } | |
| .f-size[data-size=big] { font-size: 19px; } | |
| .f-size[data-size=normal] { font-size: 14px; } | |
| .f-size[data-size=small] { font-size: 11px; } | |
| .f-size[data-size=tiny] { font-size: 9px; } | |
| /* Разделитель/заголовок в контекстном меню форматирования */ | |
| .msg-menu-sep { | |
| font-size: 11px; | |
| text-transform: uppercase; | |
| letter-spacing: .04em; | |
| color: var(--muted); | |
| padding: 6px 12px 2px; | |
| border-top: 1px solid var(--border); | |
| margin-top: 2px; | |
| } | |
| /* Панель ответа над полем ввода */ | |
| .reply-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 8px 12px; | |
| border-top: 1px solid var(--border); | |
| background: var(--card); | |
| } | |
| .reply-bar-icon { width: 18px; height: 18px; color: var(--accent-hover); flex-shrink: 0; } | |
| .reply-bar-info { flex: 1; min-width: 0; border-left: 2px solid var(--accent-hover); padding-left: 8px; } | |
| .reply-bar-info small { display: block; color: var(--link); font-weight: 600; font-size: 12px; } | |
| .reply-bar-info span { display: block; color: var(--muted); font-size: 13px; | |
| white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| /* Галочки доставки/прочтения у своих сообщений */ | |
| .ticks { display: inline-block; margin-left: 4px; vertical-align: baseline; } | |
| .ticks::after { content: "✓"; } | |
| .ticks.read::after { content: "✓✓"; letter-spacing: -3px; padding-right: 3px; } | |
| /* Кнопка-сворачивание списка контактов */ | |
| .contacts-toggle { | |
| display: flex; align-items: center; gap: 4px; | |
| background: none; border: none; cursor: pointer; color: var(--text); padding: 0; | |
| } | |
| .contacts-toggle h3 { margin: 0; } | |
| .contacts-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; } | |
| .contacts-toggle.open .contacts-chevron { transform: rotate(90deg); } | |
| .chat-blocked { | |
| padding: 16px; | |
| text-align: center; | |
| color: var(--muted); | |
| font-size: 14px; | |
| border-top: 1px solid var(--border); | |
| background: var(--card); | |
| } | |
| .chat-error { padding: 6px 16px; text-align: center; } | |
| /* ===== Профиль другого пользователя ===== */ | |
| .avatar.readonly { cursor: default; } | |
| .avatar.readonly:hover { border-color: var(--border); transform: none; } | |
| .profile-actions { display: flex; gap: 10px; margin: 6px 0 2px; } | |
| .small-btn { padding: 8px 14px; font-size: 13px; } | |
| .danger-btn { color: var(--error); } | |
| .write-btn { margin: 10px 0 6px; padding: 10px 32px; } | |
| .hint { color: var(--muted); font-size: 12px; line-height: 1.5; } | |
| .num { width: 90px; text-align: center; } | |
| .profile-actions.bottom { margin-top: 24px; } | |
| .danger-link { color: var(--error); } | |
| /* Галочка администратора */ | |
| .badge { width: 15px; height: 15px; color: #6da8dc; margin-left: 5px; vertical-align: -2px; } | |
| /* Кликабельные @юзернеймы */ | |
| .mention { color: var(--link); cursor: pointer; } | |
| .mention:hover { text-decoration: underline; } | |
| /* Кликабельные ссылки в сообщениях */ | |
| .msg-link { | |
| color: var(--link); | |
| text-decoration: underline; | |
| word-break: break-all; /* длинные URL не растягивают пузырь */ | |
| } | |
| .msg-link:hover { text-decoration: none; } | |
| /* Красная надпись вместо поиска у заблокированного аккаунта */ | |
| .banned-banner { | |
| color: var(--error); | |
| font-weight: 600; | |
| font-size: 14px; | |
| text-align: center; | |
| padding: 9px 0; | |
| } | |
| /* Кнопка удаления переписки в шапке чата */ | |
| .chat-head .chat-del { margin-left: auto; } | |
| .chat-head .chat-del:hover { color: var(--error); } | |
| /* Реакции под сообщением */ | |
| .reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } | |
| .reaction-chip { | |
| background: var(--field); | |
| border: 1px solid transparent; | |
| border-radius: 10px; | |
| padding: 2px 8px; | |
| font-size: 13px; | |
| color: var(--text); | |
| transition: border-color .15s, background .15s; | |
| } | |
| .reaction-chip:hover { border-color: var(--accent-hover); } | |
| .reaction-chip.mine { border-color: var(--accent-hover); background: var(--bg); } | |
| /* Контекстное меню (ПКМ): реакции / закрепить / изменить / удалить */ | |
| .msg-menu { | |
| position: fixed; | |
| z-index: 30; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 2px; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 6px; | |
| box-shadow: 0 8px 24px rgba(0, 0, 0, .45); | |
| animation: fade-in .15s ease both; | |
| } | |
| .msg-menu-reactions { display: flex; gap: 2px; align-items: center; } | |
| .msg-menu-reactions button, .msg-menu-grid button { | |
| background: none; | |
| border: 1px solid transparent; | |
| font-size: 17px; | |
| padding: 4px 6px; | |
| border-radius: 8px; | |
| transition: background .15s, border-color .15s; | |
| } | |
| .msg-menu-reactions button:hover, .msg-menu-grid button:hover { background: var(--field); } | |
| .msg-menu-reactions button.pinned, .msg-menu-grid button.pinned { | |
| border-color: var(--accent-hover); /* закреплённый эмодзи подсвечен */ | |
| } | |
| .msg-menu-reactions .more { | |
| color: var(--muted); | |
| font-size: 14px; | |
| padding: 4px 8px; | |
| } | |
| .msg-menu-reactions .more:hover { color: var(--text); } | |
| /* Полная палитра реакций (раскрывается кнопкой «⌄») */ | |
| .msg-menu-grid { | |
| display: grid; | |
| grid-template-columns: repeat(8, 1fr); | |
| gap: 2px; | |
| max-width: 296px; | |
| max-height: 190px; | |
| overflow-y: auto; | |
| border-top: 1px solid var(--border); | |
| margin-top: 4px; | |
| padding-top: 6px; | |
| } | |
| .msg-menu-item { | |
| background: none; | |
| border: none; | |
| color: var(--text); | |
| font-size: 14px; | |
| text-align: left; | |
| padding: 8px 10px; | |
| border-radius: 8px; | |
| transition: background .15s; | |
| } | |
| .msg-menu-item:hover { background: var(--field); } | |
| .msg-menu-item.danger { color: var(--error); } | |
| /* Плавающая панель форматирования над выделенным текстом в поле ввода */ | |
| .fmt-bar { | |
| position: fixed; | |
| z-index: 35; | |
| display: flex; | |
| gap: 2px; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: 10px; | |
| padding: 4px; | |
| box-shadow: 0 8px 24px rgba(0, 0, 0, .45); | |
| animation: fade-in .12s ease both; | |
| } | |
| .fmt-bar-btn { | |
| background: none; | |
| border: none; | |
| color: var(--text); | |
| font-size: 15px; | |
| line-height: 1; | |
| min-width: 30px; | |
| height: 30px; | |
| padding: 0 8px; | |
| border-radius: 7px; | |
| cursor: pointer; | |
| transition: background .15s; | |
| } | |
| .fmt-bar-btn:hover { background: var(--field); } | |
| .fmt-bar-btn svg { display: block; } | |
| .fmt-bar-clear { border-left: 1px solid var(--border); border-radius: 0 7px 7px 0; margin-left: 2px; } | |
| .fmt-bar-btn small { font-size: 10px; vertical-align: super; } | |
| .fmt-bar-btn s { text-decoration: line-through; } | |
| .fmt-bar-swatch { | |
| display: inline-block; | |
| width: 15px; | |
| height: 15px; | |
| border-radius: 50%; | |
| vertical-align: middle; | |
| background: conic-gradient(red, orange, yellow, lime, cyan, blue, magenta, red); | |
| } | |
| /* Просмотр фото внутри мессенджера (лайтбокс) */ | |
| .photo-modal { cursor: zoom-out; z-index: 40; } | |
| .photo-modal img { max-width: 92vw; max-height: 92vh; border-radius: 8px; } | |
| /* Панель закреплённого сообщения */ | |
| .pinned-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 8px 16px; | |
| background: var(--card); | |
| border-bottom: 1px solid var(--border); | |
| cursor: pointer; | |
| } | |
| .pinned-bar > svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; } | |
| .pinned-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } | |
| .pinned-info small { color: var(--link); font-size: 11px; } | |
| .pinned-info span { | |
| font-size: 13px; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| /* Подсветка сообщения при переходе из закреплённой панели */ | |
| .msg.flash { box-shadow: 0 0 0 2px var(--accent-hover); transition: box-shadow .4s; } | |
| /* Видео в сообщении */ | |
| .msg video { max-width: 320px; max-height: 320px; border-radius: 8px; display: block; } | |
| /* Карточка файла в сообщении */ | |
| .file-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 6px 4px; | |
| color: var(--text); | |
| text-decoration: none; | |
| border-radius: 8px; | |
| transition: background .15s; | |
| } | |
| .file-row:hover { background: rgba(255, 255, 255, .05); } | |
| .file-row svg { width: 26px; height: 26px; color: var(--muted); flex-shrink: 0; } | |
| .file-info { display: flex; flex-direction: column; min-width: 0; } | |
| .file-info span { | |
| font-size: 14px; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| max-width: 240px; | |
| } | |
| .file-info small { color: var(--muted); font-size: 11px; } | |
| .file-preview-btn { font-size: 13px; margin: 2px 4px; align-self: flex-start; } | |
| .file-preview { | |
| margin-top: 4px; | |
| padding: 6px 8px; | |
| background: rgba(0, 0, 0, .18); | |
| border-radius: 8px; | |
| color: var(--muted); | |
| font-size: 12px; | |
| line-height: 1.4; | |
| max-height: 90px; | |
| overflow: hidden; | |
| } | |
| /* Аудио-сообщения и голосовые */ | |
| .audio-msg { display: flex; flex-direction: column; gap: 6px; min-width: 220px; max-width: 320px; } | |
| .audio-head { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| font-size: 14px; | |
| color: var(--text); | |
| } | |
| .audio-head svg { width: 20px; height: 20px; color: var(--accent-hover); flex-shrink: 0; } | |
| .audio-head span { | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| flex: 1; | |
| } | |
| .audio-head small { color: var(--muted); font-size: 12px; flex-shrink: 0; } | |
| .audio-msg audio { width: 100%; height: 36px; } | |
| .audio-msg.voice audio { filter: saturate(0); } | |
| /* Панель записи голосового сообщения */ | |
| .rec-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 6px 8px; | |
| } | |
| .rec-bar .rec-time { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--text); } | |
| .rec-bar .rec-hint { color: var(--muted); font-size: 13px; flex: 1; } | |
| .rec-bar .rec-cancel:hover { color: #e25; } | |
| .rec-dot { | |
| width: 11px; | |
| height: 11px; | |
| border-radius: 50%; | |
| background: #e25; | |
| animation: rec-pulse 1s infinite; | |
| flex-shrink: 0; | |
| } | |
| @keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } } | |
| /* Окно предпросмотра файла (PDF) */ | |
| .preview-modal { z-index: 40; } | |
| .preview-card { | |
| width: min(900px, 94vw); | |
| height: 88vh; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| animation: fade-up .3s ease both; | |
| } | |
| .preview-head { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 10px; | |
| padding: 10px 14px; | |
| border-bottom: 1px solid var(--border); | |
| font-size: 14px; | |
| } | |
| .preview-head span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } | |
| .preview-card iframe { flex: 1; border: none; background: #fff; } | |
| /* Кнопки Забанить/Отклонить в сообщении-жалобе */ | |
| .report-actions { display: flex; gap: 8px; margin-top: 8px; } | |
| /* Всплывающее уведомление */ | |
| .toast { | |
| position: fixed; | |
| bottom: 24px; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 10px 18px; | |
| font-size: 14px; | |
| z-index: 20; | |
| animation: fade-up .25s ease both; | |
| max-width: 90vw; | |
| } | |
| /* ===== Настройки ===== */ | |
| .settings-page { display: flex; flex-direction: column; gap: 10px; } | |
| .settings-page.appear { animation: slide-in .3s ease both; } | |
| .settings-page h2 { font-size: 20px; margin-bottom: 8px; } | |
| /* Подзаголовки секций внутри раздела «Приложение» (ПК-версия) */ | |
| .settings-sub { font-size: 13px; font-weight: 600; color: var(--muted); | |
| text-transform: uppercase; letter-spacing: .4px; margin: 6px 0 -2px; } | |
| .settings-item { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 14px 16px; | |
| color: var(--text); | |
| font-size: 15px; | |
| text-align: left; | |
| transition: background .2s, border-color .2s; | |
| } | |
| .settings-item:hover { background: var(--field); border-color: var(--accent-hover); } | |
| .settings-item svg { width: 18px; height: 18px; color: var(--muted); } | |
| .settings-item.danger { color: var(--error); border-color: var(--danger); } | |
| .settings-item.danger:hover { background: rgba(176, 80, 80, .12); } | |
| .settings-back { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 4px; | |
| background: none; | |
| border: none; | |
| color: var(--muted); | |
| font-size: 14px; | |
| padding: 0; | |
| align-self: flex-start; | |
| transition: color .2s; | |
| } | |
| .settings-back:hover { color: var(--text); } | |
| .settings-back svg { width: 16px; height: 16px; } | |
| .settings-row { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 16px; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 12px 16px; | |
| font-size: 14px; | |
| } | |
| .settings-row select { padding: 8px 10px; font-size: 14px; } | |
| /* Кэш сообщений: вес + кнопка очистки в одной строке */ | |
| .cache-row { display: flex; align-items: center; gap: 14px; } | |
| /* ===== Профиль группы ===== */ | |
| .ava.big { width: 120px; height: 120px; font-size: 44px; margin-bottom: 12px; } | |
| /* Владелец группы меняет аватарку кликом по кружку */ | |
| .ava.editable { cursor: pointer; transition: box-shadow .2s; } | |
| .ava.editable:hover { box-shadow: 0 0 0 2px var(--accent-hover); } | |
| .invite-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| max-width: 100%; | |
| margin-top: 4px; | |
| } | |
| .invite-link { | |
| font-size: 13px; | |
| color: var(--muted); | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| } | |
| /* ===== Профиль ===== */ | |
| .profile { display: flex; flex-direction: column; align-items: center; gap: 6px; } | |
| .avatar { | |
| width: 120px; | |
| height: 120px; | |
| border-radius: 50%; | |
| background: var(--field); | |
| border: 1px solid var(--border); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| overflow: hidden; | |
| cursor: pointer; | |
| margin-bottom: 12px; | |
| transition: border-color .2s, transform .2s; | |
| } | |
| .avatar:hover { border-color: var(--accent-hover); transform: scale(1.03); } | |
| .avatar img, .avatar video.avatar-media { width: 100%; height: 100%; object-fit: cover; } | |
| .avatar svg { width: 36px; height: 36px; color: var(--muted); } | |
| .profile-row { display: flex; align-items: center; gap: 8px; max-width: 100%; } | |
| .profile-row h2 { font-size: 22px; } | |
| .profile-row h3 { font-size: 16px; } | |
| .desc { | |
| font-size: 14px; | |
| max-width: 360px; | |
| text-align: center; | |
| white-space: pre-wrap; | |
| word-break: break-word; | |
| } | |
| .contacts { width: 100%; margin-top: 28px; } | |
| .contacts .profile-row { justify-content: center; margin-bottom: 10px; } | |
| .contacts ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; } | |
| .contacts li { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 10px 14px; | |
| font-size: 14px; | |
| } | |
| .contacts li small { color: var(--muted); flex: 1; } | |
| /* ===== Модальные окна ===== */ | |
| .modal { | |
| position: fixed; | |
| inset: 0; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 16px; | |
| background: rgba(0, 0, 0, .6); | |
| backdrop-filter: blur(3px); | |
| animation: fade-in .25s ease both; | |
| z-index: 10; | |
| } | |
| .modal-card { | |
| width: 100%; | |
| max-width: 560px; | |
| max-height: 80vh; | |
| overflow-y: auto; | |
| background: var(--card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 28px; | |
| animation: fade-up .3s ease both; | |
| } | |
| .modal-card h2 { font-size: 18px; margin-bottom: 16px; } | |
| .modal-card ol { padding-left: 20px; display: grid; gap: 10px; } | |
| .modal-card li { font-size: 14px; line-height: 1.55; color: var(--muted); } | |
| .modal-card li b { color: var(--text); } | |
| .modal-card .primary { width: 100%; margin-top: 20px; } | |
| /* Диалоги с полями (генерируются в JS) */ | |
| .dialog { max-width: 380px; display: flex; flex-direction: column; gap: 12px; } | |
| .dialog h2 { margin-bottom: 4px; } | |
| .dialog-buttons { display: flex; justify-content: flex-end; gap: 16px; align-items: center; } | |
| .dialog .primary, .modal-card.dialog .primary { width: auto; margin-top: 0; padding: 10px 20px; } | |
| /* Пикер пользователей (добавление в группу): список контактов в диалоге */ | |
| .member-picker { list-style: none; padding: 0; margin: 0; display: flex; | |
| flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; } | |
| .member-picker li { | |
| display: flex; align-items: center; gap: 8px; | |
| background: var(--bg); border: 1px solid var(--border); | |
| border-radius: var(--radius); padding: 10px 14px; font-size: 14px; color: var(--text); | |
| } | |
| .member-picker li small { color: var(--muted); flex: 1; } | |
| .member-picker li.empty { color: var(--muted); justify-content: center; cursor: default; } | |
| /* ===== GIF ===== */ | |
| .gif-btn { font-size: 12px; font-weight: 700; letter-spacing: .5px; } | |
| .msg-gif { max-width: 320px; max-height: 320px; border-radius: 8px; display: block; cursor: pointer; } | |
| /* Панель чата с ботом @addgif (вместо поля ввода) */ | |
| .addgif-bar { padding: 12px 16px; border-top: 1px solid var(--border); } | |
| .addgif-bar .primary { width: 100%; } | |
| /* Пикер GIF: поиск + сетка превью */ | |
| .gif-picker { max-width: 520px; display: flex; flex-direction: column; gap: 12px; } | |
| .gif-picker input { width: 100%; } | |
| .gif-grid { | |
| display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); | |
| gap: 8px; max-height: 55vh; overflow-y: auto; min-height: 80px; | |
| } | |
| .gif-grid img { | |
| width: 100%; height: 120px; object-fit: cover; border-radius: 8px; | |
| cursor: pointer; background: var(--bg); transition: transform .15s; | |
| } | |
| .gif-grid img:hover { transform: scale(1.04); } | |
| .gif-grid .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px 0; } | |
| /* Кнопка выбора файла в диалоге добавления GIF */ | |
| .gif-file-label { | |
| display: block; text-align: center; padding: 12px; cursor: pointer; | |
| background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); | |
| font-size: 14px; color: var(--text); word-break: break-all; | |
| } | |
| .gif-file-label:hover { border-color: var(--accent-hover); } | |
| /* ===== Каналы: комментарии ===== */ | |
| .group-channel-extra { display: flex; flex-direction: column; align-items: center; | |
| gap: 8px; width: 100%; margin-top: 4px; } | |
| .comments-link { display: inline-block; margin-top: 4px; font-size: 13px; padding: 0; } | |
| /* Панель подписчика канала: «Открыть чат» (слева) + «Отписаться» (справа) */ | |
| .channel-bar { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); } | |
| .channel-bar .primary { flex: 1; } | |
| /* Метка дубля поста канала в группе-обсуждении */ | |
| .channel-post-tag { display: block; font-size: 12px; color: var(--accent); | |
| font-weight: 600; margin-bottom: 4px; } | |
| /* Цитата сообщения, на которое отвечает комментарий/ответ */ | |
| .reply-quote { font-size: 12px; color: var(--muted); border-left: 2px solid var(--accent); | |
| padding: 2px 0 2px 8px; margin-bottom: 4px; max-width: 320px; | |
| white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| .reply-quote.clickable { cursor: pointer; } | |
| .reply-quote.clickable:hover { border-left-color: var(--accent-hover); } | |
| .reply-quote small { display: block; color: var(--link); font-weight: 600; | |
| overflow: hidden; text-overflow: ellipsis; } | |
| .reply-quote span { display: block; overflow: hidden; text-overflow: ellipsis; } | |
| .msg.mine .reply-quote { border-left-color: rgba(255,255,255,.5); } | |
| .msg.mine .reply-quote small { color: #fff; } | |
| /* ===== Окно комментариев (тред) ===== */ | |
| .thread-modal { | |
| position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; | |
| background: var(--bg); | |
| } | |
| @media (min-width: 720px) { | |
| .thread-modal { inset: 0 0 0 auto; width: 420px; box-shadow: -2px 0 16px rgba(0,0,0,.4); | |
| border-left: 1px solid var(--border); } | |
| } | |
| .thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; | |
| background: var(--card); border-bottom: 1px solid var(--border); flex-shrink: 0; } | |
| .thread-title { font-weight: 600; flex: 1; } | |
| .thread-root { padding: 12px 16px; border-bottom: 1px solid var(--border); | |
| background: var(--card); flex-shrink: 0; max-height: 35vh; overflow-y: auto; } | |
| .thread-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; | |
| display: flex; flex-direction: column; gap: 10px; } | |
| .comment { background: var(--card); border-radius: 10px; padding: 8px 10px; | |
| max-width: 92%; align-self: flex-start; word-wrap: break-word; } | |
| .comment.mine { align-self: flex-end; background: var(--accent); color: #fff; } | |
| .comment.root { background: transparent; padding: 0; max-width: 100%; } | |
| .comment p { margin: 0; white-space: pre-wrap; word-break: break-word; } | |
| .comment time { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; } | |
| .comment.mine time { color: rgba(255,255,255,.8); } | |
| .comment img { max-width: 240px; border-radius: 8px; display: block; cursor: pointer; } | |
| .comment-reply { font-size: 12px; padding: 0; margin-top: 2px; } | |
| .thread-reply { display: flex; align-items: center; gap: 8px; padding: 6px 16px; | |
| background: var(--card); border-top: 1px solid var(--border); font-size: 13px; } | |
| .thread-reply span { flex: 1; color: var(--muted); overflow: hidden; | |
| text-overflow: ellipsis; white-space: nowrap; } | |
| .thread-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; | |
| border-top: 1px solid var(--border); background: var(--card); } | |
| .thread-input { flex: 1; padding: 10px 12px; border-radius: 20px; | |
| border: 1px solid var(--border); background: var(--bg); color: var(--text); } | |
| /* ===== Модерация ===== */ | |
| .group-mod-row { display: flex; justify-content: center; width: 100%; margin-top: 8px; } | |
| .member-actions { width: 28px; height: 28px; font-size: 18px; line-height: 1; | |
| flex-shrink: 0; color: var(--muted); } | |
| .member-actions:hover { color: var(--text); } | |
| /* ===== Звонки ===== */ | |
| /* Историческая запись о звонке в чате (звонки больше не поддерживаются) */ | |
| .call-msg { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } | |
| .call-msg span { font-size: 14px; } | |
| /* ===== Анимации ===== */ | |
| @keyframes fade-up { | |
| from { opacity: 0; transform: translateY(14px); } | |
| to { opacity: 1; transform: none; } | |
| } | |
| @keyframes fade-in { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| @keyframes slide-in { | |
| from { opacity: 0; transform: translateX(24px); } | |
| to { opacity: 1; transform: none; } | |
| } | |
| @keyframes shake { | |
| 25% { transform: translateX(-4px); } | |
| 75% { transform: translateX(4px); } | |
| } | |
| /* Анимация для переключения форм авторизации */ | |
| .form.appear { animation: fade-up .35s ease both; } | |
| /* ===== Мобильная версия ===== */ | |
| /* Кнопки «Назад» существуют только на узких экранах */ | |
| .mobile-back { display: none; } | |
| /* Стиль как у .settings-back: стрелка + подпись в начале панели */ | |
| .panel-back { | |
| align-items: center; | |
| gap: 4px; | |
| background: none; | |
| border: none; | |
| color: var(--muted); | |
| font-size: 14px; | |
| padding: 0; | |
| align-self: flex-start; | |
| margin-bottom: 4px; | |
| transition: color .2s; | |
| } | |
| .panel-back:hover { color: var(--text); } | |
| .panel-back svg { width: 16px; height: 16px; } | |
| @media (max-width: 700px) { | |
| /* Одна панель на экран: список чатов либо открытый вид. | |
| Класс show-main на #app ставится в openView(). */ | |
| .sidebar { width: 100%; border-right: none; } | |
| .main { display: none; } | |
| .app-layout.show-main .sidebar { display: none; } | |
| .app-layout.show-main .main { display: flex; } | |
| .mobile-back { display: inline-flex; } | |
| .chat-head .mobile-back { margin-left: -6px; } | |
| .chat-head .mobile-back svg { width: 20px; height: 20px; } | |
| .view { padding: 20px 16px; } | |
| .view-chat { padding: 0; } /* у чата отступов нет (правило выше перебило бы базовое) */ | |
| .panel { max-width: none; } | |
| /* Пузыри и вложения занимают почти всю ширину */ | |
| .msg { max-width: 85%; } | |
| .msg img, .msg video { max-width: 100%; } | |
| .file-info span { max-width: 170px; } | |
| .desc { max-width: 100%; } | |
| /* Долгое нажатие открывает меню — отключаем выделение текста и | |
| системную «лупу» iOS на сообщениях и строках чатов */ | |
| .msg, .chat-row, .pinned-bar { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| user-select: none; | |
| } | |
| /* Палитра реакций не шире экрана */ | |
| .msg-menu-grid { max-width: calc(100vw - 32px); } | |
| /* iOS зумит страницу при фокусе полей со шрифтом < 16px */ | |
| input:not([type=checkbox]), textarea, select { font-size: 16px; } | |
| } | |