/* Taskson — посадочная «Чаты и звонки»: сцены «Как это работает».
   Только эта страница (префикс lp-chaty-i-zvonki-), поверх lp.css и словаря ui.css / ui-extra.css.
   Сцена 1 — чат задачи с панелью стикеров, сцена 2 — групповой звонок с записью,
   сцена 3 — страница гостя и зал ожидания. Счётчик записи — [data-cz-rec] (скрипт в странице). */

/* раскладка панели сцены */
.lp-chaty-i-zvonki-split { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 456px; }
.lp-chaty-i-zvonki-split--call { grid-template-columns: minmax(0, 1fr) 392px; }
.lp-chaty-i-zvonki-split--guest { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; padding: 14px; }

/* список чатов задач */
.lp-chaty-i-zvonki-list { display: flex; flex-direction: column; gap: 3px; padding: 12px 8px; background: var(--ui-bg); border-right: 1px solid var(--ui-hair); min-width: 0; }
.lp-chaty-i-zvonki-list-h { display: grid; gap: 8px; padding: 2px 6px 8px; }
.lp-chaty-i-zvonki-list-h .ui-seg { justify-self: start; }
.lp-chaty-i-zvonki-list-h b { font-size: 12.5px; }
.lp-chaty-i-zvonki-list-h .ui-seg span { height: 22px; padding: 0 7px; font-size: 10.5px; }

/* лента чата: старое уходит вверх за край, как в настоящей ленте */
.lp-chaty-i-zvonki-thread { position: relative; min-width: 0; }
.lp-chaty-i-zvonki-thread .ui-thread-h { min-height: 54px; }
.lp-chaty-i-zvonki-thread .ui-thread-h > div { margin-right: auto; }
.lp-chaty-i-zvonki-thread .ui-thread-h .ui-ib { margin-left: 0; }
.lp-chaty-i-zvonki-feed { flex: 1 1 0; min-height: 0; overflow: hidden; justify-content: flex-end; }
.lp-chaty-i-zvonki-feed .ui-msg > div { min-width: 0; }
.lp-chaty-i-zvonki-feed .ui-file { max-width: 230px; }
.lp-chaty-i-zvonki-stk-msg { width: 104px; }
.lp-chaty-i-zvonki-stk-sm { width: 84px; }

/* поле ввода и панель стикеров */
.lp-chaty-i-zvonki-composer { position: relative; }
.lp-chaty-i-zvonki-composer .ui-compose span { margin-right: 0; }
.lp-chaty-i-zvonki-composer .ui-compose { gap: 4px; }
.lp-chaty-i-zvonki-input { flex: 1; min-width: 0; margin-right: auto; overflow: hidden; }
.lp-chaty-i-zvonki-input > span:first-child { color: var(--ui-text); }
.lp-chaty-i-zvonki-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--ui-text2); flex: none; }
.lp-chaty-i-zvonki-ico .ic { width: 16px; height: 16px; }
.lp-chaty-i-zvonki-picker-wrap { position: absolute; right: 12px; bottom: 56px; z-index: 5; }
.lp-chaty-i-zvonki-picker {
  display: grid; gap: 8px; width: 272px; padding: 8px 10px 10px; border-radius: 14px;
  background: var(--ui-panel); box-shadow: var(--ui-sh-pop), 0 24px 48px -16px rgba(23, 25, 41, .25);
}
.lp-chaty-i-zvonki-picker-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ui-hair); }
.lp-chaty-i-zvonki-picker-tabs span { padding: 6px 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ui-text2); font-size: 11.5px; font-weight: 600; }
.lp-chaty-i-zvonki-picker-tabs span.on { color: var(--ui-accent); border-bottom-color: var(--ui-accent); }
.lp-chaty-i-zvonki-sets { display: flex; gap: 4px; overflow: hidden; }
.lp-chaty-i-zvonki-sets span { flex: none; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 7px; background: var(--ui-sunk); color: var(--ui-text2); font-size: 10.5px; font-weight: 600; }
.lp-chaty-i-zvonki-sets span.on { background: var(--ui-accent-soft); color: var(--ui-accent); }
.lp-chaty-i-zvonki-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.lp-chaty-i-zvonki-grid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; }
.lp-chaty-i-zvonki-grid span[data-press] { background: var(--ui-sunk); }
.lp-chaty-i-zvonki-grid img { width: 86%; }

