/* Shared ticket messenger for account, WordPress and standalone desks. */
.ht.to-chat{--tm-surface:#fff;--tm-border:#dce7f2;--tm-ink:#29445e;--tm-muted:#8b9eb1;--tm-mine:#e1efff;--tm-peer:#fff;overflow:hidden}
.ht.to-chat .tc-composer-heading,.ht.to-chat .tc-compose-note{display:none}
.ht.to-chat .tc-composer{padding:12px 16px!important;background:var(--tm-surface)!important}
.ht.to-chat .tc-messenger-form .to-media-fields{display:none!important}
.ht.to-chat .tc-message-bar{display:flex;align-items:center;gap:10px;min-width:0;direction:rtl;position:relative}
.ht.to-chat .tc-message-bar .tc-reply-label{flex:1;min-width:0;display:block}
.ht.to-chat .tc-message-bar textarea{min-height:44px!important;max-height:112px;resize:none;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:9px 4px!important;font-size:14px!important;color:var(--tm-ink)!important;line-height:1.8}
.ht.to-chat .tc-message-bar button{display:grid;place-items:center;flex-shrink:0;box-sizing:border-box;margin:0;padding:8px!important;width:40px!important;height:40px!important;min-width:40px;border-radius:50%!important;border:0;transform:none;cursor:pointer}
.ht.to-chat .tc-message-tools{display:flex;align-items:center;gap:3px}
.ht.to-chat .tc-message-bar .tc-tool{color:#8a9eaf;background:transparent!important;box-shadow:none}
.ht.to-chat .tc-message-bar svg{width:24px;height:24px;display:block}
.ht.to-chat .tc-message-bar>button[type=submit]{color:white;background:linear-gradient(135deg,#258cff,#1764f4)!important;border-radius:14px!important;box-shadow:0 4px 12px #1769ff25}
.ht.to-chat .tc-message-bar .to-recorder{display:contents!important}
.ht.to-chat .tc-message-bar .to-rec-controls{display:contents!important}
.ht.to-chat .tc-message-bar [data-voice-start]{background:transparent!important;color:#268bdf!important;box-shadow:none!important}
.ht.to-chat .tc-message-bar :is(.to-recorder-head,[data-voice-phase],[data-voice-status]){display:none!important}
.ht.to-chat .tc-message-bar .to-rec-center,.ht.to-chat .tc-message-bar [data-voice-stop]{display:none}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] :is(.to-rec-center,[data-voice-stop]),.ht.to-chat .tc-message-bar [data-recorder-state=permission] .to-rec-center{display:flex;align-items:center;justify-content:center;gap:12px}
.ht.to-chat .tc-message-bar:has([data-recorder-state=recording]) :is(.tc-reply-label,.tc-message-tools),.ht.to-chat .tc-message-bar:has([data-recorder-state=permission]) :is(.tc-reply-label,.tc-message-tools){display:none}
.ht.to-chat .tc-message-bar .to-rec-center{flex:1;color:#318cce}.ht.to-chat .tc-message-bar .to-rec-center time{font-size:13px;letter-spacing:1px}
.ht.to-chat .tc-message-bar .to-rec-signal{height:28px}
.ht.to-chat .tc-message-bar [data-voice-stop]{background:#fce8ed;color:#ef4778}
.ht.to-chat .tc-message-bar .to-voice-message:not([hidden]){flex:1;width:auto;min-width:0;background:transparent!important;box-shadow:none;border:0;padding:0}
.ht.to-chat .tc-message-bar:has([data-recorder-state=ready]) :is(.tc-reply-label,.tc-message-tools,[data-voice-start]){display:none}
.ht.to-chat .tc-message-bar [data-voice-remove]:not([hidden]){font-size:10px;width:auto!important;max-width:65px;color:#df6886;background:transparent;padding:0!important}
.ht.to-chat .tc-send-row{margin-top:6px;justify-content:flex-end}.ht.to-chat .tc-send-row:empty{display:none}.ht.to-chat .ht-sms-switch{font-size:11px}
.ht.to-chat .tc-selected-files{font-size:11px;overflow-wrap:anywhere;color:var(--tm-muted)}.ht.to-chat .tc-selected-files:empty{display:none}
.ht.to-chat .tc-emoji-picker{display:flex;flex-wrap:wrap;gap:6px;padding:8px}.ht.to-chat .tc-emoji-picker[hidden]{display:none!important}.ht.to-chat .tc-emoji-picker button{padding:6px;border:0;background:transparent;font-size:22px;cursor:pointer}
.ht.to-chat .tc-avatar{display:none}.ht.to-chat .tc-message-author{font-size:10px;opacity:.7}
.ht.to-chat .tc-conversation{padding:18px 20px!important;max-height:65dvh;min-height:280px;overflow:auto;overscroll-behavior:contain;background-image:radial-gradient(#92a6b425 1px,transparent 1px)!important;background-size:22px 22px!important}
.ht.to-chat .tc-message-row{max-width:82%;margin-bottom:6px}.ht.to-chat .ht-message{background:var(--tm-peer)!important;border-color:var(--tm-border)!important;border-radius:23px 23px 6px 23px!important;padding:13px 16px 8px!important}
.ht.to-chat .is-mine .ht-message{background:var(--tm-mine)!important;border-radius:23px 23px 23px 6px!important}
.ht.to-chat .ht-message p.tc-message-text{color:var(--tm-ink)!important;font-size:14px!important;line-height:1.9}
html[data-theme=dark] .ht.to-chat{--tm-surface:#192c40;--tm-border:#30465e;--tm-ink:#dce8f6;--tm-muted:#92a9bf;--tm-mine:#234665;--tm-peer:#1e3249}
html[data-theme=dark] .ht.to-chat .tc-conversation{background-color:#101f2e!important}html[data-theme=dark] .ht.to-chat .tc-message-meta time{color:#a0b6ca}
html[data-theme=dark] .ht.to-chat .tc-message-bar .to-voice-message{color:#a9c9df}
@media(max-width:650px){.ht.to-chat .tc-composer{padding:10px 9px!important}.ht.to-chat .tc-message-bar{gap:4px}.ht.to-chat .tc-message-tools{gap:0}.ht.to-chat .tc-message-bar button{width:36px!important;height:36px!important;min-width:36px}.ht.to-chat .tc-message-bar textarea{font-size:13px!important}.ht.to-chat .tc-conversation{padding:15px 12px!important;max-height:60dvh}.ht.to-chat .tc-message-row{max-width:90%}.ht.to-chat .tc-message-row.is-audio{max-width:95%}}
.ht.to-chat .tc-message-bar:has([data-recorder-state=error]){flex-wrap:wrap}.ht.to-chat .tc-message-bar [data-recorder-state=error] [data-voice-status]{display:block!important;flex-basis:100%;color:#df6886;font-size:11px;order:5;margin:4px 0}.ht.to-chat .tc-message-bar [data-recorder-state=permission] [data-voice-phase]{display:block!important;font-size:11px}.ht.to-chat .tc-message-bar .to-recorder [hidden]{display:none!important}
.ht.to-chat .tc-messenger-form.has-text .tc-message-bar [data-recorder-state=idle] [data-voice-start]{display:none!important}
/* Recorder phase visibility must override the generic toolbar button display. */
.ht.to-chat .tc-message-bar [data-voice-stop]{display:none!important}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] [data-voice-stop]{display:grid!important}
.ht.to-chat .tc-message-bar [data-voice-remove]:not([hidden]){width:36px!important;height:36px!important;max-width:36px;min-width:36px;color:#ed6686;background:#fff0f4!important;border-radius:50%!important}
.ht.to-chat .tc-message-bar [data-voice-remove] svg{width:21px;height:21px}
.ht.to-chat .tc-conversation{border-radius:18px;scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto}
.ht.to-chat .tc-conversation::-webkit-scrollbar{width:0;height:0}
.to-ticket-desk,.to-ticket-desk main{scrollbar-width:none}.to-ticket-desk::-webkit-scrollbar,.to-ticket-desk main::-webkit-scrollbar{width:0;height:0}
.ht.to-chat .tc-emoji-picker[hidden]{display:none!important}
.tc-ticket-summary{box-sizing:border-box;max-width:100%;margin:0 0 14px;padding:0;background:transparent}.tc-ticket-summary .ts-ticket-context{border-radius:12px 12px 0 0}.tc-ticket-summary .ts-support-badge{margin:0!important;border-radius:0 0 12px 12px!important;padding:12px 16px}.tc-ticket-summary .ts-support-badge strong{font-size:15px}.ht.to-chat .tc-conversation{border-radius:0!important}.ht.to-chat .tc-message-bar>button[type=submit] svg{width:23px;height:23px}
@media(max-width:650px){.tc-ticket-summary{margin-bottom:10px}.tc-ticket-summary .ts-support-badge{padding:10px 12px}.tc-ticket-summary .ts-ticket-context{flex-wrap:wrap;gap:7px}}
/* Quiet composer focus and compact ticket controls. */
.ht.to-chat .tc-message-bar .tc-reply-label textarea:is(:focus,:focus-visible,:active){border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important}
.ht.to-chat .tc-message-bar .tc-reply-label:focus-within{border:0!important;outline:0!important;box-shadow:none!important}
.ht.to-chat .tc-composer .tc-send-row{min-height:0;margin-top:4px;padding-top:3px}.ht.to-chat .tc-composer .ht-sms-switch{display:inline-flex;align-items:center;gap:8px;margin:0;padding:5px 0;font-size:11px;color:var(--tm-muted)}
.ht.to-chat .tc-manage{padding:0 16px!important;background:var(--tm-surface)!important;border-top:1px solid var(--tm-border)!important}
.ht.to-chat .tc-manage>summary{padding:12px 0;color:var(--tm-muted);font-size:11px;gap:8px}
.ht.to-chat .tc-manage>form{padding:14px!important;margin:0 0 14px!important;background:transparent!important;border:1px solid var(--tm-border)!important;border-radius:14px!important;box-shadow:none!important}
.ht.to-chat .tc-manage .ht-row{display:flex!important;align-items:flex-end;flex-wrap:wrap;gap:12px!important;margin:0!important}
.ht.to-chat .tc-manage .ht-row>label{display:flex;flex:1 1 180px;min-width:0;flex-direction:column;gap:6px;margin:0;font-size:11px;color:var(--tm-muted)}
.ht.to-chat .tc-manage .ht-row select{box-sizing:border-box;width:100%;max-width:100%;height:43px;min-height:43px;padding:8px 12px!important;border:1px solid var(--tm-border)!important;border-radius:10px!important;background-color:var(--tm-surface)!important;color:var(--tm-ink)!important;font:inherit;box-shadow:none!important}
.ht.to-chat .tc-manage .ht-row>button{flex:0 0 auto;display:flex;align-items:center;justify-content:center;min-height:43px;border:0!important;border-radius:10px!important;padding:9px 17px!important;background:#1769ff!important;color:#fff!important;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
.ht.to-chat .tc-manage select:focus-visible{outline:2px solid #4da3ff;outline-offset:2px}
@media(max-width:500px){.ht.to-chat .tc-manage{padding:0 10px!important}.ht.to-chat .tc-manage .ht-row{gap:8px!important}.ht.to-chat .tc-manage .ht-row>label{flex:1 1 calc(50% - 8px);font-size:10px}.ht.to-chat .tc-manage .ht-row>button{width:100%;flex-basis:100%}.ht.to-chat .tc-manage .ht-row select{font-size:11px!important}}
/* Guest-style recording and ready-to-send voice toolbar, tickets only. */
.ht.to-chat .tc-message-bar:has([data-recorder-state=recording]){direction:ltr;gap:12px;min-height:52px}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] [data-voice-start]{display:none!important}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] .to-rec-center{display:flex!important;flex-direction:row!important;align-items:center;justify-content:center;gap:20px;min-width:0;order:2;flex:1}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] .to-rec-center time{order:0;color:#91abc2!important;font-size:12px!important;letter-spacing:0;white-space:nowrap;line-height:1.5}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] .to-rec-signal{order:1;display:flex;align-items:center;justify-content:center;height:30px;width:125px;gap:4px;flex-shrink:1}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] .to-rec-signal i{background:#4da3ff!important;width:4px;min-width:3px;border-radius:4px;box-shadow:none}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] [data-voice-stop]{order:3;background:transparent!important;color:#e86a8b!important;padding:5px!important;width:36px!important;height:36px!important;min-width:36px;box-shadow:none!important}
.ht.to-chat .tc-message-bar [data-recorder-state=recording] [data-voice-stop] svg{width:28px!important;height:28px!important}
.ht.to-chat .tc-message-bar:has([data-recorder-state=recording])>button[type=submit]{order:0}
.ht.to-chat .tc-message-bar:has([data-recorder-state=ready]){direction:ltr;gap:9px;min-height:52px}
.ht.to-chat .tc-message-bar [data-recorder-state=ready] [data-voice-stop]{display:none!important}
.ht.to-chat .tc-message-bar [data-recorder-state=ready] .to-recorded-preview{order:1;flex:1;min-width:0}
.ht.to-chat .tc-message-bar [data-recorder-state=ready] [data-voice-remove]{order:2;margin-left:auto}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-ui{display:flex;align-items:center;direction:ltr;gap:9px}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-heading,.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-meta>span{display:none!important}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-content{display:flex;flex:1;flex-direction:row;align-items:center;min-width:0;gap:12px}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-meta{order:0;flex-shrink:0;margin:0;color:#91abc2;font-size:12px}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-wave{order:1;flex:1;min-width:0;height:30px;margin:0!important}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-toggle{width:34px!important;height:34px!important;min-width:34px!important;padding:8px!important;border-radius:50%!important}
.ht.to-chat .tc-message-bar .to-recorded-preview .to-player-toggle svg{width:18px!important;height:18px!important}
.ht.to-chat .tc-message-bar .to-recorded-preview [data-player-status]:empty{display:none}
/* Fixed geometry prevents inherited sizing from turning the player into an oval. */
.ht.to-chat .tc-message-bar .to-recorded-preview button.to-player-toggle{box-sizing:border-box!important;display:grid!important;place-items:center!important;width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;min-height:34px!important;max-height:34px!important;flex:0 0 34px!important;aspect-ratio:1!important;border-radius:50%!important;transform:none!important;padding:8px!important}
.ht.to-chat .tc-message-bar>button[type=submit]{flex:0 0 40px!important;width:40px!important;height:40px!important;min-height:40px!important;padding:9px!important;transform:none!important}.ht.to-chat .tc-message-bar>button[type=submit] svg{width:22px!important;height:22px!important;transform:none!important}
.ht.to-chat .tc-upload-progress{display:flex;align-items:center;gap:6px;font-size:10px;color:#7c99b2;padding:6px 3px}.ht.to-chat .tc-upload-progress:before{content:'';width:10px;height:10px;border:2px solid #729aba50;border-top-color:#4da3ff;border-radius:50%;animation:tc-upload-spin .8s linear infinite}.ht.to-chat .tc-send-status[hidden]{display:none!important}@keyframes tc-upload-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ht.to-chat .tc-upload-progress:before{animation:none}}
