/* Rafeeq · Smart Assistant widget */
.rafeeq-root{position:fixed;inset-inline-end:22px;bottom:92px;z-index:70;font-family:'Cairo',system-ui,sans-serif;direction:rtl;}
.rafeeq-root[data-locale="en"]{direction:ltr;}
.rafeeq-fab{
  width:58px;height:58px;border:none;border-radius:50%;cursor:pointer;color:#fff;
  background:linear-gradient(145deg,#0e7490,#0891b2 55%,#0ea5b8);
  box-shadow:0 10px 28px rgba(14,116,144,.42);
  display:flex;align-items:center;justify-content:center;
  transition:transform .25s ease,box-shadow .25s ease;
  animation:rafeeqPulse 2.8s ease-in-out infinite;
}
.rafeeq-fab:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 14px 32px rgba(14,116,144,.5);}
.rafeeq-fab i{font-size:28px;}
.rafeeq-fab .rafeeq-badge{
  position:absolute;top:-2px;inset-inline-end:-2px;width:14px;height:14px;border-radius:50%;
  background:#e0a44e;border:2px solid #fff;
}
@keyframes rafeeqPulse{
  0%,100%{box-shadow:0 10px 28px rgba(14,116,144,.42),0 0 0 0 rgba(8,145,178,.35);}
  50%{box-shadow:0 10px 28px rgba(14,116,144,.42),0 0 0 12px rgba(8,145,178,0);}
}
.rafeeq-panel{
  position:absolute;inset-inline-end:0;bottom:72px;width:min(380px,calc(100vw - 28px));
  height:min(560px,72vh);display:none;flex-direction:column;overflow:hidden;
  border-radius:22px;background:rgba(255,255,255,.96);
  border:1px solid rgba(14,116,144,.14);
  box-shadow:0 24px 60px rgba(12,59,68,.22);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  transform-origin:bottom right;animation:rafeeqIn .28s ease;
}
.rafeeq-root[data-locale="en"] .rafeeq-panel{transform-origin:bottom left;}
.rafeeq-root.is-open .rafeeq-panel{display:flex;}
@keyframes rafeeqIn{from{opacity:0;transform:translateY(12px) scale(.96);}to{opacity:1;transform:none;}}
.rafeeq-head{
  padding:16px 18px;display:flex;align-items:center;gap:12px;color:#fff;
  background:linear-gradient(120deg,#0c4a5a 0%,#0e7490 45%,#0891b2 100%);
}
.rafeeq-avatar{
  width:42px;height:42px;border-radius:50%;display:grid;place-items:center;
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.28);flex-shrink:0;
}
.rafeeq-avatar i{font-size:22px;}
.rafeeq-head h3{margin:0;font-size:15.5px;font-weight:800;line-height:1.2;}
.rafeeq-head p{margin:2px 0 0;font-size:12px;opacity:.85;}
.rafeeq-close{margin-inline-start:auto;background:transparent;border:none;color:#fff;cursor:pointer;padding:6px;border-radius:8px;}
.rafeeq-close:hover{background:rgba(255,255,255,.14);}
.rafeeq-body{flex:1;overflow-y:auto;padding:16px;background:linear-gradient(180deg,#f3fafc 0%,#ffffff 40%);display:flex;flex-direction:column;}
.rafeeq-msg{display:flex;flex-direction:column;margin-bottom:14px;max-width:92%;gap:6px;}
.rafeeq-msg--bot{align-self:flex-start;align-items:flex-start;}
.rafeeq-msg--user{margin-inline-start:auto;align-self:flex-end;align-items:flex-end;}
.rafeeq-bubble{
  padding:11px 14px;border-radius:16px;font-size:13.8px;line-height:1.65;white-space:pre-wrap;word-break:break-word;
}
.rafeeq-msg--bot .rafeeq-bubble{
  background:#fff;border:1px solid #d7ecef;color:#1c3d44;
  border-start-start-radius:6px;box-shadow:0 4px 14px rgba(14,116,144,.06);
}
.rafeeq-msg--user .rafeeq-bubble{
  background:linear-gradient(135deg,#0e7490,#0891b2);color:#fff;
  border-start-end-radius:6px;
}
.rafeeq-meta{font-size:11px;color:#7a9aa1;margin-top:2px;}
.rafeeq-feedback{
  display:inline-flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;
  margin-top:2px;width:auto;max-width:100%;
}
.rafeeq-feedback button{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  border:1px solid #d3e8eb;background:#fff;border-radius:999px;
  padding:6px 12px;min-height:32px;font-size:12px;font-weight:700;font-family:inherit;
  cursor:pointer;color:#41646b;line-height:1;white-space:nowrap;
  transition:background .2s,border-color .2s,transform .15s,color .2s;
}
.rafeeq-feedback button i{font-size:15px;line-height:1;}
.rafeeq-feedback button:hover{background:#eef8fa;border-color:#9fd0d9;transform:translateY(-1px);}
.rafeeq-feedback button.rafeeq-fb-yes:hover{color:#0f766e;border-color:#99d5c8;background:#ecfdf8;}
.rafeeq-feedback button.rafeeq-fb-no:hover{color:#b45309;border-color:#f0c28a;background:#fff7ed;}
.rafeeq-feedback .rafeeq-meta{padding:4px 2px;}
.rafeeq-suggest{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px;}
.rafeeq-suggest button{
  border:1px solid #c5e3e8;background:#fff;color:#0e7490;border-radius:999px;padding:7px 12px;
  font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .2s;
}
.rafeeq-suggest button:hover{background:#e8f6f8;transform:translateY(-1px);}
.rafeeq-typing{display:none;gap:5px;padding:10px 14px;align-items:center;}
.rafeeq-typing.is-on{display:inline-flex;}
.rafeeq-typing span{width:7px;height:7px;border-radius:50%;background:#0891b2;opacity:.4;animation:rafeeqDot 1.1s infinite;}
.rafeeq-typing span:nth-child(2){animation-delay:.18s;}
.rafeeq-typing span:nth-child(3){animation-delay:.36s;}
@keyframes rafeeqDot{0%,80%,100%{opacity:.3;transform:translateY(0);}40%{opacity:1;transform:translateY(-3px);}}
.rafeeq-foot{padding:12px;border-top:1px solid #e4f0f2;background:#fff;display:flex;gap:8px;}
.rafeeq-foot input{
  flex:1;border:1px solid #d3e8eb;border-radius:14px;padding:11px 14px;font-family:inherit;font-size:14px;outline:none;
}
.rafeeq-foot input:focus{border-color:#0891b2;box-shadow:0 0 0 3px rgba(8,145,178,.12);}
.rafeeq-foot button{
  width:46px;height:46px;border:none;border-radius:14px;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,#0e7490,#0891b2);
}
.rafeeq-foot button:disabled{opacity:.55;cursor:not-allowed;}
.rafeeq-staff{display:flex;flex-direction:column;gap:8px;margin-top:10px;width:100%;}
.rafeeq-staff-btn{
  display:flex;align-items:center;gap:10px;text-decoration:none;color:#0b5c3b;
  background:linear-gradient(135deg,#e8fff3,#f4fff9);border:1px solid #b7ebc9;
  border-radius:14px;padding:10px 12px;transition:transform .2s,box-shadow .2s;
}
.rafeeq-staff-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,166,93,.18);}
.rafeeq-staff-btn i{font-size:22px;color:#25a65d;}
.rafeeq-staff-btn span{display:flex;flex-direction:column;gap:2px;line-height:1.25;}
.rafeeq-staff-btn strong{font-size:13.5px;}
.rafeeq-staff-btn small{font-size:11.5px;color:#4d7a63;}
.rafeeq-gate{flex:1;overflow-y:auto;padding:18px;background:linear-gradient(180deg,#f3fafc,#fff);}
.rafeeq-gate-form{display:flex;flex-direction:column;gap:8px;}
.rafeeq-gate-form h4{margin:0 0 4px;font-size:16px;color:#0c4a5a;}
.rafeeq-gate-form p{margin:0 0 8px;font-size:13px;color:#5b7a82;line-height:1.55;}
.rafeeq-gate-form label{font-size:12px;font-weight:700;color:#3d5f67;}
.rafeeq-gate-form input{
  border:1px solid #d3e8eb;border-radius:12px;padding:10px 12px;font-family:inherit;font-size:14px;outline:none;margin-bottom:4px;
}
.rafeeq-gate-form input:focus{border-color:#0891b2;box-shadow:0 0 0 3px rgba(8,145,178,.12);}
.rafeeq-gate-form button{
  margin-top:8px;border:none;border-radius:12px;padding:12px;font-family:inherit;font-weight:800;font-size:14px;
  color:#fff;cursor:pointer;background:linear-gradient(135deg,#0e7490,#0891b2);
}
@media (max-width:480px){
  .rafeeq-root{inset-inline-end:14px;bottom:86px;}
  .rafeeq-panel{height:min(70vh,520px);}
}
@media (prefers-reduced-motion:reduce){
  .rafeeq-fab,.rafeeq-panel,.rafeeq-typing span{animation:none !important;}
}
