/* TAMANHORDER V400 — unified private customer/staff chat */
.ta-chat-editor{border:1px solid #b8cde5;border-radius:14px;overflow:hidden;background:#fff;max-width:100%;font:14px/1.5 system-ui,'Segoe UI',Arial,sans-serif;color:#123b61}
.ta-chat-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px 9px;background:#f3f8ff;border-bottom:1px solid #dce7f4}
.ta-chat-toolbar button{font:700 14px system-ui,sans-serif;display:inline-flex;align-items:center;justify-content:center;min-width:33px;min-height:33px;padding:4px 8px;border:1px solid #d5e5f2;border-radius:8px;background:white;color:#184f82;cursor:pointer;line-height:1}
.ta-chat-toolbar button:hover,.ta-chat-toolbar button:focus-visible{background:#d8ebff;outline-color:#1474c5}
.ta-chat-toolbar button[data-rich="bold"]{font-weight:900}.ta-chat-toolbar button[data-rich="italic"]{font-style:italic}.ta-chat-toolbar button[data-rich="underline"]{text-decoration:underline}
.ta-chat-toolbar button[data-rich="strike"]{text-decoration:line-through}
.ta-chat-toolbar .ta-chat-attach{margin-left:auto;gap:5px;font-size:12px;white-space:nowrap}
.ta-chat-emoji-panel{padding:7px;background:#fff;border-bottom:1px solid #dce7f4;display:flex;gap:3px;flex-wrap:wrap}
.ta-chat-emoji-panel[hidden]{display:none!important}.ta-chat-emoji-panel button{min-height:30px;min-width:34px;border:0;border-radius:7px;background:#f1f6ff;cursor:pointer;font-size:19px}
.ta-chat-editor textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;min-height:82px;border:0!important;border-radius:0!important;padding:12px!important;background:#fff!important;outline-offset:-3px;color:#132f49;font:inherit}
.ta-chat-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;padding:0 10px 8px}
.ta-chat-files:empty{display:none}.ta-chat-file{position:relative;background:#f5f9ff;border:1px solid #d5e4f5;border-radius:10px;padding:5px;text-align:center;min-width:0}
.ta-chat-file img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px}.ta-chat-file small{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ta-chat-file button{position:absolute;right:1px;top:1px;border:0;background:#a52c28;color:white;border-radius:50%;width:22px;height:22px;cursor:pointer}
.ta-chat-tip{margin:0!important;padding:0 10px 9px!important;font-size:11px!important;color:#677d91!important}
.ta-chat-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.ta-chat-content strong{font-weight:850}.ta-chat-content u{text-underline-offset:3px}
.ta-chat-media{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}.ta-chat-media button{padding:3px;border:1px solid #d5e5f5;background:#fff;border-radius:9px;cursor:pointer;overflow:hidden}
.ta-chat-media img{width:100px;height:100px;object-fit:cover;border-radius:7px;display:block}.ta-chat-media .ta-chat-media-wait{width:100px;height:100px;display:grid;place-items:center;color:#6a849e;font-size:11px}
.ta-v393-inbox-modal{width:min(650px,100%)!important}.ta-v393-compose{gap:9px!important}.ta-v393-compose>button[type="submit"]{background:#f97316;border-radius:10px;padding:11px 19px}
.ta-v393-inbox-list .ta-v393-msg{max-width:88%}.ta-v393-inbox-list .ta-v393-msg p{margin:0}.ta-v393-inbox-list .ta-v393-msg.mine{background:#e6f5ff;border-color:#bcdff8}
.ta-chat-staff{display:grid;grid-template-columns:250px minmax(0,1fr);gap:14px;margin-top:12px;min-height:450px}
.ta-chat-staff-people{min-width:0;max-height:630px;overflow:auto;border:1px solid #d8e5f4;background:#f8fbff;border-radius:14px;padding:7px}
.ta-chat-staff-person{display:flex;width:100%;border:0;background:transparent;text-align:left;padding:12px 11px;border-radius:10px;cursor:pointer;margin:3px 0;color:#183d68;gap:9px;align-items:center;font:inherit}
.ta-chat-staff-person strong{display:block;font-size:13px}.ta-chat-staff-person small{display:block;font-size:11px;color:#698098;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px}.ta-chat-staff-person.active{background:#dcebff;outline:1px solid #a5c9ed}
.ta-chat-staff-avatar{display:grid;place-items:center;width:33px;height:33px;flex-shrink:0;border-radius:50%;background:#1467ab;color:white;font-weight:800}
.ta-chat-staff-main{border:1px solid #d8e5f4;border-radius:14px;background:white;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.ta-chat-staff-title{padding:13px 16px;background:#0d4b84;color:white;font-size:16px;font-weight:750}.ta-chat-staff-title small{font-weight:400;font-size:12px;opacity:.9;display:block;margin-top:2px}
.ta-chat-staff-thread{padding:14px;flex:1;min-height:240px;max-height:410px;overflow:auto;display:flex;flex-direction:column;gap:9px;background:#f7faff}
.ta-chat-staff-item{padding:9px 12px;border:1px solid #dae6f4;border-radius:12px;background:#fff;max-width:85%;align-self:flex-start;overflow-wrap:anywhere}.ta-chat-staff-item.mine{align-self:flex-end;background:#e3f2ff;border-color:#bfdbef}
.ta-chat-staff-item>strong{color:#0c5398;font-size:12px}.ta-chat-staff-item time{font-size:10px;display:block;color:#8293a5;margin-top:5px}
.ta-chat-staff-compose{padding:12px;border-top:1px solid #dbe8f4}.ta-chat-staff-compose>button[type="submit"]{background:#f97316;color:white;border:0;border-radius:9px;margin-top:8px;padding:10px 20px;font-weight:750;float:right;cursor:pointer}
.ta-chat-staff-compose::after{content:"";display:block;clear:both}.ta-chat-staff-empty{padding:24px;color:#56728b;text-align:center}
@media(max-width:850px){.ta-chat-staff{grid-template-columns:1fr}.ta-chat-staff-people{display:flex;gap:8px;max-height:125px;overflow:auto}.ta-chat-staff-person{min-width:190px;width:auto}.ta-chat-staff-thread{min-height:260px}}
@media(max-width:600px){.ta-chat-toolbar button{min-width:30px;padding:4px 6px}.ta-chat-toolbar .ta-chat-attach{margin-left:0}.ta-chat-media img,.ta-chat-media .ta-chat-media-wait{width:80px;height:80px}}
/* Override legacy admin button defaults: toolbar stays one compact horizontal row. */
.ta-chat-toolbar{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important}
.ta-chat-toolbar button{display:inline-flex!important;width:auto!important;flex:0 0 auto!important;margin:0!important;max-width:none!important}
.ta-chat-emoji-panel button{display:inline-flex!important;width:auto!important;flex:0 0 35px!important;margin:0!important;align-items:center!important;justify-content:center!important}
.ta-chat-toolbar .ta-chat-attach{margin-left:auto!important}
.ta-chat-staff-compose .ta-chat-editor,.ta-v393-compose .ta-chat-editor{width:100%;box-sizing:border-box}

.ta-chat-lightbox{position:fixed;inset:0;z-index:2147483647;background:rgba(4,15,29,.92);display:grid;place-items:center;padding:24px;box-sizing:border-box;cursor:zoom-out}
.ta-chat-lightbox>img{max-width:94vw;max-height:92vh;object-fit:contain;border-radius:8px;box-shadow:0 10px 40px #0009}
.ta-chat-lightbox-close{position:absolute;right:18px;top:12px;color:#fff;background:#ffffff2a;border:1px solid #fff6;border-radius:50%;width:44px;height:44px;font:34px/1 Arial;cursor:pointer}
.ta-chat-toolbar .ta-chat-template{font-size:11px!important;font-weight:700!important}
