/* Independent ClickWay chat widget. */
#scu-live-widget { --scu-live-primary:#109b79; --scu-live-header:#0e8c6f; position:fixed; z-index:99998; bottom:20px; left:20px; direction:rtl; font-family:inherit; font-size:14px; line-height:1.6; color:#25342f; }
#scu-live-widget *,#scu-live-widget *::before,#scu-live-widget *::after { box-sizing:border-box; }
#scu-live-widget [hidden] { display:none!important; }
#scu-live-widget button { font:inherit; cursor:pointer; border:0; text-transform:none; letter-spacing:normal; }
#scu-live-widget button:focus-visible,#scu-live-widget input:focus-visible,#scu-live-widget textarea:focus-visible,#scu-live-widget .scu-live-upload:focus-within { outline:2px solid var(--scu-live-primary); outline-offset:2px; }
#scu-live-widget .scu-live-sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#scu-live-widget .scu-live-launch { position:relative; display:grid; place-items:center; width:62px; height:62px; padding:0; border-radius:50%; background:var(--scu-live-primary); color:#fff; box-shadow:0 9px 24px rgba(19,82,66,.26); transition:transform .2s,box-shadow .2s; }
#scu-live-widget .scu-live-launch:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(19,82,66,.32); }
#scu-live-widget .scu-live-launch.scu-has-text { display:flex; gap:9px; width:max-content; max-width:min(var(--scu-smart-button-max-width, calc(100vw - 32px)), calc(100vw - 32px)); height:auto; min-height:62px; padding:10px 20px; border-radius:32px; }
#scu-live-widget .scu-live-launch.scu-icon-only { display:grid!important; }
#scu-live-widget .scu-live-smart-text { color:#fff; font-size:13px; font-weight:700; line-height:1.6; text-align:center; overflow-wrap:anywhere; }
#scu-live-widget .scu-live-launch[aria-expanded=true] .scu-live-smart-text { display:none!important; }
#scu-live-widget .scu-live-launch[aria-expanded=true].scu-has-text { width:62px; height:62px; padding:0; justify-content:center; }
#scu-live-widget .scu-live-launch-icon { display:block; font-size:24px; line-height:1; }
#scu-live-widget .scu-live-launch-close { display:none; font:300 30px/1 Arial,sans-serif; }
#scu-live-widget .scu-live-launch[aria-expanded=true] .scu-live-launch-icon { display:none; }
#scu-live-widget .scu-live-launch[aria-expanded=true] .scu-live-launch-close { display:block; }
#scu-live-widget .scu-live-launch-indicator { position:absolute; width:15px; height:15px; bottom:2px; right:1px; border:3px solid #fff; background:#a6b3ad; border-radius:50%; }
#scu-live-widget.is-online .scu-live-launch-indicator { background:#3bd895; }
#scu-live-widget .scu-live-panel { position:absolute; display:flex; flex-direction:column; left:0; bottom:75px; width:380px; max-width:calc(100vw - 32px); height:620px; max-height:calc(100dvh - 110px); min-height:280px; background:#fff; border:1px solid rgba(45,87,73,.1); border-radius:19px; overflow:hidden; box-shadow:0 18px 52px rgba(24,55,46,.24),0 3px 10px rgba(24,55,46,.08); }
#scu-live-widget[data-position=right] { left:auto; right:20px; }
#scu-live-widget[data-position=right] .scu-live-panel { left:auto; right:0; }
#scu-live-widget .scu-live-header { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; min-height:80px; padding:14px 16px; background:var(--scu-live-header); color:#fff; overflow:hidden; }
#scu-live-widget .scu-live-header::before { content:''; position:absolute; width:130px; height:130px; left:-46px; top:-65px; border-radius:50%; background:rgba(255,255,255,.12); pointer-events:none; }
#scu-live-widget .scu-live-identity { position:relative; display:flex; align-items:center; gap:11px; min-width:0; }
#scu-live-widget .scu-live-avatar-wrap { display:grid; place-items:center; flex:none; width:50px; height:50px; border:2px solid rgba(255,255,255,.66); background:rgba(255,255,255,.2); border-radius:14px; overflow:hidden; color:white; }
#scu-live-widget .scu-live-avatar { width:100%; height:100%; display:block; object-fit:cover; margin:0; }
#scu-live-widget .scu-live-avatar-fallback { width:80%; height:80%; }
#scu-live-widget .scu-live-identity-text { min-width:0; }
#scu-live-widget .scu-live-agent-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#fff; font-size:15px; font-weight:700; line-height:1.5; }
#scu-live-widget .scu-live-presence { display:flex; align-items:center; gap:7px; margin-top:3px; font-size:11px; line-height:1.5; color:rgba(255,255,255,.92); }
#scu-live-widget .scu-live-status-dot { width:7px; height:7px; flex:none; border-radius:50%; background:#d5ddd9; }
#scu-live-widget.is-online .scu-live-status-dot { background:#4de59e; box-shadow:0 0 9px rgba(77,229,158,.85); }
#scu-live-widget .scu-live-close { position:relative; display:grid; place-items:center; width:34px; height:34px; flex:none; padding:0; border-radius:10px; color:#fff; background:rgba(255,255,255,.16); font:300 24px/1 Arial,sans-serif; }
#scu-live-widget .scu-live-close:hover { background:rgba(255,255,255,.25); }
#scu-live-widget .scu-live-messages { min-height:0; flex:1; display:flex; flex-direction:column; gap:10px; overflow:auto; overscroll-behavior:contain; padding:15px; background-color:#f1f6f4; background-image:radial-gradient(circle at 10% 6%,rgba(16,155,121,.07),transparent 35%),linear-gradient(155deg,#f6f9f8,#edf4f1); background-size:cover; background-position:center; scrollbar-width:thin; scrollbar-color:#c5d5ce transparent; }
#scu-live-widget .scu-live-welcome { width:100%; padding:24px 16px 20px; margin:0 0 2px; background:#fff; border:1px solid #e2ece7; border-radius:16px; text-align:center; color:#25342f; box-shadow:0 5px 16px rgba(28,68,54,.045); }
#scu-live-widget .scu-live-welcome-icon { display:block; margin:0 auto 12px; font-size:30px; line-height:1; }
#scu-live-widget .scu-live-welcome strong { display:block; font-size:16px; line-height:1.7; color:inherit; }
#scu-live-widget .scu-live-welcome p { margin:7px 0 0; font-size:13px; line-height:1.9; color:#758780; white-space:pre-wrap; overflow-wrap:anywhere; }
#scu-live-widget .scu-live-prechat { display:grid; gap:9px; padding:16px; margin:4px 0 0; background:#fff; color:#25342f; border:1px solid #e2ece7; border-radius:16px; box-shadow:0 5px 16px rgba(28,68,54,.05); }
#scu-live-widget .scu-live-prechat strong { font-size:13px; text-align:right; line-height:1.8; color:inherit; }
#scu-live-widget .scu-live-prechat label { display:block; margin:0; }
#scu-live-widget .scu-live-prechat input { display:block; width:100%; min-height:44px; margin:0; padding:10px 12px; border:1px solid #dce8e2; border-radius:11px; background:#f7faf8; color:#25342f; font:inherit; font-size:13px; text-align:right; box-shadow:none; }
#scu-live-widget .scu-live-prechat input::placeholder { color:#9aa9a2; opacity:1; }
#scu-live-widget .scu-live-prechat button { min-height:44px; padding:9px 12px; border-radius:11px; background:var(--scu-live-primary); color:#fff; font-weight:700; }
#scu-live-widget .scu-live-prechat button:hover,#scu-live-widget .scu-live-send:hover { filter:brightness(.94); }
#scu-live-widget .scu-live-bubble { max-width:85%; padding:10px 13px; border-radius:13px; line-height:1.8; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; box-shadow:0 2px 6px rgba(22,63,47,.06); }
#scu-live-widget .scu-live-bubble.is-agent { align-self:flex-start; background:#fff; border:1px solid #e4ece8; color:#25342f; }
#scu-live-widget .scu-live-bubble.is-visitor { align-self:flex-end; background:var(--scu-live-primary); color:#fff; }
#scu-live-widget .scu-live-bubble.is-system { align-self:center; background:#fff7e6; color:#705222; text-align:center; }
#scu-live-widget .scu-live-read { display:block; margin-top:4px; font-size:10px; opacity:.8; line-height:1.4; }
#scu-live-widget .scu-live-form { flex:none; display:flex; gap:8px; align-items:center; padding:11px; margin:0; background:#fff; border-top:1px solid #e4ece8; }
#scu-live-widget .scu-live-form textarea { display:block; flex:1; min-width:0; width:auto; height:46px; min-height:46px; max-height:100px; resize:none; margin:0; padding:11px; border:1px solid #dce8e2; border-radius:12px; background:#f7faf8; color:#25342f; font:inherit; font-size:13px; line-height:1.7; box-shadow:none; }
#scu-live-widget .scu-live-form textarea::placeholder { color:#a3b1aa; opacity:1; }
#scu-live-widget .scu-live-emoji,#scu-live-widget .scu-live-upload { display:grid; place-items:center; flex:none; width:34px; height:42px; margin:0; padding:0; border:0; border-radius:9px; background:transparent; color:#6a8177; cursor:pointer; font:normal 23px/1 Arial,sans-serif; }
#scu-live-widget .scu-live-upload svg { display:block; width:22px; height:22px; }
#scu-live-widget .scu-live-upload input { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; }
#scu-live-widget .scu-live-emoji:hover,#scu-live-widget .scu-live-upload:hover { background:#edf4f0; }
#scu-live-widget .scu-live-send { display:grid; place-items:center; width:46px; height:46px; flex:none; margin:0; padding:0; border-radius:12px; background:var(--scu-live-primary); color:#fff; font-size:18px; }
#scu-live-widget .scu-live-send span { transform:rotate(180deg); }
#scu-live-widget .scu-live-form.is-disabled .scu-live-send { opacity:.55; }
#scu-live-widget .scu-live-form.is-disabled .scu-live-upload { opacity:.5; cursor:not-allowed; }
#scu-live-widget .scu-live-emoji:disabled,#scu-live-widget .scu-live-send:disabled { cursor:not-allowed; opacity:.5; }
#scu-live-widget .scu-live-error,#scu-live-widget .scu-live-typing { padding:0 14px; font-size:11px; line-height:1.6; background:#fff; }
#scu-live-widget .scu-live-send-status:not([hidden]) { display:flex; align-items:center; gap:7px; padding:6px 14px; background:#fff; color:#52646e; font-size:11px; line-height:1.6; }
#scu-live-widget .scu-live-send-status .scu-live-spinner { flex:none; width:13px; height:13px; }
#scu-live-widget[data-theme=dark] .scu-live-send-status:not([hidden]) { background:#171e2a; color:#d5deeb; }
@media (prefers-color-scheme:dark) { #scu-live-widget[data-theme=auto] .scu-live-send-status:not([hidden]) { background:#171e2a; color:#d5deeb; } }
#scu-live-widget .scu-live-error { color:#b42318; }
#scu-live-widget .scu-live-typing { color:#668278; }
#scu-live-widget .scu-live-emoji-bar { display:flex; flex:none; gap:5px; padding:5px 12px; background:#fff; }
#scu-live-widget .scu-live-emoji-bar button { padding:4px; border-radius:7px; background:transparent; font-size:18px; }
#scu-live-widget .scu-live-file-link { color:inherit!important; background:transparent!important; padding:0; border:0; text-decoration:underline; overflow-wrap:anywhere; }
#scu-live-widget .scu-live-consent { display:block; flex:none; padding:3px 12px 8px; background:#fff; color:#71877f; font-size:11px; line-height:1.6; }
#scu-live-widget .scu-live-upload-progress { display:flex; flex:none; align-items:center; gap:8px; padding:5px 12px; background:#fff; color:#526a60; font-size:11px; }
#scu-live-widget .scu-live-upload-progress progress { width:110px; height:10px; accent-color:var(--scu-live-primary); }
#scu-live-widget .scu-live-initial-status { display:flex; flex:none; align-items:center; justify-content:center; gap:8px; padding:9px 14px; background:#fff; color:#64748b; font-size:12px; }
#scu-live-widget .scu-live-spinner { width:16px; height:16px; border:2px solid #d5dfea; border-top-color:var(--scu-live-primary); border-radius:50%; animation:scuLiveSpin .8s linear infinite; }
#scu-live-widget .scu-live-retry { padding:4px 10px; border:1px solid var(--scu-live-primary); border-radius:8px; background:transparent; color:var(--scu-live-primary); font-size:12px; }
#scu-live-widget .scu-live-prechat input:disabled,#scu-live-widget .scu-live-prechat button:disabled { cursor:wait; opacity:.65; }
#scu-live-widget[data-theme=dark] .scu-live-initial-status { background:#171e2a; color:#c1cddd; }
@media(prefers-color-scheme:dark) { #scu-live-widget[data-theme=auto] .scu-live-initial-status { background:#171e2a; color:#c1cddd; } }
@keyframes scuLiveSpin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { #scu-live-widget .scu-live-spinner { animation:none; } }
#scu-live-widget[data-theme=dark] .scu-live-panel { background:#171e2a; color:#eef2f8; }
#scu-live-widget[data-theme=dark] .scu-live-messages { background-color:#192231; background-image:radial-gradient(circle at 10% 6%,rgba(105,140,195,.12),transparent 38%),linear-gradient(155deg,#202c3c,#151d29); }
#scu-live-widget[data-theme=dark] :is(.scu-live-welcome,.scu-live-prechat,.scu-live-bubble.is-agent) { background:#293547; border-color:#3c4d63; color:#f4f7fc; }
#scu-live-widget[data-theme=dark] .scu-live-welcome p { color:#c1cddd; }
#scu-live-widget[data-theme=dark] :is(.scu-live-form,.scu-live-emoji-bar,.scu-live-consent,.scu-live-upload-progress,.scu-live-error,.scu-live-typing) { background:#171e2a; border-color:#354458; color:#d5deeb; }
#scu-live-widget[data-theme=dark] :is(.scu-live-form textarea,.scu-live-prechat input) { background:#242f3e; border-color:#475b73; color:#fff; }
#scu-live-widget[data-theme=dark] :is(.scu-live-emoji,.scu-live-upload) { color:#bfcde0; }
@media(prefers-color-scheme:dark) {
 #scu-live-widget[data-theme=auto] .scu-live-panel { background:#171e2a; color:#eef2f8; }
 #scu-live-widget[data-theme=auto] .scu-live-messages { background-color:#192231; background-image:radial-gradient(circle at 10% 6%,rgba(105,140,195,.12),transparent 38%),linear-gradient(155deg,#202c3c,#151d29); }
 #scu-live-widget[data-theme=auto] :is(.scu-live-welcome,.scu-live-prechat,.scu-live-bubble.is-agent) { background:#293547; border-color:#3c4d63; color:#f4f7fc; }
 #scu-live-widget[data-theme=auto] .scu-live-welcome p { color:#c1cddd; }
 #scu-live-widget[data-theme=auto] :is(.scu-live-form,.scu-live-emoji-bar,.scu-live-consent,.scu-live-upload-progress,.scu-live-error,.scu-live-typing) { background:#171e2a; border-color:#354458; color:#d5deeb; }
 #scu-live-widget[data-theme=auto] :is(.scu-live-form textarea,.scu-live-prechat input) { background:#242f3e; border-color:#475b73; color:#fff; }
 #scu-live-widget[data-theme=auto] :is(.scu-live-emoji,.scu-live-upload) { color:#bfcde0; }
}
@media(max-width:480px) { #scu-live-widget { bottom:16px; left:16px; } #scu-live-widget[data-position=right] { right:16px; } #scu-live-widget .scu-live-panel { max-height:calc(100dvh - 104px); } }
@media(prefers-reduced-motion:reduce) { #scu-live-widget .scu-live-launch { transition:none; } }

/* Integrated launcher uses the main widget placement and animation. */
#scu-live-widget[data-integrated=single],#scu-live-widget[data-integrated=multi] { bottom:var(--scu-live-bottom,25px); }
#scu-live-widget[data-integrated=single][data-position=left],#scu-live-widget[data-integrated=multi][data-position=left] { left:var(--scu-live-side,20px); right:auto; }
#scu-live-widget[data-integrated=single][data-position=right],#scu-live-widget[data-integrated=multi][data-position=right] { right:var(--scu-live-side,20px); left:auto; }
#scu-live-widget[data-position=center] { left:50%; right:auto; transform:translateX(-50%); }
#scu-live-widget[data-position=center] .scu-live-panel { left:50%; right:auto; transform:translateX(-50%); }
#scu-live-widget[data-integrated=multi] { width:0; height:0; pointer-events:none; }
#scu-live-widget[data-integrated=multi] .scu-live-launch { display:none; }
#scu-live-widget[data-integrated=multi] .scu-live-panel { pointer-events:auto; }
#scu-live-widget[data-animation=pulse] .scu-live-launch { animation:scuLivePulse 1.6s infinite; }
#scu-live-widget[data-animation=wave] .scu-live-launch { animation:scuLiveWave 2s infinite; }
#scu-live-widget[data-animation=shake] .scu-live-launch { animation:scuLiveShake .8s infinite; }
#scu-live-widget[data-animation=floating] .scu-live-launch { animation:scuLiveFloat 2s ease-in-out infinite; }
#scu-live-widget[data-animation=tada] .scu-live-launch { animation:scuLiveTada 1.2s infinite; }
#scu-live-widget[data-animation=bounce] .scu-live-launch { animation:scuLiveBounce 1s infinite; }
#scu-live-widget[data-animation=heartbeat] .scu-live-launch { animation:scuLiveHeartbeat 1.4s infinite; }
#scu-live-widget[data-animation=glow] .scu-live-launch { animation:scuLiveGlow 1.8s infinite; }
@keyframes scuLivePulse { 50% { transform:scale(1.08); } }
@keyframes scuLiveWave { 25% { transform:rotate(12deg); } 75% { transform:rotate(-12deg); } }
@keyframes scuLiveShake { 25% { transform:translateX(-3px); } 75% { transform:translateX(3px); } }
@keyframes scuLiveFloat { 50% { transform:translateY(-7px); } }
@keyframes scuLiveTada { 25% { transform:scale(1.1) rotate(-5deg); } 75% { transform:scale(1.1) rotate(5deg); } }
@keyframes scuLiveBounce { 50% { transform:translateY(-9px); } }
@keyframes scuLiveHeartbeat { 20%,55% { transform:scale(1.12); } 35%,70% { transform:scale(1); } }
@keyframes scuLiveGlow { 50% { box-shadow:0 0 0 10px color-mix(in srgb,var(--scu-live-primary) 20%,transparent); } }
@media(prefers-reduced-motion:reduce) { #scu-live-widget .scu-live-launch { animation:none!important; } }

#scu-live-widget[data-integrated=multi],#scu-live-widget[data-integrated=single] { z-index:1000000; }

#scu-live-widget .scu-live-form textarea { max-height:none; overflow-y:hidden; }
#scu-live-widget .scu-live-bubble.is-entering { animation:scuLiveMessageIn .24s ease-out both; }
@keyframes scuLiveMessageIn { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (prefers-reduced-motion:reduce) { #scu-live-widget .scu-live-bubble.is-entering { animation:none; } }
