/* MyABR support chat, staff inbox, help centre, message editor (module M6).
   Builds on portal.css tokens. */
.mp .sp-chat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mp-line); border-radius: var(--mp-radius); overflow: hidden; min-height: 60vh; }
.mp .sp-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--mp-line); flex-wrap: wrap; }
.mp .sp-chat-head .sp-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mp .sp-ai-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--mp-ink); color: var(--mp-mint); display: flex; align-items: center; justify-content: center; flex: none; }
.mp .sp-human-mark { width: 40px; height: 40px; border-radius: 999px; background: var(--mp-mint); color: var(--mp-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; position: relative; }
.mp .sp-human-mark::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 999px; background: var(--mp-done); border: 2px solid #fff; }
.mp .sp-human-mark.is-closed::after { background: #A9A6BF; }
.mp .sp-msgs { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; background: var(--mp-ground); max-height: 62vh; min-height: 320px; }
.mp .sp-msg { display: flex; flex-direction: column; max-width: 86%; }
.mp .sp-msg.is-me { align-self: flex-end; align-items: flex-end; }
.mp .sp-msg.is-system { align-self: center; max-width: 92%; text-align: center; }
.mp .sp-msg .mp-bubble { max-width: 100%; }
.mp .sp-msg .sp-meta { font-size: 12px; color: var(--mp-muted); margin-top: 3px; }
.mp .sp-badge-ai { background: var(--mp-violet-tint); color: var(--mp-violet-text); }
.mp .sp-badge-person { background: var(--mp-done-tint); color: #0B5E4E; }
.mp .sp-suggest { margin-top: 8px; border: 1px dashed var(--mp-violet-line); border-radius: 12px; padding: 10px; background: var(--mp-violet-tint-2); display: flex; flex-direction: column; gap: 8px; }
.mp .sp-suggest-row { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; font-size: 14px; }
.mp .sp-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--mp-line); align-items: flex-end; background: #fff; }
.mp .sp-compose textarea { flex: 1; min-height: 48px; max-height: 140px; resize: none; }
.mp .sp-mic.is-on { background: var(--mp-violet); color: #fff !important; box-shadow: 0 0 0 6px rgba(116,113,232,0.30); }
.mp .sp-status { padding: 12px 16px; border-bottom: 1px solid var(--mp-line); font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.mp .sp-status-wait { background: var(--mp-violet-tint-2); color: var(--mp-violet-text); }
.mp .sp-status-closed { background: var(--mp-amber-tint); color: var(--mp-amber-text); }
.mp .sp-dots span { display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--mp-violet); margin-right: 3px; animation: sp-bounce 1.2s infinite; }
.mp .sp-dots span:nth-child(2) { animation-delay: .15s; } .mp .sp-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes sp-bounce { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.mp .sp-stars { display: flex; gap: 6px; }
.mp .sp-stars label { cursor: pointer; }
.mp .sp-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mp .sp-stars svg { width: 34px; height: 34px; stroke: var(--mp-ink); fill: none; stroke-width: 1.6; }
.mp .sp-stars label.is-on svg { fill: var(--mp-mint); }
.mp .sp-stars input:focus-visible + svg { outline: 3px solid var(--mp-violet); border-radius: 6px; }

/* staff inbox */
.mp .si-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .mp .si-layout { grid-template-columns: 300px minmax(0, 1fr) 300px; } }
.mp .si-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.mp .si-queue a { display: block; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--mp-line); background: #fff; text-decoration: none; color: var(--mp-body); }
.mp .si-queue a.is-active { border-color: var(--mp-ink); box-shadow: 0 0 0 3px var(--mp-violet-tint); }
.mp .si-queue a b { color: var(--mp-ink); display: block; }
.mp .si-summary { background: var(--mp-violet-tint-2); border: 1px solid var(--mp-violet-line); border-radius: 12px; padding: 12px; font-size: 14.5px; }
.mp .si-note { align-self: stretch; max-width: 100%; background: var(--mp-amber-tint); border: 1px dashed #E8C27A; color: var(--mp-amber-text); }

/* help centre */
.hc-hero { background: var(--mp-ink); color: #fff; border-radius: 22px; padding: 28px 20px; display: flex; flex-direction: column; gap: 12px; }
.mp .hc-hero h1 { color: #fff; }
.hc-search { display: flex; gap: 8px; background: #fff; border-radius: 14px; padding: 6px; max-width: 640px; }
.hc-search input { flex: 1; border: 0; outline: 0; font: inherit; padding: 8px 10px; min-width: 0; color: var(--mp-body); }
.mp .hc-cat { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--mp-ink); min-height: 64px; }
.mp .hc-cat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--mp-violet-tint); color: var(--mp-violet-text); display: flex; align-items: center; justify-content: center; flex: none; }
.mp .hc-article { max-width: 760px; }
.mp .hc-article h2 { font-size: 22px; margin: 22px 0 8px; }
.mp .hc-article ul, .mp .hc-article ol { padding-left: 22px; margin: 0 0 12px; }
.mp .hc-article li { margin-bottom: 6px; }
.mp mark { background: var(--mp-violet-tint); color: var(--mp-ink); border-radius: 3px; padding: 0; }
body.hc-public { margin: 0; }
.hc-public-top { background: var(--mp-ink); color: #fff; }
.hc-public-top .hc-in { max-width: 1100px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hc-public-top a { color: #fff !important; text-decoration: none; }
.hc-public-main { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }

/* message editor */
.mp .me-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .mp .me-layout { grid-template-columns: 300px minmax(0, 1fr) 380px; } }
.mp .me-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 75vh; overflow-y: auto; }
.mp .me-list a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--mp-body); border: 1px solid transparent; }
.mp .me-list a:hover { background: var(--mp-violet-tint-2); }
.mp .me-list a.is-active { background: #fff; border-color: var(--mp-ink); }
.mp .me-ch { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-right: 3px; background: var(--mp-line-2); color: var(--mp-muted); }
.mp .me-ch.is-on { background: var(--mp-done-tint); color: #0B5E4E; }
.mp .me-var { cursor: pointer; }
.mp .me-phone { background: var(--mp-ground); border-radius: 20px; padding: 16px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; }
.mp .me-frame { width: 100%; min-height: 520px; border: 1px solid var(--mp-line); border-radius: 12px; background: #fff; }
.mp .me-map td, .mp .me-map th { text-align: center; }
.mp .me-map td:first-child, .mp .me-map th:first-child { text-align: left; }
.mp .me-dot { display: inline-block; width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--mp-line); }
.mp .me-dot.is-on { background: var(--mp-done); border-color: var(--mp-done); }
.mp .me-dot.is-off { background: #fff; border-color: #CDCBE0; }
.mp .mp-chip:has(input:checked) { background: var(--mp-ink); color: #fff !important; border-color: var(--mp-ink); }
.mp .mp-chip:has(input:focus-visible) { outline: 3px solid var(--mp-violet); outline-offset: 2px; }
.hc-hero .mp-eyebrow { color: var(--mp-mint); }
.mp a.mp-chip { color: var(--mp-ink); }
.mp a.mp-chip.is-on { color: #fff; }
