/* chatbot.css — the WASTRAQ chatbot widget (index.html only).
   Previously injected at runtime via a <style> tag from js/chatbot.js;
   extracted here as a real stylesheet so it can be linked normally.
   Depends on: nothing outside this file — no shared variables used. */

/* ── Launcher button ── */
.wq-chat-launcher{
  position:fixed;bottom:24px;right:24px;z-index:9998;
  width:56px;height:56px;border-radius:50%;
  background:linear-gradient(90deg, #6FBB59 0%, #159D91 45%, #0750AD 100%) !important;
  border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 20px rgba(21,157,145,.4);
  transition:transform .2s,box-shadow .2s;
  outline:none;
}
.wq-chat-launcher:hover{transform:scale(1.06);box-shadow:0 6px 28px rgba(7,80,173,.5);}
.wq-chat-launcher:focus-visible{outline:3px solid #22c55e;outline-offset:3px;}
.wq-chat-launcher svg{transition:transform .3s;}
.wq-chat-launcher.open svg.icon-chat{display:none}
.wq-chat-launcher.open svg.icon-close{display:block!important}
.wq-chat-launcher svg.icon-close{display:none}

/* Notification dot */
.wq-chat-dot{
  position:absolute;top:3px;right:3px;width:11px;height:11px;
  border-radius:50%;background:#f59e0b;
  border:2px solid #fff;
  animation:wqPulse 2s ease infinite;
}
@keyframes wqPulse{0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,.4)}50%{box-shadow:0 0 0 5px rgba(245,158,11,0)}}

/* ── Widget window ── */
.wq-chat-window{
  position:fixed;bottom:90px;right:24px;z-index:9999;
  width:360px;max-width:calc(100vw - 32px);
  height:520px;max-height:calc(100vh - 120px);
  background:#fff;border-radius:18px;
  box-shadow:0 16px 56px rgba(10,32,22,.18),0 2px 8px rgba(10,32,22,.1);
  display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(16px) scale(.96);opacity:0;pointer-events:none;
  transition:transform .3s cubic-bezier(.22,.68,0,1.2),opacity .25s ease;
}
.wq-chat-window.visible{transform:translateY(0) scale(1);opacity:1;pointer-events:all;}

