/* Shared blue and white theme for the visitor page and service workspace. */
:root{--primary:#2563eb;--ink:#172b4d;--muted:#425875;--line:#d5e1f0;--paper:#f2f6fc;color-scheme:light}
body{background:#f2f6fc;color:var(--ink)}
.sidebar{background:#fff;border-color:var(--line);color:#172b4d}
.brand{color:#1e40af}
.brand-icon,.sidebar .brand-icon,.nav-item b,.unread{background:#2563eb;color:#fff}
.sidebar .brand small,.sidebar .nav-label,.sidebar .profile small,.sidebar .local-note{color:#425875}
.workspace-tag{background:#eff6ff;border-color:#c8daf5;color:#1e40af}.workspace-tag span{color:#365f9d}
.nav-item{color:#425875}.nav-item.active{background:#e6efff;color:#1d4ed8}.nav-item:hover{background:#f0f6ff}
.preview-link{color:#1d4ed8;border-color:var(--line)}
.sidebar .status-dot,.sidebar .profile-dot,.status-dot,.profile-dot{background:#2563eb}
.sidebar .avatar,.avatar,.visitor-summary .avatar,.conversation-item .avatar,.conversation-item:nth-child(n) .avatar,.chat-message .avatar,.tiny-avatar,.empty-icon{background:#e2edff;color:#1e40af}
.topbar{background:#fff;border-color:var(--line)}
.breadcrumb,.breadcrumb strong,.connection,.header-date,.page-heading p,.eyebrow{color:#425875}.breadcrumb span{color:#64748b}.eyebrow:before{background:#2563eb}
.metric,.content-card,.inbox-panel{background:#fff;border-color:var(--line)}.inbox-panel{box-shadow:0 2px 10px #183b6608}
.metric-name,.metric small,.metric small,.filters button,.reply-label,.reply-label span+span,.reply-bottom>span{color:#425875}
.metric-value,.filters button.active{color:#1d4ed8}.metric-icon,.metric:nth-child(n) .metric-icon{background:#e7f0ff;color:#2563eb}
.conversation-panel,.conversation-item{background:#fff}.conversation-item{border-color:#e0e8f3}
.conversation-item:hover{background:#f2f7ff}.conversation-item.active{background:#e7f0ff}.conversation-item.active:before{background:#2563eb}
.list-title h2 span{background:#e2edff;color:#1e40af}
.search{background:#f7faff;border-color:#c8d8ed;color:#425875}.search input{color:#172b4d}
.filters button.active{box-shadow:0 2px #2563eb}
.conversation-meta strong,.thread-identity strong,.visitor-heading,.visitor-section h3,.visitor-summary strong{color:#172b4d}
.conversation-meta time,.conversation-preview,.thread-identity small,.thread-date,.chat-message-label,.system-message,.list-footer{color:#425875}
.pill,.pill.waiting,.pill.active,.pill.resolved,.pill.demo{background:#eff6ff;border-color:#bdd1ee;color:#1e40af}
.pill.resolved{background:#f1f5f9;border-color:#cbd5e1;color:#475569}.pill.demo{background:#f8fafc;color:#475569}
.list-footer{background:#f8fbff}.list-footer i{background:#2563eb}
.conversation-detail,.thread-log{background:#f5f8fe}.thread-log{scrollbar-color:#b8cce9 transparent}
.thread-header,.reply-area{background:#fff;border-color:var(--line)}
.chat-message-bubble,.chat-message.assistant .chat-message-bubble{background:#fff;border-color:#cedcf0;color:#172b4d}
.chat-message.agent .chat-message-bubble{background:#2563eb;border-color:#2563eb;color:#fff}
.reply-area textarea,input,textarea{background:#fff;border-color:#b9cee9;color:#172b4d}
.search input::placeholder,.reply-area textarea::placeholder,input::placeholder,textarea::placeholder{color:#526886;opacity:1}
input:focus,textarea:focus{border-color:#2563eb;outline-color:#2563eb25}
.reply-bottom>button:first-child,.reply-bottom>#quick-reply,.reply-media-button,.button.subtle,.recall-message{background:#eff6ff;border-color:#bdd1ee;color:#1e40af}
.reply-media-button:hover,.reply-bottom>#quick-reply:hover,.button.subtle:hover,.recall-message:hover{background:#dfeaff;border-color:#8cafe3;color:#1e3a8a}
.button.primary{background:#2563eb;color:#fff}.button.primary:hover{background:#1d4ed8}
.admin-upload-status,.admin-upload-status button,.icon-button{color:#1e40af}
.visitor-panel{background:#f8fbff}.info-line,.info-line span+span,.visitor-tip,.settings-note{color:#334e73}
.visitor-tip,.settings-note{background:#eef5ff;border-color:#cbdcf3}
.quiet,.empty p,.no-results,.footnote,.section-top p,.muted,.faq-item p,.faq-tags,label small,.chart-label,.fact,.quick-reply-help,.quick-reply-option small{color:#425875}
.fact strong{color:#172b4d}.chart-track{background:#e2edff}.chart-fill{background:#2563eb}
dialog{background:#fff;border-color:#c8d8ed;box-shadow:0 20px 90px #183b6625}dialog::backdrop{background:#172b4d42}
.danger{color:#b42332!important}.message-media{background:#eaf1fc}
#quick-reply-search{background:#f7faff}.quick-reply-row,.quick-reply-option{background:#f5f9ff;border-color:#c8d8ed;color:#172b4d}.quick-reply-option:hover{background:#e7f0ff;border-color:#8cafe3}.quick-reply-feedback{color:#b42332}
.toast{background:#1e40af;color:#fff}
button:focus-visible,a:focus-visible,.recall-message:focus-visible,button,a,input,textarea{outline-color:#2563eb}
.switch{background:#cbd5e1}.switch:checked{background:#2563eb;border-color:#2563eb}
.message-sound{background:#eff6ff;border-color:#bdd1ee;color:#1e40af}.message-sound[data-state="on"]{background:#e2edff;border-color:#a7c5f1;color:#1e40af}.message-sound[data-state="off"]{background:#f1f5f9;color:#475569}
.chat-image,.chat-video{background:#eaf1fc;color:#334e73}
.chat-image-status,.chat-image-retry{color:#334e73}.chat-image-retry,.chat-video-actions>button,.chat-video-start{background:#fff;border-color:#bdd1ee;color:#1e40af}

/* Visitor chat. */
.chat{background:#fff;border-color:#c8d8ed;box-shadow:0 20px 70px #183b661c,0 2px 12px #183b6608}
.chat-header{background:linear-gradient(120deg,#2563eb,#1d4ed8);color:#fff;border-color:#1d4ed8}
.chat-header .avatar{background:#ffffff20;border-color:#ffffff50;color:#fff}
.agent-status{color:#e2edff}.messages{background:#f5f8fe;scrollbar-color:#b8cce9 transparent}
.date,.message-label{color:#425875}.mini-avatar{background:#e2edff;color:#1e40af}
.bubble{background:#fff;color:#172b4d}.user .bubble{background:#2563eb;color:#fff}
.quick-questions button{background:#fff;border-color:#bdd1ee;color:#1e40af}.quick-questions button:hover{background:#e7f0ff;border-color:#8cafe3}
.chat-bottom{background:#fff;border-top-color:var(--line)}.toolbar button,#upload-progress{color:#1e40af}.toolbar button:hover{color:#1d4ed8}
.composer{background:#fff;border-color:#b9cee9}.composer:focus-within{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb15}.composer textarea{color:#172b4d}.composer textarea::placeholder{color:#526886}
.send,.launcher{background:#2563eb;color:#fff}.send:disabled{background:#d7e5f7;color:#526886}.send:not(:disabled):hover,.launcher:hover{background:#1d4ed8}
.typing i{background:#2563eb}.launcher{box-shadow:0 6px 20px #2563eb30}.launcher .live{background:#bfdbfe}
.service-presence{background:#e7f3e8;border-color:#a9ceb1;color:#30633d}.service-presence[data-state="resting"]{background:#fce8e5;border-color:#e5b1a9;color:#a43d32}

@media(max-width:650px){
 .mobile-app-header,.sidebar,.thread-header,.reply-area{background:#fff;border-color:var(--line)}
 .mobile-app-name strong{color:#172b4d}
 .sidebar .nav-item{color:#425875}.sidebar .nav-item.active{background:#e6efff;color:#1d4ed8}.sidebar .nav-item:hover{background:#f0f6ff}.sidebar .nav-item b{background:#2563eb;color:#fff}
 .list-title,.list-tools .icon-button{border-color:var(--line)}
 .mobile-connection{color:#1d4ed8}.mobile-connection:before{background:#2563eb}.mobile-connection.offline{color:#b42332}.mobile-connection.offline:before{background:#b42332}
 .mobile-back,.mobile-visitor-button{background:#eff6ff;border-color:#bdd1ee;color:#1e40af}
 .reply-area textarea{background:#fff;border-color:#b9cee9}.mobile-visitor-dialog .dialog-heading{background:#fff}
 .mobile-message-menu,.mobile-conversation-menu{background:#183b66;color:#fff;box-shadow:0 4px 18px #172b4d30}
}

.voice-message{min-width:112px;max-width:100%}.voice-message audio{display:none}.voice-message-play{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:40px;width:100%;padding:4px 8px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer}.voice-message-wave{font-size:20px;letter-spacing:-3px;min-width:32px}.voice-message.is-playing .voice-message-wave{animation:voice-pulse .75s ease-in-out infinite alternate}.voice-message-play:focus-visible{outline:2px solid currentColor;outline-offset:2px}.voice-message-play:disabled{opacity:.6}@keyframes voice-pulse{from{opacity:.4}to{opacity:1}}@media(prefers-reduced-motion:reduce){.voice-message.is-playing .voice-message-wave{animation:none}}
.voice-compose{display:contents}#voice-mode,#voice-hold,#voice-record-status{display:none}
@media(max-width:650px){
 .voice-compose{display:flex;gap:6px;align-items:stretch;grid-column:1/-1;grid-row:2;min-width:0}
 .voice-compose #reply-input{flex:1;min-width:0;width:0}
 .voice-compose #reply-input[hidden],#voice-hold[hidden]{display:none!important}
 #voice-mode{display:flex;align-items:center;justify-content:center;width:43px;flex:none;padding:4px;border:1px solid #bdd1ee;border-radius:10px;color:#1e40af;background:#eff6ff;font-weight:700;font-size:12px;cursor:pointer}
 #voice-hold:not([hidden]){display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:62px;border:1px solid #bdd1ee;border-radius:10px;background:#eff6ff;color:#1e40af;font-size:15px;font-weight:700;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer}
 #voice-hold.is-recording{background:#dceaff;border-color:#2563eb}#voice-hold.is-cancelling{background:#fee2e2;border-color:#ef4444;color:#991b1b}
 #voice-record-status:not([hidden]){display:flex;align-items:center;gap:5px;min-height:32px;padding:3px 0 7px;font-size:12px;color:#1e40af;font-weight:600}#voice-record-status span{flex:1;min-width:0}#voice-record-status button{border:0;border-radius:6px;padding:6px;color:#1d4ed8;background:#eff6ff;min-height:32px;font-weight:700}
}
@media(max-width:650px) and (max-height:500px){#voice-hold:not([hidden]){min-height:44px}}
@media(max-width:650px){.voice-mode-on .reply-bottom>#reply-send{display:none}}
