#taa-root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;--taa-bg:#fff;--taa-text:#162235;--taa-line:#d9e2ed;--taa-blue:#205ea8;--taa-muted:#65758a;color:var(--taa-text);font-size:14px}
#taa-root *{box-sizing:border-box}
#taa-root .taa-fab{position:fixed;right:18px;bottom:20px;border:0;border-radius:28px;padding:12px 17px;background:#205ea8;color:#fff;font-weight:700;z-index:2147483000;cursor:pointer;box-shadow:0 4px 14px #0003}
#taa-root .taa-counter{display:inline-block;background:#c52626;color:#fff;border-radius:20px;padding:1px 6px;margin-left:5px;font-size:11px}
#taa-root .taa-panel{position:fixed;right:18px;bottom:75px;width:min(390px,calc(100vw - 24px));height:min(610px,calc(100dvh - 100px));background:var(--taa-bg);border:1px solid var(--taa-line);border-radius:14px;box-shadow:0 12px 38px #18283a33;z-index:2147483000;display:flex;flex-direction:column;overflow:hidden}
#taa-root [hidden]{display:none!important}
#taa-root .taa-head{padding:13px 15px;background:#f4f8fd;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--taa-line)}
#taa-root .taa-tabs{display:flex;border-bottom:1px solid var(--taa-line)}
#taa-root .taa-tabs button{flex:1;padding:11px 4px;border:0;background:white;cursor:pointer;color:#52647b}
#taa-root .taa-tabs button[aria-selected=true]{border-bottom:2px solid var(--taa-blue);color:var(--taa-blue);font-weight:700}
#taa-root .taa-body{flex:1;min-height:0;overflow-y:auto;padding:12px;background:#fff}
#taa-root .taa-msg{margin-bottom:10px;max-width:94%}
#taa-root .taa-msg.own{margin-left:auto}
#taa-root .taa-meta{font-size:11px;color:var(--taa-muted);margin:0 0 4px}
#taa-root .taa-bubble{background:#f1f5fa;border-radius:10px;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere}
#taa-root .taa-msg.own .taa-bubble{background:#e8f1ff}
#taa-root .taa-compose{border-top:1px solid var(--taa-line);padding:8px;display:flex;gap:6px;align-items:flex-end;position:relative}
#taa-root textarea{width:100%;resize:none;min-height:43px;max-height:120px;border:1px solid #c8d5e6;border-radius:8px;padding:9px;font:inherit}
#taa-root button{font:inherit}
#taa-root .taa-action{background:var(--taa-blue);border:0;color:white;border-radius:8px;padding:10px;cursor:pointer}
#taa-root .taa-close{background:none;border:0;font-size:23px;cursor:pointer}
#taa-root .taa-mentions{position:absolute;bottom:62px;left:8px;right:8px;background:#fff;border:1px solid var(--taa-line);box-shadow:0 6px 15px #0002;border-radius:8px;max-height:170px;overflow-y:auto}
#taa-root .taa-mentions button{display:block;width:100%;padding:9px;border:0;background:#fff;text-align:left;cursor:pointer}
#taa-root .taa-mentions button:hover{background:#eaf3ff}
#taa-root .taa-notice{padding:9px 10px;margin-bottom:9px;background:#fff7e6;border-left:3px solid #e09b28;border-radius:6px;overflow-wrap:anywhere}
#taa-root .taa-quiet{color:var(--taa-muted);font-size:12px}
#taa-root .taa-error{color:#a12626;font-size:12px;padding:6px}
@media(max-width:600px){#taa-root .taa-fab{bottom:76px;right:12px}#taa-root .taa-panel{left:0;right:0;top:0;bottom:0;width:100vw;height:100dvh;border-radius:0;z-index:2147483500}}


/* Mobile layout + mention toast — additive, no Worker changes */
#taa-root .taa-head{min-width:0;gap:8px}
#taa-root .taa-head .taa-title{flex:1;min-width:0;font-weight:750;font-size:clamp(14px,3.8vw,17px);line-height:1.25;white-space:normal;overflow-wrap:normal}
#taa-root .taa-head .taa-sound,#taa-root .taa-head .taa-close{flex:0 0 36px;min-width:36px;width:36px;height:36px;display:grid;place-items:center;border:1px solid #dae3ef;border-radius:10px;background:white;padding:0;line-height:1;cursor:pointer}
#taa-root .taa-tabs{min-width:0;flex-shrink:0}
#taa-root .taa-tabs button{min-width:0;white-space:nowrap;font-size:clamp(12px,3.5vw,14px);padding:12px 2px}
#taa-root .taa-compose{min-width:0;flex-shrink:0;align-items:stretch;padding:10px;gap:8px;background:#fff}
#taa-root .taa-compose textarea{flex:1 1 auto;min-width:0;width:auto;min-height:46px;line-height:1.35;font-size:16px}
#taa-root .taa-compose .taa-action{flex:0 0 66px;min-width:66px;width:66px;min-height:46px;white-space:nowrap;text-align:center;font-weight:650;padding:8px 10px}
#taa-root .taa-body{min-width:0;overflow-x:hidden;overscroll-behavior:contain}
#taa-root .taa-meta,#taa-root .taa-bubble{max-width:100%;overflow-wrap:anywhere}
#taa-root .taa-mention-toast{position:fixed;z-index:2147483600;top:20px;right:18px;width:min(350px,calc(100vw - 24px));background:#fff;border:1px solid #c7d8eb;border-left:4px solid #205ea8;border-radius:13px;padding:14px;box-shadow:0 10px 35px #102f5038;color:#162235;font-size:14px;overflow-wrap:anywhere}
#taa-root .taa-mention-toast[hidden]{display:none!important}
#taa-root .taa-toast-body{margin-top:6px;line-height:1.45;max-height:76px;overflow:hidden}
#taa-root .taa-toast-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}
#taa-root .taa-toast-actions button{border:1px solid #c7d8eb;padding:8px 10px;border-radius:8px;background:#fff;color:#205ea8;cursor:pointer}
#taa-root .taa-toast-actions .taa-toast-view{color:#fff;background:#205ea8;border-color:#205ea8}
#taa-root .taa-notice-open{margin-left:8px}
#taa-root .taa-message-focus .taa-bubble{outline:3px solid #f0b847;outline-offset:2px}
@media(max-width:600px){
 #taa-root .taa-panel{position:fixed;left:0;right:0;top:var(--taa-viewport-top,0px);bottom:auto;width:100%;max-width:100%;height:var(--taa-viewport-height,100dvh);max-height:var(--taa-viewport-height,100dvh);border-radius:0;overflow:hidden}
 #taa-root .taa-head{padding:12px 12px;min-height:58px;padding-top:max(12px,env(safe-area-inset-top,0px))}
 #taa-root .taa-head .taa-title{font-size:clamp(14px,4vw,17px)}
 #taa-root .taa-head .taa-sound,#taa-root .taa-head .taa-close{flex-basis:36px}
 #taa-root .taa-body{padding:12px 14px}
 #taa-root .taa-msg{max-width:100%}
 #taa-root .taa-compose{padding:9px 10px max(9px,env(safe-area-inset-bottom,0px))}
 #taa-root .taa-compose textarea{max-height:92px}
 #taa-root .taa-mention-toast{top:calc(var(--taa-viewport-top,0px) + 12px);left:12px;right:12px;width:auto;max-width:none}
}

/* THANH_AN_PC_RIGHT_MOBILE_V2_20261122: Desktop positioning isolated from mobile */
@media screen and (min-width: 601px) {
  #taa-root .taa-panel {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    right: 18px !important;
    bottom: 75px !important;
    width: min(390px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    height: min(610px, calc(100dvh - 100px)) !important;
    max-height: calc(100dvh - 100px) !important;
    border-radius: 14px !important;
  }
  #taa-root .taa-fab {
    position: fixed !important;
    left: auto !important;
    right: 18px !important;
    bottom: 20px !important;
  }
}
@media screen and (max-width: 600px) {
  #taa-root .taa-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: var(--taa-viewport-top, 0px) !important;
    bottom: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: var(--taa-viewport-height, 100dvh) !important;
    max-height: var(--taa-viewport-height, 100dvh) !important;
    border-radius: 0 !important;
  }
  #taa-root .taa-head { min-width: 0 !important; gap: 7px !important; padding-left: 10px !important; padding-right: 10px !important; }
  #taa-root .taa-head .taa-title { flex: 1 1 0 !important; min-width: 0 !important; max-width: none !important; font-size: clamp(13px, 3.6vw, 17px) !important; overflow-wrap: anywhere !important; }
  #taa-root .taa-tabs { min-width: 0 !important; }
  #taa-root .taa-tabs button { flex:1 1 0 !important; min-width: 0 !important; padding: 10px 2px !important; font-size: clamp(11px, 3.3vw, 14px) !important; }
  #taa-root .taa-compose { display: flex !important; min-width: 0 !important; gap: 8px !important; align-items: stretch !important; }
  #taa-root .taa-compose textarea { width: 0 !important; min-width: 0 !important; flex: 1 1 0 !important; font-size: 16px !important; }
  #taa-root .taa-compose .taa-action { display: flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 64px !important; min-width: 64px !important; width: 64px !important; white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important; }
}

