/* MoreConcepts assistant (chat bubble). Uses the site's theme variables; works in light and dark. */
#mc-agent { --mca-bg: var(--bg, #022A3C); --mca-surface: var(--surface, #0b3a52); --mca-text: var(--text, #EAF6FA); --mca-muted: var(--muted, #8DB4C6); --mca-line: var(--line-strong, rgba(255,255,255,.18)); --mca-accent: var(--accent-solid, #2CE5EE); --mca-on: var(--on-accent, #011B28); }
.mca-fab { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 900; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px; border-radius: 999px; border: 0; background: var(--mca-accent); color: var(--mca-on); font: 700 15px/1 var(--body, system-ui); cursor: pointer; box-shadow: 0 14px 34px rgba(0, 0, 0, .32); transition: transform .2s, box-shadow .2s; }
.mca-fab:hover, .mca-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.mca-fab:focus-visible, .mca-ico:focus-visible, .mca-send:focus-visible, .mca-chips button:focus-visible { outline: 3px solid var(--mca-text); outline-offset: 2px; }
#mc-agent.is-open .mca-fab { display: none; }
.mca-panel { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 1000; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 32px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--mca-bg); color: var(--mca-text); border: 1px solid var(--mca-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: mca-in .28s ease both; }
.mca-panel[hidden] { display: none; }
@keyframes mca-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.mca-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; background: var(--mca-surface); border-bottom: 1px solid var(--mca-line); }
.mca-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--mca-accent); color: var(--mca-on); font: 800 13px/1 var(--display, system-ui); }
.mca-head__t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mca-head__t strong { font: 700 15px/1.2 var(--display, system-ui); }
.mca-head__t small { color: var(--mca-muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.mca-head__t i { width: 8px; height: 8px; border-radius: 50%; background: #34D399; }
.mca-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--mca-text); cursor: pointer; }
.mca-ico:hover { background: var(--hover, rgba(255,255,255,.1)); }
.mca-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scroll-behavior: smooth; }
.mca-msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; animation: mca-pop .22s ease both; }
@keyframes mca-pop { from { opacity: 0; transform: translateY(6px); } }
.mca-msg p { margin: 0; } .mca-msg p + p, .mca-msg ul + p, .mca-msg p + ul { margin-top: 8px; }
.mca-msg ul { margin: 0; padding-left: 18px; } .mca-msg li { margin: 2px 0; }
.mca-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.mca-msg--bot { align-self: flex-start; background: var(--mca-surface); border: 1px solid var(--mca-line); border-bottom-left-radius: 6px; }
.mca-msg--user { align-self: flex-end; background: var(--mca-accent); color: var(--mca-on); border-bottom-right-radius: 6px; }
.mca-msg--err { border-color: #FF7A6B; }
.mca-typing { display: flex; gap: 5px; padding: 14px 16px; }
.mca-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mca-muted); animation: mca-dot 1.2s ease-in-out infinite; }
.mca-typing span:nth-child(2) { animation-delay: .15s; } .mca-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mca-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.mca-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.mca-chips[hidden] { display: none; }
.mca-chips button { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--mca-line); background: transparent; color: var(--mca-text); font: 600 13.5px/1.2 var(--body, system-ui); cursor: pointer; text-align: left; }
.mca-chips button:hover { border-color: var(--mca-accent); background: var(--hover, rgba(255,255,255,.08)); }
.mca-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--mca-line); background: var(--mca-surface); }
.mca-form textarea { flex: 1; resize: none; max-height: 120px; padding: 11px 14px; border-radius: 20px; border: 1px solid var(--mca-line); background: var(--mca-bg); color: var(--mca-text); font: 400 16px/1.4 var(--body, system-ui); }
.mca-form textarea::placeholder { color: var(--mca-muted); }
.mca-form textarea:focus { outline: 2px solid var(--mca-accent); outline-offset: 1px; }
.mca-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--mca-accent); color: var(--mca-on); cursor: pointer; }
.mca-form.is-busy .mca-send { opacity: .5; }
.mca-note { margin: 0; padding: 8px 16px 12px; font-size: 12px; line-height: 1.45; color: var(--mca-muted); background: var(--mca-surface); }
.mca-note a { color: inherit; font-weight: 600; text-decoration: underline; }
.mca-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) {
  .mca-fab__label { display: none; } .mca-fab { width: 56px; padding: 0; justify-content: center; }
  .mca-panel { inset: 0; left: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .mca-log { padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .mca-panel, .mca-msg, .mca-typing span, .mca-fab { animation: none; transition: none; } .mca-log { scroll-behavior: auto; } }
