#ruma-ai-root{
  all:initial;
  position:fixed;
  bottom:26px;
  right:26px;
  z-index:99999;

  --bg:#020617;
  --panel:#020617;
  --bot:#0b1220;
  --user:#22c55e;
  --accent:#22c55e;
  --text:#e5e7eb;
  --muted:#94a3b8;

  --header_from:#22c55e;
  --header_to:#16a34a;

  --radius:24px;
  --shadow:0 30px 80px rgba(0,0,0,.6);

  font-family:Inter,system-ui,sans-serif;
}

#ruma-ai-root *{
  box-sizing:border-box;
}

/* launcher */

.chat-launcher{
  width:70px;
  height:70px;
  border-radius:50%;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:var(--shadow);
  font-size:24px;
}

/* widget */

.chat-widget{
  position:fixed;
  bottom:110px;
  right:0;
  width:420px;
  height:640px;
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  display:none;
  flex-direction:column;
  overflow:hidden;
}

/* header */

.chat-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 18px;
  background:linear-gradient(135deg,var(--header_from),var(--header_to));
  color:#022c22;
}

.header-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.ai-avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  background:radial-gradient(circle,#fff,#d1fae5);
}

.ai-name{
  font-weight:700;
  font-size:14px;
}

.ai-status{
  font-size:11px;
  opacity:.8;
}

/* body */

.chat-body{
  flex:1;
  padding:18px;
  overflow-y:auto;
  background:var(--bg);
}

/* messages */

.msg-row{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}

.msg-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  background:linear-gradient(135deg,#22c55e,#16a34a);
}

.msg{
  max-width:75%;
  padding:12px 14px;
  border-radius:16px;
  font-size:14px;
  line-height:1.5;
  word-break:break-word;
}

.msg.bot{
  background:var(--bot);
  color:var(--text);
}

.msg.user{
  margin-left:auto;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#022c22;
}

/* footer */

.chat-footer{
  padding:12px;
  border-top:1px solid rgba(255,255,255,.06);
}

.footer-input{
  display:flex;
  align-items:center;
  gap:8px;
  background:#020617;
  border-radius:20px;
  padding:8px 10px;
}

textarea{
  flex:1;
  border:none;
  outline:none;
  resize:none;
  background:none;
  color:var(--text);
  font-size:14px;
  height:24px;
  max-height:120px;
  overflow-y:auto;
}

/* icons */

.footer-icon{
  cursor:pointer;
  color:var(--muted);
  display:flex;
  align-items:center;
}

.footer-icon.send{
  color:#22c55e;
}

/* emoji tray */

.emoji-tray{
  position:absolute;
  bottom:90px;
  left:16px;
  right:16px;
  background:var(--panel);
  border-radius:16px;
  padding:12px;
  display:none;
  grid-template-columns:repeat(8,1fr);
  gap:10px;
}

/* branding */

.branding{
  font-size:10px;
  color:var(--muted);
  text-align:center;
  padding:6px;
}

/* mobile */

@media(max-width:480px){

.chat-widget{
  width:96vw;
  height:92vh;
}

}