/* Live conversations: reuses the app's list, bubble, composer and strip styles. */

.live[hidden] { display: none; }
.live {
  position: fixed; inset: 0; z-index: 30; display: grid; grid-template-columns: var(--rail-width) 1fr; height: 100dvh;
  background: var(--chat);
}
.live-rail {
  display: flex; flex-direction: column; min-width: 0; height: 100dvh; border-right: 1px solid var(--line);
  background:
    radial-gradient(115% 44% at 0% 0%, var(--glow-a), transparent 64%),
    radial-gradient(90% 40% at 100% 3%, var(--glow-b), transparent 62%),
    var(--canvas);
}
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px var(--page) 12px; }
.live-head-actions { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
.live-brand { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.live-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.live-who b { font-size: 17px; font-weight: 600; }
.live-who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-list { flex: 1; overflow-y: auto; padding: 4px var(--page) 32px; }
.live .row-sub { display: flex; align-items: center; gap: 6px; }
.live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live-dot.is-on { background: #5FB088; }
.live-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--danger-fill); }
.live-bar span { flex: 1; }
.live-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; color: var(--muted); font-size: 14px; }

.live-pane { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100dvh; background: var(--chat); }
.live-title { max-width: min(56vw, 420px); padding: 8px 10px; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-placeholder { flex: 1; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.live-placeholder img { width: 72px; height: 72px; border-radius: 50%; }
.live-placeholder h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); }
.live-text { white-space: pre-wrap; }
.live .item.assistant .bubble { box-shadow: 0 0 0 .5px var(--line); }
.live-back { display: none; }

body.live-open .demo-chip { display: none; }

@media (max-width: 899px) {
  .live { grid-template-columns: 1fr; }
  .live-rail { border-right: 0; }
  .live.has-chat .live-rail { display: none; }
  .live:not(.has-chat) .live-pane { display: none; }
  .live-back { display: grid; }
}

.live [data-live-history]:not(:empty) { display: flex; justify-content: center; padding: 8px 16px; }

.live-filter { display: flex; gap: 8px; padding: 0 var(--page) 8px; }
.live-filter [aria-pressed="true"] { background: var(--hover); font-weight: 600; }
.live-create { width: min(420px, calc(100vw - 32px)); color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.live-create::backdrop { background: rgb(0 0 0 / 0.35); }
.live-create form, .live-create label { display: grid; gap: 10px; }
.live-create form { gap: 16px; }
.live-create h2, .live-create p { margin: 0; }
.live-create p:empty { display: none; }
.live-create input, .live-create select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.live-create .actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.live-create .auth-primary { width: auto; padding-inline: 18px; }

.live-image-drafts:not(:empty) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; }
.live-image-drafts button { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-attachment { display: block; max-width: min(100%, 360px); max-height: 320px; margin-top: 6px; border-radius: 8px; }

.live-planning { width: min(640px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 36px)); overflow-y: auto; }
.live-planning header { display: flex; justify-content: space-between; align-items: center; }
.live-planning section + section { margin-top: 22px; border-top: 1px solid var(--line); }
.live-planning li > span, .live-planning li > strong { display: block; overflow-wrap: anywhere; margin: 4px 0; }
.live-planning ul { margin: 0; padding-inline-start: 18px; }
.live-planning .chip { margin-block: 4px; }
.live-planning-todo { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; align-items: center; gap: 6px; }
.live-planning input { min-width: 0; }
.live [data-live-actions] { display: flex; align-items: center; justify-content: end; gap: 4px; }
.live [data-live-actions] .chip { white-space: nowrap; }

@media (max-width: 899px) {
  .live .chat-head { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px; }
  .live .chat-title { min-width: 0; }
  .live .live-title { max-width: 100%; }
  .live [data-live-actions] .chip { padding-inline: 7px; }
}

.live-filter [data-live-filter] { display: flex; gap: 5px; }
.live-filter input { flex: 1; min-width: 70px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; }

.live-computers fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.live-computers section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.live-computers section strong { overflow-wrap: anywhere; }
.live-computers form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin: 8px 0; gap: 8px; }

.live-computers header { gap: 8px; flex-wrap: wrap; }
.live-computers h2 { margin-inline-end: auto; }
