/* Notification bell shake — admin toolbar + client chat FAB */
@keyframes bellShake{
  0%,100%{transform:rotate(0)}
  12%{transform:rotate(16deg)}
  24%{transform:rotate(-14deg)}
  36%{transform:rotate(12deg)}
  48%{transform:rotate(-10deg)}
  60%{transform:rotate(7deg)}
  72%{transform:rotate(-5deg)}
  84%{transform:rotate(2deg)}
}
.notify-bell-shake{
  animation:bellShake .65s ease-in-out 1 both;
  transform-origin:50% 0%;
}
.tb-notif-btn{position:relative}
.tb-notif-btn>i.notify-bell-shake{transform-origin:50% 15%}
.portal-chat-fab-inner.notify-bell-shake{transform-origin:50% 50%}
/* Live chat — shared admin + client portal */
.msgs-mode-switch{display:inline-flex;gap:4px;margin-bottom:14px;padding:4px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface2);flex-wrap:nowrap;width:max-content;max-width:100%}
.msgs-mode-switch .msgs-mode-tab{flex:0 1 auto}
.msgs-mode-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap;width:100%}
.msgs-mode-tab{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:var(--radius-sm);border:1px solid transparent;background:transparent;color:var(--text2);font-family:var(--sans);font-size:12px;font-weight:600;cursor:pointer;transition:all .15s var(--ease);white-space:nowrap;line-height:1.25}
.msgs-mode-tab span{line-height:1}
.msgs-mode-tab i{font-size:14px}
.msgs-mode-tab:hover{color:var(--text);background:rgba(255,255,255,.04)}
.msgs-mode-switch .msgs-mode-tab:hover{background:var(--surface)}
.msgs-mode-tab.is-active{background:var(--surface);border-color:var(--border);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.06)}
.msgs-mode-switch .msgs-mode-tab.is-active{background:var(--surface);color:var(--accent);border-color:rgba(26,157,85,.2);box-shadow:0 2px 8px rgba(0,0,0,.06)}
.live-chat-compose-hidden .chat-compose-wrap{display:none}
.live-chat-main.live-chat-no-session .live-chat-main-hd,
.live-chat-main.live-chat-no-session .live-chat-name-warn{display:none!important}
.live-chat-main.live-chat-no-session .live-chat-msgs{background:var(--surface)}
.live-dot-wrap{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:rgba(26,157,85,.12);flex-shrink:0}
.msgs-live-pill,.portal-chat-live-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;background:rgba(26,157,85,.12);color:var(--green);font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.portal-chat-live-badge.live-dot-only,.chat-session-live.live-dot-only{padding:0;width:12px;height:12px;min-width:12px;background:transparent;box-shadow:none;border:2px solid var(--surface)}
.portal-chat-hd-title strong{font-size:16px;letter-spacing:-.02em}
.portal-chat-close-btn,.chat-close-btn{width:34px;height:34px;min-width:34px}
.live-dot{width:7px;height:7px;border-radius:50%;background:var(--green);flex-shrink:0;animation:livePulse 1.6s ease-in-out infinite}
@keyframes livePulse{0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(26,157,85,.45)}50%{opacity:.75;box-shadow:0 0 0 5px rgba(26,157,85,0)}}
.live-chat-layout{display:grid;grid-template-columns:240px 1fr;gap:14px;height:690px;min-height:690px;max-height:min(690px,calc(100vh - 260px))}
.live-chat-sidebar,.live-chat-main{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;height:100%;min-height:0}
.live-chat-sidebar{padding:8px;gap:6px;overflow-y:auto}
.chat-session-item{width:100%;text-align:left;border:1px solid var(--border);background:var(--surface2);border-radius:var(--radius-sm);padding:10px 12px;cursor:pointer;display:flex;flex-direction:column;gap:4px;font-family:var(--sans);transition:border-color .12s,background .12s}
.chat-session-item:hover{border-color:var(--border2)}
.chat-session-item.is-active{border-color:var(--accent);background:var(--accent-soft)}
.chat-session-item.has-unread{background:var(--red-soft);border-left:3px solid var(--red)}
.msgs-tab-badge{min-width:16px;height:16px;padding:0 5px;border-radius:999px;background:var(--red);color:#fff;font-size:9px;font-weight:800;display:none;align-items:center;justify-content:center;line-height:1;flex-shrink:0}
.msgs-tab-badge.show{display:inline-flex}
.chat-session-top{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}
.chat-session-top strong,.chat-session-name{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--text);min-width:0;flex:1}
.chat-session-live{padding:1px 6px;font-size:8.5px;letter-spacing:.03em;flex-shrink:0}
.chat-session-unread{display:none}
.chat-session-empty,.chat-empty{padding:20px 16px;text-align:center;color:var(--text2);font-size:11px;line-height:1.45;font-weight:500;display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;min-height:120px}
.live-chat-sidebar .chat-session-empty{min-height:160px;margin:auto}
.live-chat-msgs:has(> .chat-empty:only-child){justify-content:center;align-items:center}
.live-chat-msgs .chat-empty{margin:0;max-width:320px}
.live-chat-main-hd{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);flex-shrink:0}
.live-chat-name-warn{padding:8px 14px;font-size:12px;font-weight:600;color:#8a5a00;background:#fff8e6;border-bottom:1px solid #f0e0b2;flex-shrink:0}
.live-chat-name-warn[hidden]{display:none!important}
.chat-session-top .chat-session-unread-dot{margin-left:4px}
.chat-session-top .ud{margin-left:4px}
.live-chat-main-hd h3{font-family:var(--display);font-size:15px;font-weight:700;margin:0}
.live-chat-msgs-wrap{flex:1;position:relative;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.live-chat-msgs{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:6px;min-height:0;background:linear-gradient(180deg,var(--bg) 0%,var(--surface) 100%)}
.live-chat-msgs-wrap.is-chat-drag-over .live-chat-msgs,.portal-chat-msgs-wrap.is-chat-drag-over{background:linear-gradient(180deg,var(--accent-soft) 0%,var(--surface) 100%)}
.chat-drop-overlay{position:absolute;inset:12px;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:2px dashed var(--accent);border-radius:var(--radius);background:color-mix(in srgb,var(--surface) 90%,transparent);backdrop-filter:blur(6px);pointer-events:none;animation:chatDropIn .22s cubic-bezier(.22,1,.32,1) both}
.chat-drop-overlay[hidden]{display:none!important}
.chat-drop-overlay i{font-size:34px;color:var(--accent);line-height:1}
.chat-drop-overlay span{font-family:var(--sans);font-size:13px;font-weight:700;color:var(--text);letter-spacing:-.01em}
@keyframes chatDropIn{0%{opacity:0;transform:scale(.97)}100%{opacity:1;transform:scale(1)}}
.chat-bubble-wrap{display:flex;flex-direction:column;max-width:78%}
.chat-bubble-wrap.is-popping{animation:chatPop .28s cubic-bezier(.2,.9,.3,1.1) both}
.chat-bubble-wrap.is-sending{animation:chatSendSnap .2s cubic-bezier(.22,1,.32,1) both}
@keyframes chatSendSnap{0%{opacity:0;transform:translateX(14px) scale(.9)}55%{opacity:1;transform:translateX(-2px) scale(1.03)}100%{opacity:1;transform:translateX(0) scale(1)}}
.chat-bubble-wrap.is-mine{align-self:flex-end;align-items:flex-end}
.chat-bubble-wrap.is-theirs{align-self:flex-start;align-items:flex-start}
.chat-bubble{padding:9px 12px 8px;font-family:var(--sans);font-size:13px;line-height:1.45;position:relative;word-break:break-word}
.chat-bubble-mine{background:var(--accent);color:var(--on-accent);border-radius:16px 16px 4px 16px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.chat-bubble-theirs{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:16px 16px 16px 4px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.chat-msg-text{white-space:pre-wrap}
.chat-msg-time{font-size:10px;margin-top:5px;opacity:.72;text-align:right}
.chat-bubble-theirs .chat-msg-time{color:var(--text3);opacity:1;text-align:left}
.chat-msg-img{max-width:220px;max-height:180px;border-radius:10px;display:block;margin-bottom:6px;cursor:pointer}
.chat-bubble-mine .chat-msg-img{border:1px solid rgba(255,255,255,.2)}
@keyframes chatPop{0%{opacity:0;transform:scale(.88) translateY(6px)}100%{opacity:1;transform:scale(1) translateY(0)}}
.chat-compose-bar{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;background:var(--surface2);border-top:1px solid var(--border)}
.chat-compose-bar textarea{flex:1;resize:none;min-height:40px;max-height:120px;padding:10px 12px;border:1px solid transparent;border-radius:20px;background:var(--surface);color:var(--text);font-family:var(--sans);font-size:13px;line-height:1.4;outline:none;transition:border-color .12s,background .12s}
.chat-compose-bar textarea:focus{border-color:var(--border);box-shadow:none;background:var(--surface)}
.chat-compose-bar textarea::placeholder{color:var(--text3)}
.chat-icon-btn{width:38px;height:38px;min-width:38px;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--text2);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;font-size:15px;transition:border-color .12s var(--ease),background .12s var(--ease),color .12s var(--ease),transform .12s var(--ease)}
.chat-icon-btn:hover:not(:disabled):not(.chat-icon-btn-danger):not(.chat-send-btn){border-color:var(--border2);color:var(--text);background:var(--surface2);transform:scale(1.08)}
.chat-icon-btn:disabled{opacity:.45;cursor:not-allowed}
.chat-icon-btn-danger{color:var(--red);border-color:rgba(220,38,38,.35);background:var(--red-soft)}
.chat-icon-btn-danger i{color:var(--red)}
.chat-icon-btn-danger:hover:not(:disabled){background:var(--red);border-color:var(--red);color:#fff;transform:scale(1.08)}
.chat-icon-btn-danger:hover:not(:disabled) i{color:#fff}
.chat-icon-btn-danger:disabled{opacity:.4;cursor:not-allowed}
.chat-send-btn{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.chat-send-btn:hover:not(:disabled){background:var(--accent2);border-color:var(--accent2);color:var(--on-accent);transform:scale(1.08)}
.chat-hd-actions{display:flex;align-items:center;gap:6px}
/* Header close/delete match compose upload/send action icons */
.live-chat-main-hd .chat-hd-actions .chat-icon-btn{
  width:38px;height:38px;min-width:38px;border-radius:50%;
  border:1px solid var(--border);background:var(--surface);color:var(--text2);
}
.live-chat-main-hd .chat-hd-actions .chat-icon-btn:hover:not(:disabled){
  border-color:var(--border2);color:var(--text);background:var(--surface2);transform:scale(1.08);
}
.live-chat-main-hd .chat-hd-actions .chat-icon-btn:disabled{opacity:.45;cursor:not-allowed}
.chat-compose-wrap{display:flex;flex-direction:column;flex-shrink:0}
.chat-upload-status{padding:8px 12px 0;background:var(--surface2);border-top:1px solid var(--border)}
.chat-upload-bar{height:4px;border-radius:999px;background:var(--border);overflow:hidden;margin-bottom:6px}
.chat-upload-fill{height:100%;width:0;background:var(--accent);border-radius:999px;transition:width .15s ease}
.chat-upload-label{display:block;font-size:11px;color:var(--text2);font-family:var(--sans);padding-bottom:4px}
.chat-icon-btn.is-uploading{opacity:.65}
.chat-close-btn{background:var(--surface2)}
.live-chat-main-hd .portal-chat-hd-brand{display:flex;align-items:center;gap:10px}
.admin-chat-hd-brand{display:flex;align-items:center;gap:10px}
.admin-chat-hd-title-wrap{min-width:0}
.admin-chat-hd-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-chat-hd-title-row h3{margin:0}
.admin-chat-live-pill{padding:2px 8px;font-size:9px;flex-shrink:0}
.admin-chat-hd-icon{width:36px;height:36px;border-radius:10px;background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
@media(max-width:900px){.live-chat-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,min(180px,28vh)) minmax(0,1fr)}}
/* Portal widget */
#portal-chat-root{position:fixed;right:var(--chat-fab-right,max(20px,env(safe-area-inset-right,0px)));bottom:var(--chat-fab-bottom,max(20px,env(safe-area-inset-bottom,0px)));z-index:900;font-family:var(--sans);display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.portal-chat-stack{position:relative;display:flex;flex-direction:column;align-items:flex-end}
.portal-chat-msgs-wrap{position:relative;flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.portal-chat-fab-anchor{position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;z-index:2}
.portal-chat-float-bubble{position:absolute;right:0;bottom:100%;margin-bottom:10px;width:max-content;max-width:min(300px,calc(100vw - 40px));display:none;align-items:center;gap:9px;padding:7px 11px 7px 8px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);box-shadow:0 8px 24px rgba(0,0,0,.1);animation:floatBubbleIn .4s cubic-bezier(.22,1,.32,1) both;pointer-events:none;z-index:1}
.portal-chat-float-bubble:not([hidden]){display:flex!important}
.portal-chat-float-bubble.is-fading{animation:floatBubbleOut .42s ease forwards}
.portal-chat-float-ico-wrap{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9px;background:linear-gradient(145deg,var(--accent-soft),color-mix(in srgb,var(--accent) 14%,transparent));flex-shrink:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.portal-chat-float-bubble i{font-size:14px;flex-shrink:0;line-height:1}
.portal-chat-float-bubble .portal-chat-float-ico-wrap i{color:var(--accent)}
.portal-chat-float-bubble span{flex:0 1 auto;max-width:240px;font-size:12.5px;font-weight:600;color:var(--text);line-height:1.35;white-space:normal;word-break:break-word}
@keyframes floatBubbleIn{0%{opacity:0;transform:translateY(6px) scale(.96)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes floatBubbleOut{to{opacity:0;transform:translateY(4px) scale(.97)}}
.portal-chat-fab-count{position:absolute;top:-6px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--red);color:#fff;font-size:11px;font-weight:800;display:none;align-items:center;justify-content:center;line-height:1;border:1px solid var(--red);box-shadow:0 2px 8px rgba(0,0,0,.18);z-index:8;pointer-events:none}
.portal-chat-fab-count.show{display:flex}
.portal-chat-fab{display:inline-flex;align-items:center;gap:10px;padding:0;border:none;background:transparent;cursor:pointer;position:relative;z-index:6}
@keyframes chatFabIconOutline{
  0%{outline:2px solid rgba(255,255,255,.9);outline-offset:2px;border-radius:6px}
  100%{outline:2px solid transparent;outline-offset:8px;border-radius:6px}
}
@keyframes chatFabIconOutlineOpen{
  0%{outline:2px solid rgba(255,255,255,.55);outline-offset:2px;border-radius:6px}
  100%{outline:2px solid transparent;outline-offset:8px;border-radius:6px}
}
.portal-chat-fab-inner{display:inline-flex;align-items:center;gap:8px;padding:12px 18px;border-radius:var(--radius-sm);background:var(--accent);color:var(--on-accent);font-weight:700;font-size:13px;letter-spacing:.01em;box-shadow:0 8px 28px rgba(0,0,0,.18);transition:box-shadow .15s var(--ease);transform:none}
.portal-chat-fab-label{display:inline;white-space:nowrap;line-height:1}
.portal-chat-fab-icon-wrap{position:relative;width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;transform-origin:50% 50%;outline:none;border-radius:6px}
.portal-chat-fab-icon-wrap i{font-size:17px;line-height:1;position:absolute;inset:0;display:inline-flex;align-items:center;justify-content:center;transition:opacity .15s var(--ease)}
.portal-chat-fab-icon-wrap .chat-fab-icon-line{opacity:0}
.portal-chat-fab:hover .portal-chat-fab-icon-wrap .chat-fab-icon-fill{opacity:0}
.portal-chat-fab:hover .portal-chat-fab-icon-wrap .chat-fab-icon-line{opacity:1}
.portal-chat-fab-icon-wrap.chat-fab-icon-tap{animation:chatFabIconOutline .48s ease-out}
.portal-chat-fab.is-open .portal-chat-fab-icon-wrap.chat-fab-icon-tap{animation:chatFabIconOutlineOpen .48s ease-out}
.portal-chat-fab:hover:not(.is-open) .portal-chat-fab-inner{box-shadow:0 10px 30px rgba(0,0,0,.2)}
.portal-chat-fab:active .portal-chat-fab-inner,.portal-chat-fab.is-open .portal-chat-fab-inner{transform:none}
.portal-chat-fab:hover,.portal-chat-fab:focus-visible{z-index:7}
.portal-chat-fab.is-open .portal-chat-fab-inner{background:var(--text);color:#fff}
.portal-chat-panel{position:absolute;right:0;bottom:calc(100% + 12px);width:min(392px,calc(100vw - 40px));height:460px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow-lg);display:none;flex-direction:column;overflow:hidden;transform-origin:bottom right}
.portal-chat-panel.is-open,.portal-chat-panel.is-closing{flex-direction:column}
.portal-chat-panel.is-open{display:flex;animation:panelSlide .24s ease both}
.portal-chat-panel.is-closing{display:flex;animation:panelSlideOut .22s ease both}
@keyframes panelSlide{0%{opacity:0;transform:translateY(10px) scale(.98)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes panelSlideOut{0%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(10px) scale(.98)}}
.portal-chat-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);background:linear-gradient(135deg,var(--accent-soft) 0%,var(--surface) 72%);padding:14px 14px 12px}
.admin-chat-live-dot{padding:0;background:transparent;box-shadow:none;width:auto;height:auto}
.portal-chat-compose{background:var(--surface);border-top:1px solid var(--border);border-radius:0 0 var(--radius-sm) var(--radius-sm)}
.portal-chat-hd-brand{display:flex;align-items:center;gap:10px;min-width:0}
.portal-chat-hd-icon{width:36px;height:36px;border-radius:10px;background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.portal-chat-hd-title-row{display:flex;align-items:center;gap:8px}
.portal-chat-hd-title strong{display:block;font-family:var(--display);font-size:15px;font-weight:700;color:var(--text);line-height:1.2}
.portal-chat-hd-live{padding:0;background:transparent;width:auto;height:auto}
.portal-chat-hd-title .t-xs{margin-top:2px;line-height:1.35}
.portal-chat-hd-detail{font-size:10.5px;color:var(--text2);margin-top:4px;line-height:1.4}
.portal-chat-hd-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.portal-chat-msgs{flex:1;overflow-y:auto;padding:14px;padding-top:12px;display:flex;flex-direction:column;gap:6px;background:linear-gradient(180deg,var(--bg) 0%,var(--surface) 100%)}
.portal-chat-msgs .chat-bubble-wrap.is-sending{animation:chatSendSnap .2s cubic-bezier(.22,1,.32,1) both}
.portal-chat-msgs .chat-bubble-wrap.is-popping{animation:chatPop .28s cubic-bezier(.2,.9,.3,1.1) both}
.portal-chat-compose .chat-compose-bar{border-top:none;padding:8px 10px}
.portal-chat-compose .chat-upload-status{border-top:1px solid var(--border)}
.chat-send-btn:disabled{opacity:.38;cursor:not-allowed;pointer-events:none}
.portal-chat-msgs .chat-empty{padding:36px 24px;font-size:12.5px;color:var(--text2);max-width:280px;margin:auto;line-height:1.55}
.portal-chat-msgs .chat-bubble-wrap{max-width:85%}
.portal-chat-msgs .chat-bubble{font-size:15px;line-height:1.5}
.portal-chat-msgs .chat-bubble-mine{border-radius:16px 16px 4px 16px;box-shadow:0 2px 8px rgba(0,0,0,.1)}
.portal-chat-msgs .chat-bubble-theirs{border-radius:16px 16px 16px 4px;background:var(--surface2)}
.portal-chat-compose .chat-compose-bar textarea{font-size:14px}
.portal-chat-close-btn{border-radius:50%}
.portal-chat-close-btn:hover{background:var(--surface);color:var(--text);border-color:var(--border2)}
#msgs-panel-live{margin-top:0}
:root{
  --chat-fab-clearance:72px;
  --chat-fab-bottom:max(20px,env(safe-area-inset-bottom,0px));
  --chat-fab-right:max(20px,env(safe-area-inset-right,0px));
}
body:has(.modal-overlay.open) #portal-chat-root,
body:has(#custom-confirm.open) #portal-chat-root{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
body.portal-app:has(#portal-chat-root) .main{
  padding-bottom:calc(var(--chat-fab-clearance) + var(--chat-fab-bottom));
}
body.portal-app:has(#portal-chat-root) .toast{
  bottom:calc(var(--chat-fab-clearance) + var(--chat-fab-bottom) + 8px);
  right:max(18px,env(safe-area-inset-right,0px));
}
@media(max-width:900px){
  .live-chat-layout{height:min(58vh,510px);min-height:min(58vh,510px);max-height:min(58vh,510px)}
  .live-chat-sidebar{max-height:none;flex-shrink:0;overflow-y:auto}
  .live-chat-main{min-height:0;height:100%}
  .live-chat-msgs-wrap{flex:1;min-height:0;max-height:none}
  .live-chat-msgs{min-height:0;max-height:none}
  #msg-detail-foot .btn{flex:0 1 auto;width:auto}
}
@media(max-width:640px){
  :root{
    --chat-fab-clearance:72px;
    --chat-fab-bottom:max(12px,env(safe-area-inset-bottom,0px));
    --chat-fab-right:max(12px,env(safe-area-inset-right,0px));
  }
  .portal-chat-fab-inner{
    padding:10px 14px;
    gap:8px;
    border-radius:var(--radius-sm);
  }
  .portal-chat-fab-label{
    display:inline!important;
    font-size:13px;
  }
  .portal-chat-panel{
    position:absolute;
    right:0;
    left:auto;
    bottom:calc(100% + 12px);
    width:min(392px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px);
    height:min(460px,calc(100dvh - var(--topbar-h,56px) - var(--chat-fab-clearance) - 32px));
    border-radius:var(--radius-sm);
  }
  .portal-chat-float-bubble{max-width:calc(100vw - 80px)}
  .chat-compose-bar{padding:8px 10px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
  #portal-chat-panel.is-open{
    position:fixed!important;
    inset:0!important;
    left:0!important;
    right:0!important;
    top:0!important;
    bottom:0!important;
    width:100%!important;
    max-width:100%!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
    z-index:320!important;
    transform-origin:center bottom;
    animation:portalChatMobileIn .28s cubic-bezier(.22,1,.32,1) both!important;
  }
  #portal-chat-panel.is-open.is-closing{
    animation:portalChatMobileOut .24s cubic-bezier(.4,0,.2,1) both!important;
  }
  @keyframes portalChatMobileIn{
    0%{opacity:0;transform:translateY(18px) scale(.98)}
    100%{opacity:1;transform:translateY(0) scale(1)}
  }
  @keyframes portalChatMobileOut{
    0%{opacity:1;transform:translateY(0) scale(1)}
    100%{opacity:0;transform:translateY(18px) scale(.98)}
  }
  .live-chat-layout.live-chat-has-session .live-chat-main{
    animation:liveChatMainIn .26s cubic-bezier(.22,1,.32,1) both;
  }
  @keyframes liveChatMainIn{
    0%{opacity:0;transform:translateX(12px)}
    100%{opacity:1;transform:translateX(0)}
  }
  #portal-chat-root:has(#portal-chat-panel.is-open) .portal-chat-fab{
    opacity:0;
    pointer-events:none;
  }
  body.portal-app:has(#portal-chat-panel.is-open) .main{
    padding-bottom:0;
  }
}
