.support-chat{--chat-card:#fff;--chat-soft:#f3f6f8;--chat-ink:#243447;--chat-muted:#607386;--chat-border:#d9e2e8;--chat-online:#209264;color:var(--chat-ink);font-family:var(--font-cairo,'Cairo'),sans-serif;font-size:13px;line-height:1.7}
html[data-account-theme=dark] .support-chat{--chat-card:#242c34;--chat-soft:#303b45;--chat-ink:#eef3f6;--chat-muted:#bac9d4;--chat-border:#4a5a67}
.support-chat[hidden],.support-chat [hidden]{display:none!important}.support-chat *{box-sizing:border-box}.support-chat button,.support-chat textarea,.support-chat a{font:inherit}.support-chat button{cursor:pointer}.support-chat button:disabled{opacity:.5;cursor:default}.support-chat button:focus-visible,.support-chat a:focus-visible,.support-chat-history:focus-visible{outline:3px solid #b58a00;outline-offset:3px}
.support-chat-bubble{position:fixed;z-index:2147483101;width:56px;height:56px;display:grid;place-items:center;border:1px solid #b89a3655;border-radius:50%;background:#ffdc43;color:#263544;box-shadow:0 5px 22px #17263426;touch-action:none;user-select:none;cursor:grab!important;padding:15px}.support-chat-bubble:active{cursor:grabbing!important}.support-chat-bubble>svg{width:26px;height:26px;pointer-events:none}
.support-chat-panel{position:fixed;z-index:2147483102;display:flex;flex-direction:column;width:min(380px,calc(100vw - 24px));max-height:calc(100dvh - 90px);overflow:hidden;border:1px solid var(--chat-border);border-radius:22px;background:var(--chat-card);box-shadow:0 14px 48px #1524322b;text-align:start}.support-chat-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--chat-border)}.support-chat-panel>header strong{display:block;font-size:15px;font-weight:800}.support-chat-panel>header small{display:block;color:var(--chat-muted);font-size:11px}.support-chat-icon{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;padding:8px;border:0;border-radius:12px;background:var(--chat-soft);color:var(--chat-ink)}.support-chat-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.support-chat-intro{padding:22px 18px}.support-chat-intro p{margin:0 0 18px;color:var(--chat-muted)}.support-chat-primary{border:0;border-radius:12px;background:#ffda38;color:#26313c;padding:10px 17px;font-weight:800!important}.support-chat-intro .support-chat-primary{width:100%}.support-chat-intro a{display:block;padding:10px;text-align:center;color:var(--chat-ink)}#supportChatThread{display:flex;flex-direction:column;min-height:0;overflow:hidden}.support-chat-waiting{margin:12px 14px 0;padding:9px 12px;border-radius:12px;background:#fff6d8;color:#71540d;font-size:11px}.support-chat-history{min-height:70px;height:260px;overflow:auto;overscroll-behavior:contain;padding:16px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin}.support-chat-message{max-width:88%;min-width:70px;align-self:flex-start;padding:9px 12px;border-radius:15px;background:var(--chat-soft);overflow-wrap:anywhere}.support-chat-message[data-author=customer]{align-self:flex-end;background:#ffedaa;color:#313b43}.support-chat-message p{margin:0;white-space:pre-wrap}.support-chat-message time{display:block;margin-top:5px;color:var(--chat-muted);font-family:inherit;font-size:10px;line-height:1.7}.support-chat-message[data-author=customer] time{color:#665a37}
.support-chat-composer{margin:0 12px;padding:10px;border:1px solid var(--chat-border);border-radius:16px;background:var(--chat-soft)}.support-chat-composer textarea{display:block;width:100%;min-height:52px;max-height:100px;padding:4px 5px;resize:none;border:0;background:transparent;color:var(--chat-ink);font-size:13px;outline:none}.support-chat-composer:focus-within{border-color:#aa8d29}.support-chat-sendbar{display:flex;justify-content:space-between;align-items:center;gap:8px}.support-chat-sendbar .support-chat-primary{padding:7px 20px}.support-chat-files{display:flex;gap:6px;flex-wrap:wrap;padding-bottom:6px}.support-chat-files button,.support-chat-message .messages-file{max-width:100%;padding:6px 9px;border:1px solid var(--chat-border);border-radius:9px;background:var(--chat-card);color:var(--chat-ink);font-size:11px;overflow-wrap:anywhere;text-align:start}.support-chat-panel footer{padding:8px 16px 0}.support-chat-text{padding:4px;border:0;background:transparent;color:var(--chat-muted);font-size:11px!important}.support-chat-feedback{margin:0;padding:5px 16px 10px;font-size:11px;color:var(--chat-muted)}.support-chat-confirm-actions{display:flex;gap:12px;align-items:center}.support-chat-confirm-actions .support-chat-primary{width:auto;flex:1}
.messages-preview{width:min(900px,90vw);max-width:calc(100vw - 24px);border:1px solid #d9e2e8;border-radius:20px;background:#fff;color:#243447;padding:16px}.messages-preview::backdrop{background:#14202a99;backdrop-filter:blur(5px)}.messages-preview img{display:block;max-width:100%;max-height:75vh;margin:auto;object-fit:contain;border-radius:12px}.messages-preview div{display:flex;justify-content:space-between;padding-top:14px}.messages-preview button,.messages-preview a{font:inherit;font-size:14px;border:0;border-radius:10px;padding:10px 18px;background:#f1f5f8;color:#243447;text-decoration:none;cursor:pointer}
@media(max-height:650px){.support-chat-history{height:170px}.support-chat-panel>header{padding:10px 14px}.support-chat-intro{padding:14px}.support-chat-composer textarea{min-height:38px}.support-chat-waiting{padding:5px 10px}}
.support-chat-closed{margin:12px 14px;padding:12px;border:1px solid #bc7380;border-radius:12px;background:#803e49;color:#fff4f5;font-size:12px;line-height:1.8}
#supportChatViewHistory{display:block;width:100%;margin-top:12px}
/* Compact single-row composer and a scrollable, scrollbar-free conversation. */
.support-chat-bubble{cursor:pointer!important;overflow:visible;transition:background-color 160ms,box-shadow 160ms;}
/* No rim or shadow: share Online's green and paint at native, whole-pixel size. */
.support-chat-bubble>#supportChatUnread{position:absolute;display:grid;place-items:center;top:-5px;inset-inline-end:auto;right:-5px;left:auto;min-width:24px;height:24px;padding:0 4px;border:0;outline:0;border-radius:999px;background:var(--chat-online);color:#fff;font:700 13px/1 Arial,sans-serif;font-variant-numeric:tabular-nums;text-rendering:geometricPrecision;direction:ltr;box-shadow:none;pointer-events:none;}
.support-chat-bubble:active{cursor:pointer!important;}.support-chat-bubble.is-dragging{cursor:grabbing!important;}
.support-chat-bubble:hover{background:#ffe46c;box-shadow:0 7px 24px #17263438;}
.support-chat-panel{width:min(420px,calc(100vw - 24px));border-radius:24px;}
.support-chat-panel>header{padding:15px 18px;background:var(--chat-card);}
#supportChatThread{flex:1;}
.support-chat-history{flex:1;height:auto;min-height:60px;overflow-y:auto;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch;direction:ltr;}
.support-chat-history::-webkit-scrollbar,.support-chat-composer textarea::-webkit-scrollbar,.support-chat-files::-webkit-scrollbar{display:none;width:0;height:0;}
.support-chat-history>.support-chat-message:first-child{margin-top:auto;}
.support-chat-message{flex-shrink:0;padding:11px 14px;border-radius:17px 17px 17px 5px;max-width:88%;font-size:14px;line-height:1.8;}
.support-chat-message[data-author=customer]{background:#fff0b5;border-radius:17px 17px 5px 17px;}
.support-chat-message time{font-size:10px;margin-top:4px;}
.support-chat-composer{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:8px;margin:8px 12px 0;padding:7px 8px;border-radius:26px;background:var(--chat-soft);}
.support-chat-composer textarea{grid-column:2;grid-row:1;min-height:40px;max-height:128px;height:40px;line-height:1.7;padding:7px 2px;font-size:14px;scrollbar-width:none;}
.support-chat-sendbar{display:contents;}
#supportChatAttach{grid-column:1;grid-row:1;width:42px;height:42px;border-radius:50%;background:transparent;}
#supportChatSend{grid-column:3;grid-row:1;display:grid;place-items:center;width:42px;height:42px;padding:10px;border-radius:50%;background:#267cba;color:#fff;}
/* Center the plane's visible stroke mass, not just its empty SVG viewport. */
#supportChatSend svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transform:translate(-1.75px,1.75px);}
.support-chat-files{margin:8px 14px 0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;flex-shrink:0;}
.support-chat-files button{flex-shrink:0;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.support-chat-panel footer{padding:5px 18px 8px;}.support-chat-feedback:empty{display:none;}
html[data-account-theme=dark] .support-chat-message[data-author=customer]{background:#38534b;color:#f1f7f4;}
html[data-account-theme=dark] .support-chat-message[data-author=customer] time{color:#c0dbcd;}
@media(prefers-reduced-motion:reduce){.support-chat-bubble{transition:none;}}
.support-chat-panel footer{padding:10px 12px 12px;}
#supportChatClose{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:44px;padding:9px 15px;border:1px solid #d9a2a9;border-radius:13px;background:#fff0f1;color:#a53543;font-size:13px!important;font-weight:750;}
#supportChatClose:hover{background:#ffe2e6;border-color:#be6573;}
#supportChatClose svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#supportChatConfirm{padding:24px 18px;}
#supportChatConfirmCopy{font-size:14px;line-height:1.9;color:var(--chat-ink);}
#supportChatConfirmClose{min-height:46px;background:#af3f50;color:#fff;font-size:13px;}
#supportChatConfirmClose:hover{background:#922e3e;}
#supportChatCancelClose{min-height:46px;padding:9px 18px;border:1px solid var(--chat-border);border-radius:12px;background:var(--chat-soft);color:var(--chat-ink);font-size:13px!important;font-weight:700;}
html[data-account-theme=dark] #supportChatClose{background:#462c35;border-color:#8e5967;color:#ffc1ca;}
html[data-account-theme=dark] #supportChatClose:hover{background:#5b3340;border-color:#bf8090;}
/* Compact header actions; media remains uncropped and has no outer frame. */
.support-chat-bubble{background:linear-gradient(145deg,#3089ca,#176399);color:#fff;border-color:#1d6fa6;padding:10px;box-shadow:0 5px 20px #164c7138;}
.support-chat-bubble:hover{background:linear-gradient(145deg,#3e9ad9,#1c71a9);box-shadow:0 7px 24px #164c7150;}
.support-chat-bubble>svg{display:block;width:32px;height:32px;shape-rendering:geometricPrecision;}
.support-chat-panel>header{gap:10px;align-items:center;padding:13px 14px;}
.support-chat-panel>header>div:first-child{min-width:0;}
.support-chat-panel>header strong{font-size:13px;line-height:1.6;}
.support-chat-header-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;}
#supportChatMinimize{width:32px;height:32px;border:1px solid var(--chat-border);border-radius:50%;padding:6px;transition:background-color 150ms;}
#supportChatMinimize:hover{background:var(--chat-border);}
#supportChatMinimize svg{width:18px;height:18px;stroke-width:2;}
#supportChatClose{width:auto;min-height:32px;gap:5px;padding:5px 9px;border-radius:999px;font-size:11px!important;line-height:1.6;white-space:nowrap;}
#supportChatClose svg{width:15px;height:15px;}
#supportChatState[data-availability]::before{content:"";display:inline-block;width:6px;height:6px;margin-inline-end:5px;border-radius:50%;background:var(--chat-muted);vertical-align:middle;}
#supportChatState[data-availability=none]::before{display:none;}
#supportChatState[data-availability=online]::before{background:var(--chat-online);}
.support-chat-availability{flex:none;margin:10px 14px 0;padding:9px 11px;border:1px solid var(--chat-border);border-radius:12px;background:var(--chat-soft);color:var(--chat-muted);font-size:11px;line-height:1.8;overflow-wrap:anywhere;}
.support-chat-panel footer:has(>[hidden]:only-child){display:none;}
.support-chat-composer{margin-bottom:12px;}
.support-chat-composer textarea:placeholder-shown{text-align:start;direction:inherit;}
.support-chat-media:empty{display:none;}
.support-chat-message.has-media{width:min(320px,88%);min-width:0;padding:0;overflow:hidden;border:0;border-radius:14px;background:var(--chat-soft);}
.support-chat-message.has-media>p{margin:0;padding:9px 11px 0;}
.support-chat-message.has-media>time{margin:0;padding:5px 11px 8px;}
.support-chat-message.has-media[data-author=customer]{border-radius:14px;background:#fff0b5;}
.support-chat-media{display:flex;flex-direction:column;gap:4px;}
.support-chat-media .messages-image{display:block;width:100%;aspect-ratio:16/10;padding:0;border:0;border-radius:0;overflow:hidden;background:var(--chat-soft);color:var(--chat-muted);font-size:11px;line-height:1.8;}
.support-chat-media .messages-image img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border:0;border-radius:0;}
.support-chat-media .messages-image>span>svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;}
.support-chat-media .messages-image.is-ready{background:transparent;}
.support-chat-media .messages-file{margin:6px 8px;}
html[data-account-theme=dark] .support-chat-message.has-media[data-author=customer]{background:#38534b;}
.support-chat-files{gap:8px;padding:4px 2px;}
.support-chat-draft{position:relative;flex:0 0 72px;width:72px;height:72px;overflow:hidden;border-radius:12px;background:var(--chat-soft);}
.support-chat-files .support-chat-draft-preview{display:block;width:72px;height:72px;padding:0;border:0;border-radius:12px;background:transparent;}
.support-chat-draft-preview img{display:block;width:100%;height:100%;object-fit:cover;}
.support-chat-files .support-chat-draft-remove{position:absolute;inset-inline-end:3px;top:3px;display:grid;place-items:center;width:24px;height:24px;padding:4px;border:1px solid #ffffff9c;border-radius:50%;background:#20313ee6;color:#fff;}
.support-chat-draft-remove svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;}
.support-chat-draft.is-document{flex-basis:120px;width:120px;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:10px;}
.support-chat-draft.is-document strong{font:700 12px/1.4 sans-serif;color:var(--chat-ink);}
.support-chat-draft.is-document small{display:block;max-width:100%;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--chat-muted);}
@media(max-width:360px){.support-chat-panel>header{padding:11px 12px;gap:6px;}.support-chat-panel>header strong{font-size:12px;}#supportChatClose{font-size:10px!important;padding-inline:7px;}.support-chat-header-actions{gap:4px;}}
/* One avatar at each speaker change; physical sides stay stable in both languages. */
.support-chat-message{position:relative;max-width:min(88%,calc(100% - 40px));margin-left:38px;margin-right:0;}
.support-chat-message[data-author=customer]{margin-left:0;margin-right:38px;}
.support-chat-avatar{position:absolute;top:0;left:-38px;right:auto;width:30px;height:30px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--chat-card);color:var(--chat-muted);font-size:12px;font-weight:800;line-height:1;}
.support-chat-message[data-author=customer]>.support-chat-avatar{left:auto;right:-38px;}
.support-chat-avatar>img{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%;}
.support-chat-message[data-group-start=true]:not(:first-child){margin-top:6px;}
.support-chat-message.has-media{overflow:visible;}
.support-chat-message.has-media>.support-chat-media{border-radius:14px 14px 0 0;overflow:hidden;}
.support-chat-panel{transform-origin:bottom left;}
.support-chat-typing{display:flex;align-items:center;justify-content:center;align-self:flex-start;flex:none;gap:5px;width:52px;height:30px;margin-left:38px;border-radius:16px 16px 16px 5px;background:var(--chat-soft);color:#418fce;}
.support-chat-typing:first-child{margin-top:auto;}
.support-chat-typing span{width:6px;height:6px;border-radius:50%;background:currentColor;animation:support-chat-typing 1.05s ease-in-out infinite;}
.support-chat-typing span:nth-child(2){animation-delay:120ms;}
.support-chat-typing span:nth-child(3){animation-delay:240ms;}
html[data-account-theme=dark] .support-chat-typing{color:#86c9ff;}
@keyframes support-chat-typing{0%,55%,100%{transform:translateY(0);opacity:.55;}27%{transform:translateY(-3px);opacity:1;}}
@media(prefers-reduced-motion:reduce){.support-chat-typing span{animation:none;}}