/* THANH_AN_CHAT_PC_LEFT_MOBILE_BELL_V3_20261122: Desktop LEFT + iPhone full header and single-line Send */
@media (min-width:601px){
#taa-root .taa-panel{position:fixed!important;left:18px!important;right:auto!important;top:auto!important;bottom:75px!important;width:min(390px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;height:min(610px,calc(100dvh - 100px))!important;max-height:calc(100dvh - 100px)!important;border-radius:14px!important}
#taa-root .taa-fab{position:fixed!important;left:18px!important;right:auto!important;bottom:20px!important}
}
@media (max-width:600px){
#taa-root .taa-panel{position:fixed!important;left:0!important;right:0!important;top:var(--taa-viewport-top,0px)!important;bottom:auto!important;width:100%!important;max-width:100%!important;height:var(--taa-viewport-height,100dvh)!important;max-height:var(--taa-viewport-height,100dvh)!important;border-radius:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#taa-root .taa-panel[hidden]{display:none!important}
#taa-root .taa-head{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-width:0!important;padding:10px 12px!important;min-height:58px!important}
#taa-root .taa-head .taa-title{display:block!important;flex:1 1 0!important;min-width:0!important;margin:0!important;font-size:clamp(13px,3.7vw,16px)!important;line-height:1.3!important;white-space:normal!important}
#taa-root .taa-head .taa-sound,#taa-root .taa-head .taa-close{display:flex!important;align-items:center!important;justify-content:center!important;visibility:visible!important;opacity:1!important;position:static!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;margin:0!important;padding:0!important;font-size:19px!important;line-height:1!important;white-space:nowrap!important;word-break:keep-all!important;overflow:hidden!important}
#taa-root .taa-tabs{display:flex!important;flex:0 0 auto!important;min-width:0!important}
#taa-root .taa-tabs button{flex:1 1 0!important;min-width:0!important;white-space:nowrap!important;font-size:clamp(11px,3.35vw,14px)!important;padding:11px 2px!important}
#taa-root .taa-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
#taa-root .taa-compose{display:flex!important;flex:0 0 auto!important;min-width:0!important;gap:8px!important;align-items:stretch!important;padding:8px 10px max(8px,env(safe-area-inset-bottom,0px))!important}
#taa-root .taa-compose textarea{display:block!important;flex:1 1 0!important;min-width:0!important;width:0!important;max-width:none!important;font-size:16px!important}
#taa-root .taa-compose .taa-action{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 64px!important;width:64px!important;min-width:64px!important;max-width:64px!important;white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;font-size:16px!important;line-height:1!important;padding:8px!important}
}