.channel-editor-overlay { position: fixed; top: var(--editor-top, 0px); left: 0; right: 0; height: var(--editor-height, 100dvh); z-index: 90; display: grid; background: var(--scrim); } .channel-editor { width: min(100%, 640px); height: 100%; min-height: 0; margin-inline: auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; color: var(--text-primary); background: var(--background); } .channel-editor__header { min-height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0 6px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px; align-items: center; border-bottom: 1px solid var(--border-subtle); background: var(--surface); } .channel-editor__header h2 { font-size: 16px; line-height: 24px; font-weight: 600; text-align: left; } .channel-editor__close { width: 44px; height: 44px; padding: 0; font-size: 28px; color: var(--text-primary); } .channel-editor__body { min-height: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; } .channel-editor__context { padding-left: 12px; border-left: 2px solid var(--accent); color: var(--text-secondary); } .channel-editor__context strong { display: block; margin-bottom: 4px; color: var(--text-primary); font-size: 13px; } .channel-editor__context p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 18px; overflow-wrap: anywhere; } .channel-editor__context.is-expanded p { display: block; } .channel-editor__context-toggle, .channel-editor__clear { min-height: 44px; padding: 6px 0; color: var(--accent); font-size: 13px; } .channel-editor__input { flex: 1 0 auto; overflow-y: hidden; width: 100%; min-height: 160px; padding: 12px 14px; resize: none; border: 1px solid var(--border-subtle); border-radius: 14px; outline: 0; color: var(--text-primary); background: var(--surface); transition: border-color 160ms ease; font: inherit; font-size: 16px; line-height: 24px; caret-color: var(--accent); } .channel-editor__input::placeholder { color: color-mix(in srgb, var(--text-secondary) 62%, var(--background)); opacity: 1; } .channel-editor__type { display: grid; gap: 6px; color: var(--text-secondary); font-size: 13px; } .channel-editor__input:focus-visible { outline: 0; border-color: var(--accent); } .channel-editor__attachments { display: grid; gap: 8px; } .channel-editor__author { display: flex; align-items: center; gap: 12px; font-size: .875rem; } .channel-editor__author .avatar { width: 40px; height: 40px; min-width: 40px; min-height: 40px; } .channel-editor__context-toggle[hidden] { display: none; } .channel-editor__chain { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; } .channel-editor__chain-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding-bottom: 16px; } /* Линия от аватара вниз – к следующему звену и к автору ответа. */ .channel-editor__chain-item::after { content: ''; position: absolute; top: 44px; bottom: -2px; left: 19px; border-left: 2px solid var(--border-control); } .channel-editor__chain-item .avatar.channel-editor__chain-avatar { width: 40px; height: 40px; min-width: 40px; min-height: 40px; } .channel-editor__chain-main { min-width: 0; } .channel-editor__chain-head { display: flex; align-items: baseline; gap: 6px; min-height: 22px; } .channel-editor__chain-head strong { font-size: .9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .channel-editor__chain-head span { flex-shrink: 0; color: var(--text-secondary); font-size: .875rem; } .channel-editor__chain-main p { margin: 2px 0 0; color: var(--text-primary); font-size: .9375rem; line-height: 1.4375rem; white-space: pre-wrap; overflow-wrap: anywhere; } .channel-editor__author.is-chained { margin-top: -4px; } .channel-editor__attach[hidden], .channel-editor__clear[hidden] { display: none; } .channel-editor__attachment { min-height: 44px; padding: 6px 8px 6px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 8px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface); font-size: 13px; } .channel-editor__attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .channel-editor__attachment button { min-width: 44px; min-height: 44px; color: var(--text-secondary); } .channel-editor__error { min-height: 18px; color: var(--danger); font-size: 13px; line-height: 18px; } .channel-editor__footer { min-height: calc(68px + env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) 8px; display: grid; align-items: center; gap: 10px; border-top: 1px solid var(--border-subtle); background: var(--background); } .channel-editor__submit { min-height: 44px; padding: 0 18px; border-radius: 22px; } .channel-editor__submit { color: var(--on-accent); background: var(--accent); } .channel-editor__submit:disabled { opacity: 1; color: var(--text-secondary); background: var(--surface-selected); } .channel-editor__type { display: block; min-width: 0; } .channel-editor__type-select { min-height: 44px; width: auto; max-width: 9.5rem; padding-left: 12px; border-radius: 12px; font-size: .875rem; } .channel-editor__counter { min-width: 0; color: var(--text-secondary); font-size: 12px; text-align: right; } .channel-editor__counter.is-near-limit { color: var(--warning); } @media (min-width: 680px) { .channel-editor-overlay { place-items: center; padding: 24px; } .channel-editor { height: min(760px, 100%); border: 1px solid var(--border-subtle); border-radius: 20px; box-shadow: var(--shadow); } } @media (max-width: 400px) { } @media (prefers-reduced-motion: reduce) { .channel-editor-overlay, .channel-editor { animation: none; transition: none; } } .channel-editor__author-text { display: grid; gap: 1px; min-width: 0; } .channel-editor__author-text small { color: var(--text-secondary); font-size: .75rem; } .channel-editor__draft { justify-self: end; color: var(--text-secondary); font-size: .75rem; } .channel-editor__close svg { width: 24px; height: 24px; } /* Поле ввода как в Threads: без рамки, в колонке справа от аватара – под именем (и строкой «В канал …»); вложения – ниже текста. */ .channel-editor__author { align-items: flex-start; } .channel-editor__author-text { flex: 1; padding-top: 1px; } .channel-editor__compose { display: grid; gap: 8px; margin-top: 4px; } .channel-editor__compose .channel-editor__input { flex: none; min-height: 24px; padding: 0; border: 0; border-radius: 0; background: transparent; line-height: 24px; } .channel-editor__compose .channel-editor__input:focus-visible { border: 0; } .channel-editor__compose .channel-editor__error:empty { display: none; } /* Нижняя панель: «прикрепить» и тип записи слева, счётчик (только у предела) и отправка – справа; ничего не вылезает за край. */ .channel-editor__footer { display: flex; align-items: center; gap: 8px; } .channel-editor__footer .channel-editor__attach { flex: none; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--accent); } .channel-editor__footer .channel-editor__attach:hover { background: var(--surface-selected); } .channel-editor__footer .channel-editor__attach svg { width: 24px; height: 24px; } .channel-editor__footer .channel-editor__type { flex: 0 1 auto; min-width: 0; } .channel-editor__footer .channel-editor__type-select { width: 100%; max-width: 9.5rem; min-width: 0; text-overflow: ellipsis; } /* Колонка редактора не должна раздуваться содержимым шире экрана. */ .channel-editor { grid-template-columns: minmax(0, 1fr); } .channel-editor__footer, .channel-editor__body { min-width: 0; } .channel-editor__footer .channel-editor__counter { margin-left: auto; } .channel-editor__footer .channel-editor__counter.is-hidden { display: none; } .channel-editor__footer .channel-editor__counter.is-hidden + .channel-editor__submit { margin-left: auto; } .channel-editor__footer .channel-editor__submit { flex: none; } /* Миниатюры картинок и видео – лентой, крестик в углу. */ .channel-editor__compose .channel-editor__attachments { display: flex; flex-wrap: wrap; gap: 8px; } .channel-editor__compose .channel-editor__attachment { flex: 1 1 100%; } .channel-editor__thumb { position: relative; width: 120px; height: 150px; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-selected); } .channel-editor__thumb img, .channel-editor__thumb video { display: block; width: 100%; height: 100%; object-fit: cover; } .channel-editor__thumb-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; } .channel-editor__thumb-remove svg { width: 16px; height: 16px; } .channel-editor__thumb--video::after { content: ''; position: absolute; left: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgb(0 0 0 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='white'/%3E%3C/svg%3E") center / 18px no-repeat; pointer-events: none; } .channel-editor__header-end { justify-self: end; display: flex; align-items: center; } .channel-editor__header-end .channel-editor__clear { min-height: 44px; padding: 0 4px; } .channel-editor__header-end [hidden] { display: none; }