/* звонок рядом с чатом */
.lp-chaty-i-zvonki-call { position: relative; inset: auto; margin: 12px; min-width: 0; box-shadow: var(--ui-sh-exp); }
.lp-chaty-i-zvonki-split--guest .lp-chaty-i-zvonki-call { margin: 0; }
.lp-chaty-i-zvonki-call .ui-call-h { min-height: 24px; }
.lp-chaty-i-zvonki-call-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-chaty-i-zvonki-call .ui-tile { min-height: 96px; }
.lp-chaty-i-zvonki-call .ui-tile small { white-space: nowrap; }
.lp-chaty-i-zvonki-call .ui-rec { flex: none; white-space: nowrap; }
.lp-chaty-i-zvonki-recslot { margin-left: auto; justify-items: end; align-items: center; }
.lp-chaty-i-zvonki-recon { display: inline-flex; align-items: center; gap: 6px; }
.lp-chaty-i-zvonki-recon .ui-rec { margin-left: 0; }
.lp-chaty-i-zvonki-recbtn { gap: 5px; white-space: nowrap; }
.lp-chaty-i-zvonki-recbtn .ic { width: 12px; height: 12px; color: #FF5A5F; }
.lp-chaty-i-zvonki-callbtn { background: var(--ui-accent-soft); color: var(--ui-accent); }
.lp-chaty-i-zvonki-short { display: none; }
/* «Идёт звонок» под шапкой чата, как плашка в продукте */
.lp-chaty-i-zvonki-banner {
  display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; padding: 7px 12px 7px 8px;
  border-radius: 9px; background: var(--ui-accent-soft); color: var(--ui-text); font-size: 12px;
}
.lp-chaty-i-zvonki-banner .ui-ico { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.lp-chaty-i-zvonki-banner .ui-ico .ic { width: 14px; height: 14px; }
.lp-chaty-i-zvonki-banner > span:nth-child(2) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-chaty-i-zvonki-banner small { margin-left: auto; flex: none; color: var(--ui-text2); font-size: 11px; }
/* тост «Запись начата» — над кнопками окна звонка */
.lp-chaty-i-zvonki-toastwrap { position: absolute; left: 12px; right: 12px; bottom: 54px; z-index: 5; display: flex; justify-content: center; pointer-events: none; }
.lp-chaty-i-zvonki-toastwrap .lp-toast { position: static; left: auto; bottom: auto; transform: none; margin: 0; white-space: nowrap; }

/* зал ожидания в окне звонка: полоса в потоке между шапкой и плитками, как в продукте */
.lp-chaty-i-zvonki-lobbyslot { min-height: 40px; grid-template-columns: minmax(0, 1fr); }
.lp-chaty-i-zvonki-lobby { min-width: 0; }
.lp-chaty-i-zvonki-lobbyslot > .lp-chaty-i-zvonki-note { align-self: center; justify-self: center; }
.lp-chaty-i-zvonki-lobby-in {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 6px 6px 10px; border-radius: 10px;
  background: var(--ui-accent-soft); color: var(--ui-text); font-size: 11.5px; white-space: nowrap;
}
.lp-chaty-i-zvonki-lobby-in > .ic { width: 14px; height: 14px; flex: none; color: var(--ui-accent); }
.lp-chaty-i-zvonki-lobby-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lp-chaty-i-zvonki-lobby-w { flex: none; margin-right: auto; font-weight: 600; }
.lp-chaty-i-zvonki-lobby-in .ui-btn { flex: none; height: 26px; }
.lp-chaty-i-zvonki-decline { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--ui-panel); color: var(--ui-text); font-weight: 600; box-shadow: var(--ui-sh-card); }
.lp-chaty-i-zvonki-note { font-size: 11px; opacity: .6; }
.lp-chaty-i-zvonki-av-guest, .lp-chaty-i-zvonki-pulse .av { background: var(--lb-amber-bg); color: var(--lb-amber-fg); }
.lp-chaty-i-zvonki-slot { background: transparent; }
.lp-chaty-i-zvonki-guesttile { position: absolute; inset: 0; min-height: 0; }

/* страница гостя */
.lp-chaty-i-zvonki-guest { display: flex; flex-direction: column; min-width: 0; border-radius: 14px; background: var(--ui-bg); box-shadow: var(--ui-sh-card); overflow: hidden; }
.lp-chaty-i-zvonki-guest-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; background: var(--ui-sunk); color: var(--ui-text2); font: 500 10.5px/1 var(--font-mono); }
.lp-chaty-i-zvonki-guest-bar .ic { width: 12px; height: 12px; flex: none; color: var(--st-done); }
.lp-chaty-i-zvonki-guest-bar span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-chaty-i-zvonki-guest-bar em { margin-left: auto; flex: none; padding: 3px 7px; border-radius: 6px; background: var(--lb-amber-bg); color: var(--lb-amber-fg); font: 700 10px/1 var(--font-ui); font-style: normal; }
.lp-chaty-i-zvonki-guest-body { flex: 1; padding: 20px 18px; }
.lp-chaty-i-zvonki-guest-body.lp-swap--block > * { align-self: center; }
.lp-chaty-i-zvonki-gstate, .lp-chaty-i-zvonki-gwait { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 290px; margin-inline: auto; text-align: center; }
.lp-chaty-i-zvonki-gtitle { font-size: 14px; line-height: 1.3; letter-spacing: -.01em; }
.lp-chaty-i-zvonki-gico { width: 40px; height: 40px; border-radius: 12px; }
.lp-chaty-i-zvonki-gico .ic { width: 18px; height: 18px; }
.lp-chaty-i-zvonki-field { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--ui-panel); box-shadow: 0 0 0 1.5px var(--ui-accent); text-align: left; }
.lp-chaty-i-zvonki-remember { justify-self: start; padding: 0; }
.lp-chaty-i-zvonki-wide { justify-content: center; width: 100%; height: 32px; }
.lp-chaty-i-zvonki-pulse { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--ui-accent-soft); }
.lp-chaty-i-zvonki-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--ui-accent); opacity: 0; }
/* гость впущен: шапка встречи и звонок на всю панель */
.lp-chaty-i-zvonki-guest-body > .lp-chaty-i-zvonki-gin { align-self: stretch; }
.lp-chaty-i-zvonki-gin { display: flex; flex-direction: column; margin: calc(-1 * var(--cz-gpad-y, 20px)) calc(-1 * var(--cz-gpad-x, 18px)); min-width: 0; }
.lp-chaty-i-zvonki-ghead { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 10px 0 12px; background: var(--ui-panel); box-shadow: 0 1px 0 var(--ui-hair); }
.lp-chaty-i-zvonki-ghead .ui-dot { flex: none; }
.lp-chaty-i-zvonki-ghead-t { display: grid; min-width: 0; margin-right: auto; line-height: 1.3; }
.lp-chaty-i-zvonki-ghead-t b, .lp-chaty-i-zvonki-ghead-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-chaty-i-zvonki-ghead-t b { font-size: 12.5px; }
.lp-chaty-i-zvonki-ghead-t small { color: var(--ui-text2); font-size: 10.5px; }
.lp-chaty-i-zvonki-grec { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--lb-red-fg); font-size: 11px; font-weight: 600; white-space: nowrap; }
.lp-chaty-i-zvonki-grec::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lp-chaty-i-zvonki-leave { flex: none; height: 26px; font-size: 11px; white-space: nowrap; }
.lp-chaty-i-zvonki-gcall { position: relative; inset: auto; flex: 1; margin: 10px; padding: 8px; border-radius: 14px; box-shadow: none; }
.lp-chaty-i-zvonki-gcall .ui-tiles { grid-template-rows: 1fr 1fr; }
.lp-chaty-i-zvonki-gcall .ui-tile { min-height: 72px; }
.lp-chaty-i-zvonki-gcall .ui-tile small { white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .lp-scene.is-active .lp-chaty-i-zvonki-pulse::after { animation: lp-chaty-i-zvonki-ring 1.6s ease-out 2s infinite; }
}
@keyframes lp-chaty-i-zvonki-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }

