/* Takeaway Pacific · chat above the keyboard (shared/chat-fit.js sets the variables and classes).
   The chat sits inside the visible area and shrinks to it: the message list gets smaller, the heading
   and Close stay on screen, the send bar sits on the keyboard. Without html.tp-vv nothing changes. */

/* Customer: Messages per order (index.html #chat, css/trip.css) */
html.tp-vv #chat{--tp-chat-h:min(82svh,640px,var(--tp-vv-h));top:calc(var(--tp-vv-top) + var(--tp-vv-h) - var(--tp-chat-h));bottom:auto;height:var(--tp-chat-h)}
html.tp-kb #chat .chat-bar{padding-bottom:8px}
html.tp-vv-short #chat .grab,html.tp-vv-short #chat .chat-quick,html.tp-vv-short #chat .chat-top small{display:none}
html.tp-vv-short #chat .chat-top{padding-top:12px;padding-bottom:4px}
html.tp-vv-short #chat .chat-top h2{font-size:18px}

/* Staff: per-trip chat #tpchat and driver ⇄ base chat #tpbchat (app/css/tp-r3-css-2.css .tpchat) */
html.tp-vv .tpsheet.tpchat{top:var(--tp-vv-top);bottom:auto;height:var(--tp-vv-h)}
html.tp-vv .tpchat form{height:min(80dvh,640px,100%);max-height:100%}
html.tp-kb .tpchat form{padding-bottom:10px}
html.tp-kb .tpchat .tpmsgs{min-height:0}
html.tp-vv-short .tpchat form{padding-top:10px}
html.tp-vv-short .tpchat .tpquick,html.tp-vv-short .tpchat .tpchh small{display:none}
html.tp-vv-short .tpchat .tpchh h2{font-size:18px}
html.tp-vv-short .tpchat .tpmsgs{margin:6px -4px}