/* ── Header ── */
.wq-chat-header{
  background:linear-gradient(135deg,#0a2016,#14502e);
  padding:16px 18px;display:flex;align-items:center;gap:12px;flex-shrink:0;
}
.wq-chat-header-avatar{
  width:38px;height:38px;border-radius:50%;
  background:rgba(34,197,94,.18);border:2px solid rgba(34,197,94,.35);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.wq-chat-header-info{flex:1;min-width:0;}
.wq-chat-header-name{font-size:.9rem;font-weight:800;color:#fff;line-height:1.2;}
.wq-chat-header-status{font-size:.72rem;color:rgba(255,255,255,.6);display:flex;align-items:center;gap:5px;margin-top:2px;}
.wq-chat-status-dot{width:6px;height:6px;border-radius:50%;background:#22c55e;flex-shrink:0;}
.wq-chat-close-btn{background:none;border:none;cursor:pointer;color:rgba(255,255,255,.6);padding:4px;border-radius:6px;display:flex;align-items:center;transition:color .15s;}
.wq-chat-close-btn:hover{color:#fff;}

/* ── Messages ── */
.wq-chat-messages{
  flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;
  scroll-behavior:smooth;
}
.wq-chat-messages::-webkit-scrollbar{width:4px;}
.wq-chat-messages::-webkit-scrollbar-track{background:transparent;}
.wq-chat-messages::-webkit-scrollbar-thumb{background:#e2ead0;border-radius:4px;}

/* Bubble rows */
.wq-msg{display:flex;gap:8px;align-items:flex-end;max-width:88%;}
.wq-msg.bot{align-self:flex-start;}
.wq-msg.user{align-self:flex-end;flex-direction:row-reverse;}

/* Bubble */
.wq-bubble{
  padding:10px 13px;border-radius:14px;font-size:.875rem;line-height:1.6;word-break:break-word;white-space:pre-wrap;
}
.wq-msg.bot .wq-bubble{background:#f0fdf4;color:#0d1f0b;border-bottom-left-radius:4px;}
.wq-msg.user .wq-bubble{background:#16a34a;color:#fff;border-bottom-right-radius:4px;}

/* Bot avatar in message
   NOTE: pre-existing bug carried over as-is from the original inline styles —
   this rule body contains a stray <img> tag instead of CSS declarations, so
   .wq-msg-avatar currently has no real styling. Flagged, not fixed, per
   "don't reduce or skip content." */
.wq-msg-avatar{
  <img src="assets/images/index_wastraq_logo.png" alt="WASTRAQ" height="40" width="80" style="display:block;">
}

/* Typing indicator */
.wq-typing{display:flex;align-items:center;gap:4px;padding:10px 13px;background:#f0fdf4;border-radius:14px;border-bottom-left-radius:4px;}
.wq-typing span{width:7px;height:7px;border-radius:50%;background:#7c9177;animation:wqDot 1.2s ease infinite;}
.wq-typing span:nth-child(2){animation-delay:.2s;}
.wq-typing span:nth-child(3){animation-delay:.4s;}
@keyframes wqDot{0%,80%,100%{transform:translateY(0)}40%{transform:translateY(-6px)}}

/* ── Buttons strip ── */
.wq-chat-buttons{
  padding:4px 16px 10px;display:flex;flex-wrap:wrap;gap:6px;
}
.wq-chat-btn{
  display:inline-flex;align-items:center;gap:5px;
  padding:6px 12px;border-radius:100px;border:1.5px solid #e2ead0;
  background:#fff;color:#14502e;font-size:.77rem;font-weight:700;
  cursor:pointer;transition:all .15s;font-family:inherit;white-space:nowrap;
}
.wq-chat-btn:hover{background:#f0fdf4;border-color:#22c55e;color:#14502e;}

/* ── Link chip ── */
.wq-chat-link-chip{
  margin:4px 16px 8px;padding:8px 12px;
  background:#f0fdf4;border:1px solid #dcfce7;border-radius:8px;
  display:flex;align-items:center;gap:7px;text-decoration:none;
  font-size:.78rem;font-weight:700;color:#14502e;
  transition:background .18s;
}
.wq-chat-link-chip:hover{background:#dcfce7;}

/* ── Input bar ── */
.wq-chat-input-bar{
  padding:10px 12px;border-top:1px solid #e2ead0;display:flex;gap:8px;align-items:flex-end;flex-shrink:0;
}
.wq-chat-input{
  flex:1;resize:none;border:1.5px solid #e2ead0;border-radius:10px;
  padding:9px 12px;font-family:inherit;font-size:.88rem;color:#0d1f0b;
  background:#f8faf7;outline:none;line-height:1.5;max-height:100px;
  transition:border-color .18s,box-shadow .18s;
}
.wq-chat-input:focus{border-color:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.12);background:#fff;}
.wq-chat-send{
  width:38px;height:38px;border-radius:10px;background:linear-gradient(90deg, #6FBB59 0%, #159D91 45%, #0750AD 100%) !important;
  border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;transition:transform .12s,filter .18s;
}
.wq-chat-send:hover{filter:brightness(1.1);transform:scale(1.04);}
.wq-chat-send:disabled{opacity:.5;cursor:not-allowed;transform:none;}

/* ── Powered-by strip ── */
.wq-chat-powered{
  padding:6px 12px;text-align:center;font-size:.68rem;color:#7c9177;border-top:1px solid #f0fdf4;flex-shrink:0;
}

/* ── Mobile overrides ── */
@media(max-width:480px){
  .wq-chat-window{right:12px;bottom:80px;width:calc(100vw - 24px);height:calc(100vh - 100px);}
  .wq-chat-launcher{bottom:16px;right:16px;}
}