/* тёмная тема: стеклянная тень у панелей сцены, без белых пятен */
[data-theme="dark"] .lp-chaty-i-zvonki-picker { box-shadow: var(--ui-sh-pop), 0 24px 48px -16px rgba(0, 0, 0, .6); }
[data-theme="dark"] .lp-chaty-i-zvonki-call { box-shadow: 0 0 0 1px rgba(58, 59, 71, .9), 0 14px 36px rgba(0, 0, 0, .45); }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .lp-chaty-i-zvonki-split { grid-template-columns: 220px minmax(0, 1fr); }
  .lp-chaty-i-zvonki-split--call { grid-template-columns: minmax(0, 1fr) 360px; }
  .lp-chaty-i-zvonki-split--guest { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lp-chaty-i-zvonki-long, .lp-chaty-i-zvonki-decline { display: none; }
  .lp-chaty-i-zvonki-short { display: inline; }
  .lp-chaty-i-zvonki-ghead-t small { display: none; }
}
@media (max-width: 760px) {
  .lp-chaty-i-zvonki-split, .lp-chaty-i-zvonki-split--call, .lp-chaty-i-zvonki-split--guest { grid-template-columns: minmax(0, 1fr); }
  .lp-chaty-i-zvonki-split { min-height: 440px; }
  .lp-chaty-i-zvonki-split--call, .lp-chaty-i-zvonki-split--guest { min-height: 0; }
  .lp-chaty-i-zvonki-split--call { grid-template-rows: auto minmax(0, 1fr); }
  .lp-chaty-i-zvonki-under { order: 2; }
  .lp-chaty-i-zvonki-under .ui-thread-h { display: none; }
  .lp-chaty-i-zvonki-under .lp-chaty-i-zvonki-feed { padding-top: 0; }
  .lp-chaty-i-zvonki-call { margin: 10px; }
  .lp-chaty-i-zvonki-split--guest { padding: 10px; gap: 10px; }
  .lp-chaty-i-zvonki-guest-body { padding: 16px 14px; --cz-gpad-y: 16px; --cz-gpad-x: 14px; }
  .lp-chaty-i-zvonki-picker-wrap { right: 10px; left: 10px; }
  .lp-chaty-i-zvonki-picker { width: auto; }
  .lp-chaty-i-zvonki-feed .ui-file { max-width: 200px; }
}
@media (max-width: 420px) {
  .lp-chaty-i-zvonki-ghead { flex-wrap: wrap; gap: 4px 8px; padding: 7px 10px; }
  .lp-chaty-i-zvonki-ghead-t { flex: 1 1 calc(100% - 20px); }
  .lp-chaty-i-zvonki-grec { font-size: 10.5px; }
  .lp-chaty-i-zvonki-leave { padding: 0 8px; }
  .lp-chaty-i-zvonki-call .ui-tile { min-height: 84px; }
  .lp-chaty-i-zvonki-call .ui-tile small { font-size: 9.5px; left: 6px; }
  .lp-chaty-i-zvonki-recon .ui-call-stop { display: none; }
}

