/* chat-ai.css - Jarvis features in chat 2 (chat2-ai, 2026-10-25): smart reply chips, catch me up / translate sheets, smart search,
   Jarvis settings. Same look as the 0.9.44+ chat (variables from chat.css; dark + light via .mx[data-theme]); big targets (44 px+). */

/* ---- smart reply chips: a row above the text box, scrolls sideways on a phone */
.mx .mxai-chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.mx .mxai-chips.enter { animation: mxai-in .22s ease-out; }
.mx .mxai-chips::-webkit-scrollbar { display: none; }
.mx .mxai-lbl { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: .78em; font-weight: 800; letter-spacing: .02em; color: var(--text-2); padding-right: 2px; }
.mx .mxai-lbl .mx-ic { width: 18px; height: 18px; color: var(--ember); }
.mx .mxai-chip { min-height: 44px; font-size: .95em; font-weight: 650; max-width: 78vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(100deg, color-mix(in srgb, var(--crimson) 16%, var(--raised)), var(--raised)); border-color: color-mix(in srgb, var(--ember) 45%, var(--line-2)); }
.mx .mxai-chip:active { transform: scale(.97); }
.mx .mxai-x { flex: none; width: 40px; height: 40px; }
@keyframes mxai-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- header "Catch me up" (wide screens; on a phone the header has no room - the pill below does it) */
.mx .mxai-hb .mx-ic { color: var(--ember); }
@media (max-width: 640px) { .mx .mxai-hb { display: none; } .mx .mxai-lbl > span:not(.mx-ic) { display: none; } }

/* ---- "Catch me up · 12 new" (first in the row when a chat opens with a pile of unread messages) */
.mx .mxai-cub { flex: none; min-height: 44px; gap: 8px; font-weight: 750; border-color: color-mix(in srgb, var(--ember) 55%, var(--line-2));
  background: linear-gradient(100deg, color-mix(in srgb, var(--crimson) 26%, var(--raised)), color-mix(in srgb, var(--garnet) 10%, var(--raised))); }
.mx .mxai-cub .mx-ic { width: 20px; height: 20px; color: var(--ember); }
.mx .mxai-cub small { font-size: .82em; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--crimson); color: #fff; }

/* ---- job sheets (catch me up / translate) */
.mx .mxai-stage { display: flex; align-items: center; gap: 12px; padding: 14px 6px; color: var(--text-2); font-weight: 650; }
.mx .mxai-stage[hidden] { display: none; }
.mx .mxai-orb { width: 22px; height: 22px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 8%, var(--ember) 30%, var(--garnet) 70%); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 55%, transparent); }
.mx .mxai-orb.live { animation: mxai-pulse 1.3s ease-in-out infinite; }
@keyframes mxai-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 55%, transparent); transform: scale(1); } 70% { box-shadow: 0 0 0 12px transparent; transform: scale(1.08); } 100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); } }
.mx .mxai-out { padding: 2px 4px 4px; }
.mx .mxai-line { margin: 0 0 10px; font-size: 1.04em; line-height: 1.5; }
.mx .mxai-line.bullet { position: relative; padding-left: 22px; }
.mx .mxai-line.bullet::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); }
.mx .mxai-meta { margin: 6px 4px 4px; font-size: .82em; color: var(--text-3); }
.mx .mxai-err { margin: 10px 4px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--crimson) 14%, var(--raised)); font-weight: 650; }
.mx .mxai-note { margin: -4px 4px 12px; padding: 10px 12px; border-radius: 14px; background: var(--raised); font-size: .88em; color: var(--text-2); }
.mx .mxai-to { display: flex; align-items: center; gap: 12px; margin: 0 4px 6px; font-weight: 700; }
.mx .mxai-to select { flex: 1; min-height: 48px; padding: 0 12px; border-radius: 14px; background: var(--raised); color: var(--text); border: 1.5px solid var(--line-2); font-size: 1em; }
.mx .mxai-to select:focus { border-color: var(--ember); outline: none; }

/* ---- smart search */
.mx .mxai-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 6px 6px; font-weight: 650; }
.mx .mxai-row .grow { flex: 1; }
.mx .mxai-results { margin-top: 4px; }
.mx .mxai-hit { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.mx .mxai-hit .sub { font-size: .9em; color: var(--text); margin-top: 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mx .mxai-where { display: block; font-size: .78em; font-weight: 750; color: var(--text-2); }
.mx .mxai-thumb { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; background: var(--raised); }
.mx .mxai-ic { width: 56px; height: 56px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--raised); }
.mx .mxai-ic .mx-ic { color: var(--ember); }
.mx .mxai-empty { margin: 14px 6px; color: var(--text-2); }

/* ---- settings */
.mx .mxai-set { min-height: 72px; }
.mx .mxai-set .grow { font-weight: 700; }
.mx .mxai-set .sub { font-weight: 500; margin-top: 2px; line-height: 1.35; }

@media (prefers-reduced-motion: reduce) { .mx .mxai-chips.enter { animation: none; } .mx .mxai-orb.live { animation: none; } }
