/* VA Simple Chatbot - minimal, theme-agnostic */
:root{
  --va-chatbot-primary: #F59E0B;
  --va-chatbot-bg: #111827;
  --va-chatbot-panel: #0B1220;
  --va-chatbot-muted: rgba(255,255,255,.72);
  --va-chatbot-border: rgba(255,255,255,.12);
  --va-chatbot-shadow: 0 18px 60px rgba(0,0,0,.28);
  --va-chatbot-radius: 18px;
  --va-chatbot-font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

#va-chatbot-launcher{
  position: fixed;
  left: 18px;
  right: auto;
bottom: 18px;
  z-index: 999999;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--va-chatbot-primary);
  box-shadow: var(--va-chatbot-shadow);
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
#va-chatbot-launcher:focus{ outline: 3px solid rgba(245,158,11,.35); outline-offset: 3px; }

#va-chatbot-launcher svg{
  width: 26px;
  height: 26px;
  fill: #111827;
}

#va-chatbot-panel{
  position: fixed;
  left: 18px;
  right: auto;
  bottom: 84px;
  z-index: 999999;
  width: min(380px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 140px));
  background: linear-gradient(180deg, rgba(245,158,11,.10), rgba(255,255,255,0)) , var(--va-chatbot-panel);
  border: 1px solid var(--va-chatbot-border);
  border-radius: var(--va-chatbot-radius);
  box-shadow: var(--va-chatbot-shadow);
  overflow: hidden;
  display: none;
  font-family: var(--va-chatbot-font);
}
#va-chatbot-panel.va-open{ display: grid; grid-template-rows: auto 1fr auto; }

.va-cb-header{
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--va-chatbot-border);
  background: rgba(17,24,39,.35);
  backdrop-filter: blur(10px);
}
.va-cb-title{
  display:flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.va-cb-title strong{
  color: #fff;
  font-size: 14px;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.va-cb-title span{
  color: var(--va-chatbot-muted);
  font-size: 12px;
}
.va-cb-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}
.va-cb-btn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--va-chatbot-border);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.va-cb-btn svg{ width: 18px; height: 18px; fill: rgba(255,255,255,.88); }
.va-cb-btn:hover{ border-color: rgba(245,158,11,.55); }

.va-cb-body{
  padding: 12px;
  overflow: auto;
}
.va-cb-msg{
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.va-cb-msg.va-user{ justify-content: flex-end; }
.va-cb-bubble{
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--va-chatbot-border);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.va-cb-msg.va-user .va-cb-bubble{
  background: rgba(245,158,11,.18);
  border-color: rgba(245,158,11,.40);
}
.va-cb-meta{
  font-size: 11px;
  color: var(--va-chatbot-muted);
  margin-top: 4px;
}

.va-cb-footer{
  border-top: 1px solid var(--va-chatbot-border);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
  background: rgba(17,24,39,.35);
  backdrop-filter: blur(10px);
}
.va-cb-input{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--va-chatbot-border);
  background: rgba(255,255,255,.04);
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
}
.va-cb-input::placeholder{ color: rgba(255,255,255,.55); }

.va-cb-send{
  border: 0;
  border-radius: 12px;
  background: var(--va-chatbot-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.va-cb-send svg{ width: 18px; height: 18px; fill: #111827; }
.va-cb-send:disabled{ opacity: .55; cursor: not-allowed; }

.va-cb-quick{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.va-cb-chip{
  border: 1px solid var(--va-chatbot-border);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.88);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.va-cb-chip:hover{ border-color: rgba(245,158,11,.55); }

.va-cb-typing{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  color: var(--va-chatbot-muted);
  font-size: 12px;
}
.va-cb-dots{
  display:inline-flex;
  gap: 3px;
}
.va-cb-dots span{
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  animation: vaCbBlink 1.2s infinite ease-in-out;
}
.va-cb-dots span:nth-child(2){ animation-delay: .15s; }
.va-cb-dots span:nth-child(3){ animation-delay: .3s; }

@keyframes vaCbBlink{
  0%, 80%, 100% { transform: scale(.7); opacity: .55; }
  40% { transform: scale(1); opacity: 1; }
}


/* Attention pulse (launcher blinking) */
#va-chatbot-launcher{
  color: var(--va-chatbot-primary);
  overflow: visible;
}
#va-chatbot-launcher::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:999px;
  background: currentColor;
  opacity: .20;
  animation: vaCbLauncherPulse 1.6s ease-out infinite;
  pointer-events:none;
}
@keyframes vaCbLauncherPulse{
  0%{ transform: scale(.88); opacity:.22; }
  70%{ transform: scale(1.18); opacity:0; }
  100%{ transform: scale(1.18); opacity:0; }
}

/* Panel pop animation */
#va-chatbot-panel.va-open{
  animation: vaCbPop .18s ease-out;
}
@keyframes vaCbPop{
  from{ transform: translateY(10px) scale(.98); opacity:.85; }
  to{ transform: translateY(0) scale(1); opacity:1; }
}

@media (prefers-reduced-motion: reduce){
  #va-chatbot-launcher::before{ animation:none !important; }
  #va-chatbot-panel.va-open{ animation:none !important; }
}


/* Force position to bottom-left */
#va-chatbot-launcher{ left: 18px !important; right: auto !important; bottom: 18px !important; }
#va-chatbot-panel{ left: 18px !important; right: auto !important; bottom: 84px !important; }


/* Robot mascot (orange + silver) */
.va-cb-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
  position: relative;
}
.va-robot-avatar{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--va-chatbot-border);
  background: rgba(255,255,255,.04);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
  transform: translateY(8px) scale(.92);
  opacity: .0;
}
.va-robot-avatar svg{ width: 34px; height: 34px; }
.va-robot-silver{ fill: #D6D6D6; }
.va-robot-orange{ fill: var(--va-chatbot-primary); }
.va-robot-panel{ fill: rgba(17,24,39,.92); }
.va-robot-eye{ fill: #FFFFFF; opacity: .92; }
.va-robot-mouth{ fill: rgba(255,255,255,.85); }

.va-robot-bubble{
  position: absolute;
  left: 44px;
  top: -6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,.38);
  background: rgba(245,158,11,.16);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  pointer-events:none;
}

/* Animate robot "fly out" when panel opens (first time) */
#va-chatbot-panel.va-open .va-robot-avatar{
  animation: vaRobotFly .42s cubic-bezier(.2,.8,.2,1) forwards;
}
#va-chatbot-panel.va-hello .va-robot-bubble{
  animation: vaHelloBubble .55s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes vaRobotFly{
  from{ transform: translateY(10px) scale(.86); opacity: 0; }
  to{ transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes vaHelloBubble{
  0%{ opacity:0; transform: translateY(10px) scale(.96); }
  35%{ opacity:1; transform: translateY(0) scale(1); }
  80%{ opacity:1; }
  100%{ opacity:0; transform: translateY(-4px) scale(.98); }
}

@media (prefers-reduced-motion: reduce){
  #va-chatbot-panel.va-open .va-robot-avatar{ animation:none !important; opacity:1 !important; transform:none !important; }
  #va-chatbot-panel.va-hello .va-robot-bubble{ animation:none !important; opacity:1 !important; transform:none !important; }
}
