/* Compact conversation header. The bottom blue AI / Send control remains the
   single entry to staff assistance on both desktop and mobile. */
/* Let a wrapped desktop header occupy its real height, instead of being
   centered inside the old fixed 64px grid row and clipped above the screen. */
@media(min-width:769px){
 #inbox .chat-panel{grid-template-rows:auto minmax(0,1fr) auto auto}
}
#inbox .chat-panel:has(> #facebookWindowNotice){grid-template-rows:auto auto minmax(0,1fr) auto auto!important}
@media(max-width:768px){
 #chatHead.chat-head:not(.empty){
  display:grid!important;grid-template-columns:34px minmax(0,1fr) 34px;
  grid-auto-rows:max-content;align-content:start!important;align-items:center;
  min-height:0!important;height:auto!important;gap:5px 6px!important;padding:6px 8px!important;
 }
 #chatHead .mobile-chat-back,#chatHead .mobile-detail-btn{height:34px;min-height:34px;width:34px;padding:0;border-radius:9px}
 #chatHead .chat-person{min-width:0;gap:7px}
 #chatHead .chat-person .avatar{width:34px;height:34px;flex-basis:34px;border-radius:9px}
 #chatHead .chat-person b{line-height:1.35;font-size:14px!important}
 #chatHead .chat-person>div:last-child>span{display:block;line-height:1.35;font-size:10px}
 #chatHead .chat-person .team-state{padding:1px 4px;margin:0;font-size:9px}
 #chatHead .chat-team-actions{
  display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
  grid-column:1/-1;gap:4px!important;width:100%;margin:0!important;padding:0!important;align-items:stretch!important;
  overflow:visible!important;flex-wrap:nowrap!important;
 }
 #chatHead .chat-team-actions button{
  min-width:0;width:100%;min-height:36px;margin:0!important;padding:4px 3px!important;
  border-radius:8px;font-size:clamp(10px,2.85vw,12px)!important;font-weight:650;line-height:1.3;
  white-space:normal!important;text-wrap:balance;display:flex;align-items:center;justify-content:center;gap:2px;
 }
 #chatHead .chat-team-actions button span{display:inline;min-width:0}
 #chatHead .mode-switch{
  grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  width:100%;min-width:0;gap:3px;margin:0!important;padding:3px;border-radius:10px;
 }
 #chatHead .mode-switch button{min-width:0;min-height:28px;padding:4px 2px;font-size:11px;line-height:1.3}
 #chatHead .manual-timer-status{grid-column:1/-1;text-align:right;font-size:10px;margin:0;line-height:1.2}
}
/* Shared, unmistakable keyboard cursor, separate from the saved selection. */
.ltn-keyboard-active{outline:2px solid #1663d6!important;outline-offset:-2px;background:#e6f0ff!important;color:#123d76!important}
html[data-theme="dark"] .ltn-keyboard-active{outline-color:#8cbbff!important;background:#25466d!important;color:#eef6ff!important}
.ltn-keyboard-active :is(strong,small,b,span){color:inherit!important}
