/* ════════════════════════════════════════════════════════════════════════
   AI Chat Widget Styles
   ════════════════════════════════════════════════════════════════════════ */

.chat-fab{
  position:fixed;bottom:20px;left:20px;z-index:80;
  width:58px;height:58px;border-radius:50%;
  background:var(--gold-grad);color:#06101d;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 12px 30px -5px rgba(212,183,101,.6);
  transition:all .3s var(--ease);
}
.chat-fab:hover{transform:scale(1.06);}
.chat-fab svg{width:24px;height:24px;}
.chat-fab .ping{
  position:absolute;top:-2px;right:-2px;
  width:14px;height:14px;border-radius:50%;
  background:var(--red);border:2px solid var(--bg);
  animation:pulse 1.5s ease-in-out infinite;
}

.chat-win{
  position:fixed;bottom:20px;left:20px;z-index:200;
  width:min(380px, calc(100vw - 40px));
  height:min(560px, calc(100vh - 100px));
  background:var(--surface);
  border:1px solid var(--line-2);
  border-radius:var(--r-xl);
  box-shadow:0 30px 60px -10px rgba(0,0,0,.5);
  display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(20px) scale(.96);
  opacity:0;visibility:hidden;
  transition:all .35s var(--ease);
}
.chat-win.open{
  transform:translateY(0) scale(1);
  opacity:1;visibility:visible;
}

.chat-hdr{
  padding:14px;
  background:linear-gradient(135deg, var(--bg-2), var(--surface));
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:12px;
}
.chat-av{
  width:42px;height:42px;border-radius:50%;
  background:var(--gold-grad);
  display:flex;align-items:center;justify-content:center;
  color:#06101d;font-family:'Cairo',sans-serif;font-weight:900;font-size:1rem;
  position:relative;flex-shrink:0;
}
.chat-av::after{
  content:'';position:absolute;bottom:1px;right:1px;
  width:10px;height:10px;border-radius:50%;
  background:var(--emerald);border:2px solid var(--surface);
}
.chat-titles{flex:1;line-height:1.3;min-width:0;}
.chat-titles .nm{font-family:'Cairo',sans-serif;font-weight:800;font-size:.95rem;color:var(--text);}
.chat-titles .st{font-size:.72rem;color:var(--emerald);font-weight:700;}
.chat-x{
  width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);background:var(--bg-2);
}
.chat-x svg{width:14px;height:14px;}

.chat-body{
  flex:1;overflow-y:auto;padding:14px;
  display:flex;flex-direction:column;gap:10px;
  background:var(--bg);
}
.bubble{
  max-width:85%;padding:10px 14px;border-radius:14px;
  font-size:.88rem;line-height:1.7;
  animation:bubbleIn .3s var(--ease);word-wrap:break-word;
}
@keyframes bubbleIn{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:translateY(0);}}
.bubble.bot{
  align-self:flex-end;
  background:var(--surface);
  border:1px solid var(--line);
  border-bottom-right-radius:4px;
  color:var(--text);
}
.bubble.you{
  align-self:flex-start;
  background:var(--gold-grad);
  color:#06101d;font-weight:600;
  border-bottom-left-radius:4px;
}
.bubble p{margin:0;color:inherit;font-size:inherit;}
.bubble p+p{margin-top:6px;}
.bubble ul{margin:6px 0;padding-right:18px;list-style:disc;}
.bubble li{margin-bottom:2px;}
.bubble strong{font-weight:800;}

.chat-chips{
  padding:0 14px 10px;
  display:flex;gap:6px;flex-wrap:wrap;background:var(--bg);
}
.chip{
  padding:6px 12px;border-radius:999px;
  background:var(--surface);border:1px solid var(--line);
  font-family:'Cairo',sans-serif;font-weight:600;font-size:.76rem;
  color:var(--text-2);transition:all .25s var(--ease);cursor:pointer;
}
.chip:hover{
  background:rgba(212,183,101,.1);
  color:var(--gold-400);border-color:var(--line-2);
}

.chat-input-row{
  padding:10px;border-top:1px solid var(--line);
  background:var(--surface);
  display:flex;gap:8px;align-items:flex-end;
}
.chat-input{
  flex:1;padding:9px 13px;border-radius:14px;
  border:1px solid var(--line);background:var(--bg-2);
  color:var(--text);font-family:'Tajawal',sans-serif;font-size:.88rem;
  resize:none;max-height:80px;min-height:40px;
  transition:all .25s var(--ease);
}
.chat-input:focus{outline:none;border-color:var(--gold-400);}
.chat-send{
  width:40px;height:40px;border-radius:50%;
  background:var(--gold-grad);color:#06101d;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.chat-send:disabled{opacity:.4;cursor:not-allowed;}
.chat-send svg{width:17px;height:17px;}

.typing{
  display:flex;align-items:center;gap:4px;
  padding:12px 14px;background:var(--surface);
  border:1px solid var(--line);border-radius:14px;
  border-bottom-right-radius:4px;align-self:flex-end;width:max-content;
}
.typing span{
  width:6px;height:6px;border-radius:50%;
  background:var(--text-2);
  animation:typing 1.4s ease-in-out infinite;
}
.typing span:nth-child(2){animation-delay:.2s;}
.typing span:nth-child(3){animation-delay:.4s;}
@keyframes typing{
  0%,60%,100%{opacity:.3;transform:translateY(0);}
  30%{opacity:1;transform:translateY(-4px);}
}
