#tc-root *,
#tc-root *::before,
#tc-root *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
} #tc-root {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 2147483647;
font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
font-size: 14px;
line-height: 1.5;
} #tc-root.tc-left {
right: auto;
left: 24px;
}
#tc-root.tc-left .tc-panel {
right: auto;
left: 0;
} #tc-toggle {
position: relative;
width: 60px;
height: 60px;
border-radius: 50%;
background: var(--tc-primary, #E8641A);
border: none;
cursor: pointer;
box-shadow: 0 4px 20px rgba(232, 100, 26, .5), 0 2px 8px rgba(0,0,0,.15);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
transition: transform .25s ease, box-shadow .25s ease;
outline: none;
-webkit-tap-highlight-color: transparent;
}
#tc-toggle:hover {
transform: scale(1.1);
box-shadow: 0 6px 28px rgba(232, 100, 26, .6);
}
#tc-toggle:active {
transform: scale(.95);
} #tc-toggle::before {
content: '';
position: absolute;
inset: -4px;
border-radius: 50%;
border: 2px solid var(--tc-primary, #E8641A);
opacity: 0;
animation: tcPulseRing 2.5s ease-out infinite;
}
#tc-root.tc-open #tc-toggle::before { animation: none; }
@keyframes tcPulseRing {
0%   { transform: scale(.9); opacity: .6; }
80%, 100% { transform: scale(1.3); opacity: 0; }
} .tc-icon-chat,
.tc-icon-close {
display: flex;
align-items: center;
justify-content: center;
transition: opacity .2s, transform .2s;
position: absolute;
}
.tc-icon-close { opacity: 0; transform: rotate(-90deg); }
#tc-root.tc-open .tc-icon-chat  { opacity: 0; transform: rotate(90deg); }
#tc-root.tc-open .tc-icon-close { opacity: 1; transform: rotate(0); } .tc-badge {
position: absolute;
top: -3px;
right: -3px;
background: #ef4444;
color: #fff;
font-size: 11px;
font-weight: 700;
min-width: 20px;
height: 20px;
border-radius: 10px;
padding: 0 5px;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #fff;
}
.tc-badge[hidden] { display: none; } .tc-panel {
position: absolute;
bottom: 72px;
right: 0; width: 380px;
max-width: calc(100vw - 32px);
height: 540px;
max-height: calc(100vh - 110px);
background: #fff;
border-radius: 18px;
box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.1);
display: flex;
flex-direction: column;
overflow: hidden; transform-origin: bottom left; transform: scale(.85) translateY(12px);
opacity: 0;
pointer-events: none;
transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
will-change: transform, opacity;
} #tc-root:not(.tc-left) .tc-panel {
transform-origin: bottom right;
}
#tc-root.tc-open .tc-panel {
transform: scale(1) translateY(0);
opacity: 1;
pointer-events: all;
} .tc-header {
background: #1e3a5f;
color: #fff;
padding: 12px 14px;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
border-radius: 18px 18px 0 0;
gap: 10px;
}
.tc-header-left {
display: flex;
align-items: center;
gap: 10px;
min-width: 0; flex: 1;
}
.tc-header-right {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
} .tc-avatar-wrap {
position: relative;
flex-shrink: 0;
}
.tc-avatar-img {
width: 38px;
height: 38px;
border-radius: 50%;
border: 2px solid rgba(255,255,255,.3);
object-fit: cover;
background: rgba(255,255,255,.1);
display: block;
}
.tc-online-dot {
position: absolute;
bottom: 1px;
right: 1px;
width: 10px;
height: 10px;
border-radius: 50%;
background: #22c55e;
border: 2px solid #1e3a5f;
} .tc-hdr-name {
font-weight: 700;
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tc-hdr-status {
font-size: 11px;
opacity: .75;
display: flex;
align-items: center;
gap: 4px;
}
.tc-pulse {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 50%;
background: #22c55e;
flex-shrink: 0;
animation: tcPulse 2s ease-in-out infinite;
}
@keyframes tcPulse {
0%, 100% { opacity: 1; transform: scale(1); }
50%       { opacity: .5; transform: scale(.85); }
} .tc-hdr-btn {
background: none;
border: none;
color: rgba(255,255,255,.75);
cursor: pointer;
padding: 6px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
transition: color .15s, background .15s;
flex-shrink: 0;
}
.tc-hdr-btn:hover { color: #fff; background: rgba(255,255,255,.15); }
.tc-hdr-btn.tc-muted { color: rgba(255,255,255,.35); } .tc-msgs {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 14px 12px;
display: flex;
flex-direction: column;
gap: 10px;
scroll-behavior: smooth;
}
.tc-msgs::-webkit-scrollbar { width: 4px; }
.tc-msgs::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; } .tc-bw {
display: flex;
align-items: flex-end;
gap: 7px; width: 100%;
}
.tc-bw.tc-user {
flex-direction: row-reverse;
} .tc-bav {
width: 28px;
height: 28px;
border-radius: 50%;
flex-shrink: 0;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background: #1e3a5f;
color: #fff;
font-size: 12px;
font-weight: 700;
}
.tc-bav img {
width: 100%;
height: 100%;
object-fit: cover;
} .tc-bubble { max-width: 82%;
min-width: 0; padding: 10px 13px;
border-radius: 16px;
font-size: 14px; line-height: 1.55;
word-break: break-word; overflow-wrap: anywhere; white-space: normal;
hyphens: none;  display: inline-block;
width: auto;
}
.tc-bubble.tc-bot {
background: #f3f4f6;
color: #18181b;
border-bottom-left-radius: 4px;
animation: tcSlideIn .2s ease;
}
.tc-bubble.tc-user {
background: var(--tc-primary, #E8641A);
color: #fff;
border-bottom-right-radius: 4px;
text-align: left;
}
@keyframes tcSlideIn {
from { opacity: 0; transform: translateY(6px); }
to   { opacity: 1; transform: none; }
} .tc-bubble p { margin: 0 0 5px; }
.tc-bubble p:last-child { margin: 0; }
.tc-bubble ul, .tc-bubble ol { margin: 5px 0 5px 18px; }
.tc-bubble li { margin-bottom: 3px; }
.tc-bubble strong { font-weight: 600; }
.tc-bubble code {
background: rgba(0,0,0,.08);
padding: 1px 5px;
border-radius: 4px;
font-size: .9em;
} .tc-bubble a {
color: #2563eb;
text-decoration: underline; word-break: break-all;
overflow-wrap: anywhere;
display: inline;
}
.tc-bubble.tc-user a {
color: #fff;
text-decoration: underline;
} .tc-bubble a[href^="https://wa.me"],
.tc-bubble a[href^="http://wa.me"],
.tc-bubble a[href^="https://api.whatsapp"] {
display: inline-flex;
align-items: center;
gap: 5px;
background: #25d366;
color: #fff !important;
text-decoration: none;
padding: 5px 10px;
border-radius: 20px;
font-size: 12.5px;
font-weight: 600;
margin-top: 4px;
word-break: normal;
}
.tc-bubble a[href^="https://wa.me"]::before,
.tc-bubble a[href^="http://wa.me"]::before,
.tc-bubble a[href^="https://api.whatsapp"]::before {
content: '📱';
font-size: 13px;
} .tc-time {
font-size: 10.5px;
color: #9ca3af;
margin-top: 3px;
white-space: nowrap;
}
.tc-bw.tc-bot  .tc-time { text-align: left; }
.tc-bw.tc-user .tc-time { text-align: right; } .tc-bw > div:not(.tc-bav) {
display: flex;
flex-direction: column;
max-width: calc(100% - 36px); min-width: 0;
}
.tc-bw.tc-user > div:not(.tc-bav) {
align-items: flex-end;
}
.tc-bw.tc-bot > div:not(.tc-bav) {
align-items: flex-start;
} .tc-sources {
margin-top: 7px;
padding-top: 7px;
border-top: 1px solid rgba(0,0,0,.08);
font-size: 11.5px;
}
.tc-sources span { color: #6b7280; margin-right: 4px; }
.tc-sources a {
display: inline-block;
background: rgba(30,58,95,.08);
color: #1e3a5f;
padding: 2px 8px;
border-radius: 10px;
text-decoration: none;
margin: 2px 3px 2px 0;
font-size: 11px;
word-break: normal;
}
.tc-sources a:hover { background: rgba(30,58,95,.18); } .tc-typing {
display: flex;
align-items: center;
gap: 4px;
padding: 10px 14px;
background: #f3f4f6;
border-radius: 16px;
border-bottom-left-radius: 4px;
width: fit-content;
}
.tc-typing span {
width: 7px;
height: 7px;
background: #9ca3af;
border-radius: 50%;
animation: tcBounce 1.2s ease-in-out infinite;
}
.tc-typing span:nth-child(2) { animation-delay: .2s; }
.tc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes tcBounce {
0%, 60%, 100% { transform: translateY(0); }
30%           { transform: translateY(-5px); }
} .tc-qr {
display: flex;
flex-wrap: wrap; gap: 6px;
margin-top: 8px;
width: 100%; }
.tc-qr-btn {
background: #fff;
border: 1.5px solid var(--tc-primary, #E8641A);
color: var(--tc-primary, #E8641A);
padding: 5px 11px;
border-radius: 20px;
font-size: 12.5px;
font-family: inherit;
cursor: pointer;
transition: all .15s; white-space: nowrap;
flex-shrink: 0;
}
.tc-qr-btn:hover {
background: var(--tc-primary, #E8641A);
color: #fff;
} .tc-date-div {
text-align: center;
font-size: 11px;
color: #9ca3af;
margin: 4px 0;
display: flex;
align-items: center;
gap: 8px;
}
.tc-date-div::before,
.tc-date-div::after {
content: '';
flex: 1;
height: 1px;
background: #e5e7eb;
} .tc-footer {
padding: 10px 12px 12px;
border-top: 1px solid #f0f0f0;
flex-shrink: 0;
background: #fff;
border-radius: 0 0 18px 18px;
}
.tc-input-wrap {
display: flex;
align-items: flex-end;
gap: 8px;
background: #f8f8f8;
border-radius: 22px;
padding: 8px 8px 8px 14px;
border: 1.5px solid transparent;
transition: border-color .2s, background .2s;
}
.tc-input-wrap:focus-within {
border-color: var(--tc-primary, #E8641A);
background: #fff;
}
.tc-input {
flex: 1;
border: none;
background: transparent;
resize: none;
outline: none;
font-family: inherit;
font-size: 13.5px;
color: #18181b;
line-height: 1.5;
max-height: 96px;
overflow-y: auto; min-width: 0;
}
.tc-input::placeholder { color: #a1a1aa; }
.tc-send-btn {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--tc-primary, #E8641A);
border: none;
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: background .15s, transform .15s;
}
.tc-send-btn:hover:not(:disabled) {
background: #c9551a;
transform: scale(1.05);
}
.tc-send-btn:disabled {
background: #d1d5db;
cursor: not-allowed;
}
.tc-powered {
text-align: center;
font-size: 10.5px;
color: #9ca3af;
margin-top: 6px;
}
.tc-powered a { color: #9ca3af; text-decoration: none; }
.tc-powered a:hover { color: #1e3a5f; } @media (max-width: 480px) { #tc-root {
bottom: 16px;
right: 16px;
}
#tc-root.tc-left {
left: 16px;
right: auto;
} .tc-panel { position: fixed;
left: 0 !important;
right: 0 !important;
bottom: 80px !important;
width: 100vw !important;
max-width: 100vw !important;
border-radius: 14px 14px 0 0; height: calc(100vh - 96px);
max-height: calc(100vh - 96px);
} .tc-bubble {
max-width: 88%;
font-size: 14px !important;
padding: 10px 12px !important;
} .tc-input {
font-size: 16px !important;
} .tc-qr-btn {
font-size: 12px;
padding: 5px 10px;
} .tc-hdr-name { font-size: 13.5px; }
}
@media (max-width: 360px) {
#tc-root { bottom: 12px; right: 12px; }
#tc-root.tc-left { left: 12px; }
} @media (prefers-reduced-motion: reduce) {
#tc-toggle::before,
.tc-pulse,
.tc-typing span,
.tc-icon-chat,
.tc-icon-close {
animation: none;
transition: none;
}
.tc-panel { transition: opacity .15s ease; }
}