/* доводка: подвал боковой панели, ширина пузырей, запись у гостя */
.lp-how:has([class*="lp-chaty-i-zvonki-"]) .lp-side .ui-side-foot { white-space: nowrap; font-size: 9.5px; padding: 0 2px; }
.lp-chaty-i-zvonki-feed .ui-msg { width: fit-content; max-width: 82%; }
.lp-chaty-i-zvonki-feed { -webkit-mask-image: linear-gradient(180deg, transparent, #000 28px); mask-image: linear-gradient(180deg, transparent, #000 28px); }

/* ряд Element: название комнаты в шапке телефона — одной строкой, как в приложении */
#element .ui-ph-top b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#element .ui-ph-top .ui-ph-sub { overflow: hidden; text-overflow: ellipsis; }

/* ---------- первый экран на телефоне (CMS): холст в потоке, в натуральном размере,
   как lp-uchet-vremeni-hero, а не уменьшенный до шрифта 4 px; чат во всю ширину,
   карточка звонка — под ним справа ---------- */
@media (max-width: 640px) {
  .stage.lp-chaty-i-zvonki-hero { aspect-ratio: auto !important; }
  .lp-chaty-i-zvonki-hero > .stage-canvas { position: relative; width: auto !important; height: auto !important; transform: none; }
  .lp-chaty-i-zvonki-hero .ui-chat { position: relative; inset: auto; right: auto !important; }
  .lp-chaty-i-zvonki-hero .ui-call { position: relative; right: auto !important; top: auto !important; width: min(100%, 280px) !important; height: auto !important; margin: 10px 0 0 auto; }
}

/* ==== mockup2blade: атрибуты style макета — раздел пишет tools/mockup2blade.py, руками не править ==== */
.lp-chaty-i-zvonki-s0e50da { --d: 2.3s !important; }
.lp-chaty-i-zvonki-s0f2206 { width: 104px !important; }
.lp-chaty-i-zvonki-s105feb { --d: .5s !important; }
.lp-chaty-i-zvonki-s1a976e { --d: 2.1s !important; }
.lp-chaty-i-zvonki-s388336 { --d: 1.1s !important; }
.lp-chaty-i-zvonki-s38a331 { --d: 3.8s !important; }
.lp-chaty-i-zvonki-s4a860a { --d: 3.9s !important; }
.lp-chaty-i-zvonki-s4d85d7 { --d: 5.4s !important; }
.lp-chaty-i-zvonki-s53e325 { --d: 4.45s !important; }
.lp-chaty-i-zvonki-s6528b2 { width: 30% !important; }
.lp-chaty-i-zvonki-s6aab09 { right: 0 !important; top: 40px !important; width: 232px !important; height: 262px !important; }
.lp-chaty-i-zvonki-s6d14f4 { --d: 1.75s !important; }
.lp-chaty-i-zvonki-s72bdd1 { width: 76px !important; }
.lp-chaty-i-zvonki-s7ab032 { --d: 1.2s !important; }
.lp-chaty-i-zvonki-s7fd7ef { margin-left: auto !important; }
.lp-chaty-i-zvonki-s806085 { --d: 1.6s !important; }
.lp-chaty-i-zvonki-s850f22 { --d: 2.15s !important; }
.lp-chaty-i-zvonki-s86d5a6 { width: 60% !important; }
.lp-chaty-i-zvonki-s8ee8e1 { --d: 1.05s !important; }
.lp-chaty-i-zvonki-s92fb4d { --d: 2.2s !important; }
.lp-chaty-i-zvonki-s959a44 { --d: 1.8s !important; }
.lp-chaty-i-zvonki-s996280 { --d: .8s !important; }
.lp-chaty-i-zvonki-sa770e3 { --d: 3.4s !important; }
.lp-chaty-i-zvonki-saa39b0 { max-width: 420px !important; margin-inline: auto !important; padding: 0 !important; }
.lp-chaty-i-zvonki-sab069b { justify-self: start !important; }
.lp-chaty-i-zvonki-sac988e { --d: 3.2s !important; }
.lp-chaty-i-zvonki-sae0638 { width: 10% !important; }
.lp-chaty-i-zvonki-sb616fb { --d: 1.4s !important; }
.lp-chaty-i-zvonki-sbdeb0d { --d: 2.6s !important; }
.lp-chaty-i-zvonki-sc3679d { width: 720px !important; height: 500px !important; }
.lp-chaty-i-zvonki-scae89a { aspect-ratio: 720/500 !important; }
.lp-chaty-i-zvonki-scba9e2 { --d: 3.6s !important; }
.lp-chaty-i-zvonki-sd01b12 { --d: 1.5s !important; }
.lp-chaty-i-zvonki-sd7ac7f { --d: 4.1s !important; }
.lp-chaty-i-zvonki-sd937c7 { --d: .3s !important; }
.lp-chaty-i-zvonki-se49989 { padding: 18px !important; }
.lp-chaty-i-zvonki-sec522a { right: 250px !important; }
.lp-chaty-i-zvonki-sed91f1 { --d: 2.9s !important; }
/* ==== /mockup2blade ==== */
