/* ============================================================
   مساعد سما الحرمين الذكي — أنماط الودجت
   ألوان وخطوط مطابقة لهوية الموقع (Cairo / أخضر #064a36 / ذهبي #c5a875)
   كل الأصناف مسبوقة بـ sma- حتى لا تتعارض مع أنماط الموقع
   ============================================================ */

.sma-launcher{position:fixed;bottom:22px;inset-inline-start:22px;z-index:90;display:flex;align-items:center;gap:10px;border:none;cursor:pointer;
  background:linear-gradient(140deg,#064a36 0%,#0a5f47 55%,#0d7355 100%);
  color:#f7f2e6;font-family:'Cairo',Tahoma,Arial,sans-serif;font-weight:700;font-size:14px;
  padding:13px 20px 13px 16px;border-radius:999px;box-shadow:0 14px 34px rgba(6,73,54,.38),inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .25s}
.sma-launcher:hover{transform:translateY(-3px) scale(1.03);box-shadow:0 20px 44px rgba(6,73,54,.44),inset 0 1px 0 rgba(255,255,255,.18)}
.sma-launcher .sma-orb{width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 32% 28%,#e9d9ae,#bd984e 68%);display:grid;place-items:center;box-shadow:0 3px 9px rgba(0,0,0,.25),inset 0 1px 2px rgba(255,255,255,.55)}
.sma-launcher .sma-orb svg{width:19px;height:19px}
.sma-launcher .sma-pulse{position:absolute;inset:-4px;border-radius:999px;border:2px solid rgba(189,152,78,.55);animation:smaPulse 2.6s ease-out infinite;pointer-events:none}
@keyframes smaPulse{0%{opacity:.8;transform:scale(1)}70%{opacity:0;transform:scale(1.18)}100%{opacity:0}}

.sma-panel{position:fixed;bottom:96px;inset-inline-start:22px;z-index:95;width:min(400px,calc(100vw - 32px));max-height:min(640px,calc(100dvh - 130px));
  background:#fffefa;border:1px solid #e8e1d6;border-radius:26px;box-shadow:0 30px 80px rgba(60,50,30,.28);
  display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(18px) scale(.97);pointer-events:none;
  transition:opacity .3s ease,transform .35s cubic-bezier(.32,1.2,.5,1)}
.sma-panel.sma-open{opacity:1;transform:none;pointer-events:auto}

.sma-head{background:linear-gradient(150deg,#064a36 0%,#0a5f47 60%,#0d7355 100%);padding:18px 18px 16px;position:relative;overflow:hidden}
.sma-head:before{content:"";position:absolute;inset:0;opacity:.14;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23c5a875' stroke-width='1'%3E%3Cpath d='M36 8l7 21 21 7-21 7-7 21-7-21-21-7 21-7z'/%3E%3Ccircle cx='36' cy='36' r='5'/%3E%3C/g%3E%3C/svg%3E")}
.sma-head:after{content:"";position:absolute;right:0;left:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,#c5a875,transparent)}
.sma-head-row{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.sma-head-orb{width:44px;height:44px;border-radius:16px;background:rgba(255,255,255,.1);border:1px solid rgba(197,168,117,.5);display:grid;place-items:center;flex-shrink:0}
.sma-head-orb svg{width:24px;height:24px}
.sma-head-txt{flex:1;min-width:0}
.sma-head-txt strong{color:#faf6ea;font-size:16px;font-weight:800;display:block}
.sma-head-txt small{color:rgba(250,246,234,.78);font-size:10.5px;display:block;margin-top:2px}
.sma-close{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);color:#f3ecd9;width:32px;height:32px;border-radius:11px;cursor:pointer;display:grid;place-items:center;transition:.2s}
.sma-close:hover{background:rgba(255,255,255,.22)}
.sma-close svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

.sma-msgs{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:12px;
  background:radial-gradient(circle at 85% 0%,rgba(223,232,223,.5),transparent 45%),#faf8f3}
.sma-msgs::-webkit-scrollbar{width:5px}
.sma-msgs::-webkit-scrollbar-thumb{background:#e9dfcf;border-radius:4px}

.sma-msg{max-width:86%;padding:11px 14px;border-radius:18px;font-size:13.5px;line-height:1.9;animation:smaMsgIn .35s cubic-bezier(.3,1.2,.5,1);white-space:pre-line}
@keyframes smaMsgIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.sma-msg.sma-bot{align-self:flex-start;background:#fffefa;border:1px solid #e8e1d6;border-inline-start:3px solid #c5a875;border-radius:18px 18px 18px 6px;box-shadow:0 4px 14px rgba(87,72,50,.07);color:#4a443c}
.sma-msg.sma-user{align-self:flex-end;background:linear-gradient(140deg,#064a36,#0a5f47);color:#f5f0e2;border-radius:18px 18px 6px 18px;box-shadow:0 6px 16px rgba(6,73,54,.22)}

.sma-srcs{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.sma-src{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;color:#9d7d49;background:#f1eadf;border:1px solid #e3d7bf;border-radius:999px;padding:4px 11px;text-decoration:none;transition:.2s}
.sma-src:hover{background:#e9dfcf;color:#7d6335}
.sma-src svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.sma-note{display:flex;gap:8px;align-items:flex-start;background:#f6f1e6;border:1px dashed #ddd0b4;border-radius:14px;padding:9px 12px;font-size:11px;color:#7a6a4d;margin-top:9px;line-height:1.8;white-space:normal}
.sma-note svg{width:14px;height:14px;flex-shrink:0;margin-top:3px;stroke:#b08d4e;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.sma-typing{align-self:flex-start;display:flex;gap:5px;background:#fffefa;border:1px solid #e8e1d6;border-radius:18px 18px 18px 6px;padding:13px 16px;box-shadow:0 4px 14px rgba(87,72,50,.07)}
.sma-typing i{width:7px;height:7px;border-radius:50%;background:#c5a875;animation:smaTp 1.1s infinite}
.sma-typing i:nth-child(2){animation-delay:.18s}.sma-typing i:nth-child(3){animation-delay:.36s}
@keyframes smaTp{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}

.sma-suggests{padding:8px 14px 4px;display:flex;gap:7px;flex-wrap:wrap;background:#faf8f3;border-top:1px solid #e8e1d6}
.sma-suggests button{border:1px solid #e0d3b6;background:linear-gradient(160deg,#fdfaf3,#f1eadf);color:#7a6337;font-family:'Cairo',Tahoma,Arial,sans-serif;font-size:11px;font-weight:700;border-radius:999px;padding:6px 13px;cursor:pointer;transition:.2s}
.sma-suggests button:hover{background:#e9dfcf;transform:translateY(-1px)}

.sma-input-row{display:flex;gap:8px;padding:11px 14px;background:#faf8f3;border-top:1px solid #e8e1d6}
.sma-input-row input{flex:1;border:1px solid #e8e1d6;background:#fffefa;border-radius:14px;padding:11px 14px;font-family:'Cairo',Tahoma,Arial,sans-serif;font-size:13px;color:#514a42;outline:none;transition:.2s}
.sma-input-row input:focus{border-color:#c5a875;box-shadow:0 0 0 3px rgba(197,168,117,.18)}
.sma-input-row input::placeholder{color:#b3a993}
.sma-send{width:46px;height:46px;border:none;border-radius:14px;cursor:pointer;flex-shrink:0;
  background:linear-gradient(140deg,#bd984e,#9d7d49);display:grid;place-items:center;box-shadow:0 8px 18px rgba(157,125,73,.35);transition:.2s}
.sma-send:hover{transform:translateY(-2px);box-shadow:0 12px 22px rgba(157,125,73,.42)}
.sma-send:disabled{opacity:.6;cursor:wait;transform:none}
.sma-send svg{width:19px;height:19px;stroke:#fffaf0;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform:scaleX(-1)}
.sma-foot{padding:7px 14px 11px;background:#faf8f3;text-align:center;font-size:9.5px;color:#a89d8c}

@media(max-width:600px){
  .sma-launcher{bottom:16px;inset-inline-start:16px;font-size:13px;padding:11px 16px 11px 13px}
  .sma-panel{inset-inline-start:12px;inset-inline-end:12px;width:auto;bottom:88px;max-height:calc(100dvh - 120px)}
}
