/* Al-Masri live chat widget — follows the site's navy / gold tokens. */
.wa-float{display:none!important}
.ams-chat{position:fixed;z-index:300;bottom:20px;inset-inline-end:20px;font-family:'Tajawal','Inter','Noto Sans SC',system-ui,sans-serif;font-size:15px;line-height:1.6;color:var(--text,#F2EEE3)}
.ams-chat *{box-sizing:border-box}
.ams-chat [hidden]{display:none!important}
.ams-chat-launcher{position:relative;width:58px;height:58px;border-radius:50%;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#1a1204;background:linear-gradient(135deg,var(--gold-bright,#E8CB7C),var(--gold,#C9A24C));box-shadow:0 10px 30px -8px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.08) inset;transition:transform .2s}
.ams-chat-launcher:hover{transform:translateY(-2px)}
.ams-chat-launcher:focus-visible,.ams-chat-close:focus-visible,.ams-chat-send:focus-visible,.ams-chat-primary:focus-visible{outline:2px solid #fff;outline-offset:3px}
.ams-chat-badge{position:absolute;top:-4px;inset-inline-end:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#d64530;color:#fff;font:600 12px/22px 'IBM Plex Mono',monospace;text-align:center}
.ams-chat-panel{position:absolute;bottom:72px;inset-inline-end:0;width:min(372px,calc(100vw - 32px));height:min(540px,calc(100vh - 120px));height:min(540px,calc(100dvh - 120px));display:flex;flex-direction:column;overflow:hidden;border-radius:16px;background:var(--surface,#122436);border:1px solid var(--hairline,rgba(201,162,76,.18));box-shadow:0 24px 60px -12px rgba(0,0,0,.7)}
.ams-chat-head{display:flex;align-items:center;gap:10px;padding:14px 16px;background:var(--bg-deep,#070D16);border-bottom:1px solid var(--hairline,rgba(201,162,76,.18))}
.ams-chat-headtext{flex:1;min-width:0;display:flex;flex-direction:column}
.ams-chat-headtext b{font-size:16px}
.ams-chat-state{font-size:12.5px;color:var(--text-dim,#9FB0BE);display:flex;align-items:center;gap:6px}
.ams-chat-state::before{content:'';width:8px;height:8px;border-radius:50%;background:#7b8794;flex-shrink:0}
.ams-chat-state.on::before{background:#25D366;box-shadow:0 0 0 3px rgba(37,211,102,.2)}
.ams-chat-wa{flex-shrink:0;padding:6px 12px;border-radius:999px;background:var(--whatsapp,#25D366);color:#04240F!important;font-size:13px;font-weight:700;text-decoration:none}
.ams-chat-close{flex-shrink:0;width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center}
.ams-chat-close:hover{background:rgba(255,255,255,.08)}
.ams-chat-body{flex:1;overflow-y:auto;padding:16px;overscroll-behavior:contain}
.ams-chat-start{display:flex;flex-direction:column;gap:6px}
.ams-chat-start label{font-size:14px;margin-top:8px}
.ams-chat-start small{color:var(--text-dim,#9FB0BE);font-size:12.5px}
.ams-chat input,.ams-chat textarea{width:100%;border:1px solid var(--hairline-soft,rgba(255,255,255,.14));background:var(--bg,#0D1B2A);color:inherit;border-radius:10px;padding:11px 12px;font:inherit;font-size:16px}
.ams-chat input:focus,.ams-chat textarea:focus{outline:2px solid var(--gold,#C9A24C);outline-offset:1px}
.ams-chat-primary{margin-top:12px;padding:12px 16px;border:0;border-radius:10px;cursor:pointer;font:inherit;font-weight:700;color:#1a1204;background:linear-gradient(135deg,var(--gold-bright,#E8CB7C),var(--gold,#C9A24C))}
.ams-chat-primary:disabled,.ams-chat-send:disabled{opacity:.55;cursor:wait}
.ams-chat-log{display:flex;flex-direction:column;gap:12px}
.ams-chat-msg{display:flex;flex-direction:column;align-items:flex-start;max-width:86%}
.ams-chat-msg.me{align-self:flex-end;align-items:flex-end}
.ams-chat-who{font-size:11.5px;color:var(--text-dim,#9FB0BE);margin-bottom:3px}
.ams-chat-bubble{padding:9px 13px;border-radius:14px;background:var(--surface-2,#172C40);white-space:pre-wrap;overflow-wrap:anywhere;border-start-start-radius:4px}
.ams-chat-msg.me .ams-chat-bubble{background:var(--gold,#C9A24C);color:#1a1204;border-start-start-radius:14px;border-start-end-radius:4px}
.ams-chat-msg.agent .ams-chat-bubble{border:1px solid var(--hairline,rgba(201,162,76,.35))}
.ams-chat-bubble a{color:var(--gold-bright,#E8CB7C);text-decoration:underline;unicode-bidi:isolate}
.ams-chat-msg.me .ams-chat-bubble a{color:#1a1204}
.ams-chat-msg time{font:11px 'IBM Plex Mono',monospace;color:var(--text-faint,#7b8b9a);margin-top:3px}
.ams-chat-note{margin:12px 0 0;padding:10px 12px;border-radius:10px;border:1px solid var(--hairline,rgba(201,162,76,.35));font-size:13.5px}
.ams-chat-form{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid var(--hairline-soft,rgba(255,255,255,.1));background:var(--bg-deep,#070D16)}
.ams-chat-form textarea{resize:none;max-height:110px;min-height:46px}
.ams-chat-send{flex-shrink:0;width:46px;height:46px;border:0;border-radius:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#1a1204;background:var(--gold,#C9A24C)}
[dir="rtl"] .ams-chat-send svg{transform:scaleX(-1)}
@media (max-width:600px){
  .ams-chat{bottom:16px;inset-inline-end:16px}
  .ams-chat-launcher{width:54px;height:54px}
  /* Full-screen sheet on phones: nothing is squeezed beside the keyboard. */
  .ams-chat.open{inset:0;bottom:0}
  .ams-chat.open .ams-chat-launcher{display:none}
  .ams-chat.open .ams-chat-panel{position:fixed;inset:0;width:100%;height:100%;height:100dvh;border-radius:0;border:0}
  html.ams-chat-open,html.ams-chat-open body{overflow:hidden}
  .ams-chat-form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){.ams-chat-launcher{transition:none}}
