@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;600;700&display=swap');
/* ERP Textiles — AI Support Chat widget (shared: portal + main site) */
.etx-chat-btn{position:fixed;right:20px;bottom:20px;z-index:99990;width:58px;height:58px;border-radius:50%;border:none;background:#4f46e5;color:#fff;font-size:26px;cursor:pointer;box-shadow:0 10px 28px rgba(15,23,42,.35);display:flex;align-items:center;justify-content:center}
.etx-chat-btn:hover{background:#4338ca}
.etx-chat-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#f43f5e;color:#fff;font-size:11px;font-weight:800;display:none;align-items:center;justify-content:center}
.etx-chat-panel{position:fixed;right:20px;bottom:88px;z-index:99991;width:min(360px,calc(100vw - 32px));height:min(520px,calc(100vh - 120px));background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 24px 60px rgba(15,23,42,.30);display:none;flex-direction:column;overflow:hidden;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:#0f172a}
.etx-chat-panel.open{display:flex}
.etx-chat-head{background:#4f46e5;color:#fff;padding:13px 15px;display:flex;align-items:center;gap:10px}
.etx-chat-head .t{font-weight:800;font-size:14px;line-height:1.2}
.etx-chat-head .s{font-size:11px;opacity:.85}
.etx-chat-head .x{margin-left:auto;background:rgba(255,255,255,.18);border:none;color:#fff;width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:14px}
.etx-chat-body{flex:1;overflow-y:auto;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px}
.etx-msg{max-width:82%;padding:8px 11px;border-radius:14px;font-size:13px;line-height:1.45;word-wrap:break-word}
.etx-msg.me{align-self:flex-end;background:#4f46e5;color:#fff;border-bottom-right-radius:4px}
.etx-msg.them{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-bottom-left-radius:4px}
.etx-msg .meta{font-size:10px;opacity:.65;margin-top:4px}
/* Urdu messages render in a real Urdu font (Noto Nastaliq Urdu) — design §4 */
.etx-msg.etx-urdu>div:first-child{font-family:'Noto Nastaliq Urdu',serif;line-height:2.1;direction:rtl;text-align:right}
.etx-vstatus:empty{display:none}
.etx-msg a.file{display:inline-block;margin-top:5px;padding:4px 8px;border-radius:8px;background:rgba(15,23,42,.08);color:inherit;font-size:12px;font-weight:600;text-decoration:none}
.etx-chat-form{padding:14px;background:#fff}
.etx-chat-form label{display:block;font-size:11px;font-weight:700;color:#475569;margin:8px 0 4px}
.etx-chat-form input{width:100%;box-sizing:border-box;padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;font-size:13px}
.etx-chat-form button,.etx-send{background:#4f46e5;color:#fff;border:none;border-radius:10px;padding:10px 14px;font-weight:700;font-size:13px;cursor:pointer;width:100%;margin-top:12px}
.etx-chat-form button:hover,.etx-send:hover{background:#4338ca}
.etx-chat-inputbar{display:flex;gap:7px;padding:10px;border-top:1px solid #e2e8f0;background:#fff;align-items:center}
.etx-chat-inputbar input[type=text]{flex:1;padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;font-size:13px;min-width:0}
.etx-attach{width:38px;height:38px;border-radius:10px;border:1px solid #cbd5e1;background:#f8fafc;cursor:pointer;font-size:16px;flex:none}
.etx-send{width:auto;margin-top:0;flex:none}
.etx-pending{font-size:11px;color:#64748b;padding:0 12px 8px;background:#fff;display:none}
.etx-err{font-size:12px;color:#e11d48;padding:6px 2px 0;display:none}
/* Voice (Web Speech API): mic / Talk / speaker / language row under the input */
.etx-chat-inputbar{flex-wrap:wrap}
.etx-voicebar{display:flex;gap:7px;align-items:center;width:100%;padding-top:2px}
.etx-vbtn{height:34px;min-width:38px;padding:0 9px;border-radius:10px;border:1px solid #cbd5e1;background:#f8fafc;cursor:pointer;font-size:14px;line-height:1;flex:none;color:#0f172a;font-family:inherit}
.etx-vbtn:hover{background:#eef2ff}
.etx-vbtn.on{background:#4f46e5;border-color:#4f46e5;color:#fff}
.etx-mic.listening{background:#e11d48;border-color:#e11d48;color:#fff;animation:etxPulse 1.1s ease-in-out infinite}
@keyframes etxPulse{0%,100%{box-shadow:0 0 0 0 rgba(225,29,72,.45)}50%{box-shadow:0 0 0 7px rgba(225,29,72,0)}}
.etx-vstatus{font-size:11px;color:#64748b;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
