/* RBKI Neon Chat Plugin – scoped neon UI */
.rbki-plugin{
  --bg0:#05060a;
  --bg1:#0a1022;
  --txt:#e9f2ff;
  --muted:rgba(233,242,255,.70);
  --stroke:rgba(255,255,255,.14);
  --glass:rgba(255,255,255,.06);
  --shadow:0 18px 55px rgba(0,0,0,.55);
  --cyan:#00e5ff;
  --pink:#ff2bd6;
  --green:#5bff9b;
  --violet:#8a5cff;

  color:var(--txt);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.rbki-plugin, .rbki-plugin *{ box-sizing:border-box; }
.rbki-plugin a{ color:var(--txt); }

.rbki-plugin .rbki-chatcard{
  width:100%;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--stroke);
  border-radius:22px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}

.rbki-plugin .rbki-chathead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 14px;
  background:linear-gradient(90deg, rgba(0,229,255,.18), rgba(255,43,214,.12));
  border-bottom:1px solid rgba(255,255,255,.10);
}
.rbki-plugin .rbki-chatname{ font-weight:950; letter-spacing:.3px; font-size:20px; }
.rbki-plugin .rbki-chatdesc{ color:var(--muted); font-weight:650; font-size:13px; margin-top:2px; }
.rbki-plugin .rbki-status{ font-size:12px; color:var(--muted); }

.rbki-plugin .rbki-toolbar{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:10px 12px;
  background:rgba(0,0,0,.18);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.rbki-plugin .rbki-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--txt);
  padding:8px 10px;
  border-radius:14px;
  cursor:pointer;
  font-weight:850;
  letter-spacing:.2px;
}
.rbki-plugin .rbki-btn:hover{ opacity:.92; }
.rbki-plugin .rbki-btn.is-on{
  border-color: rgba(0,229,255,.55);
  box-shadow: 0 0 0 3px rgba(0,229,255,.12);
}
.rbki-plugin .rbki-spacer{ flex:1; }
.rbki-plugin .rbki-file{ display:none; }

.rbki-plugin .rbki-hint{
  padding:8px 14px;
  font-size:13px;
  color:var(--muted);
  min-height: 20px;
}

.rbki-plugin .rbki-attachments{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding: 0 14px 10px;
}
.rbki-plugin .rbki-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  font-size:12px;
  color:var(--muted);
}
.rbki-plugin .rbki-chip button{
  border:0;
  background:transparent;
  color:var(--txt);
  cursor:pointer;
  opacity:.85;
}
.rbki-plugin .rbki-chip button:hover{opacity:1;}

.rbki-plugin .rbki-out{
  padding: 14px;
  /* Default: not too high. Grows with content until max-height, then scrolls. */
  height: auto;
  min-height:20px;
  max-height: min(62vh, 680px);
  overflow:auto;
  background:
    radial-gradient(900px 450px at 20% 0%, rgba(0,229,255,.08), transparent 60%),
    radial-gradient(820px 420px at 90% 30%, rgba(255,43,214,.07), transparent 60%),
    rgba(0,0,0,.18);
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.06);
}


.rbki-plugin .rbki-msg{
  display:flex;
  gap:10px;
  margin: 10px 0;
}
.rbki-plugin .rbki-avatar{
  width:32px; height:32px; border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 18px rgba(0,229,255,.10);
  flex:0 0 auto;
}
.rbki-plugin .rbki-bubble{
  flex:1;
  padding: 12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--txt);
  line-height: 1.5;
  white-space: pre-wrap;
}
.rbki-plugin .rbki-msg.user .rbki-avatar{ box-shadow: 0 0 18px rgba(255,43,214,.12); }
.rbki-plugin .rbki-msg.user .rbki-bubble{ background: rgba(255,43,214,.06); border-color: rgba(255,43,214,.18); }

.rbki-plugin .rbki-cites{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.rbki-plugin .rbki-cites a{ color: var(--txt); opacity:.9; text-decoration:none; }
.rbki-plugin .rbki-cites a:hover{ text-decoration:underline; opacity:1; }
.rbki-plugin .rbki-cites small{ color: var(--muted); display:block; margin-bottom: 6px; }

.rbki-plugin .rbki-inputwrap{
  display:flex;
  gap:10px;
  padding: 12px;
  background: rgba(0,0,0,.18);
}
.rbki-plugin .rbki-input{
  flex:1;
  min-height:50px;
  max-height: 160px;
  resize: vertical;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: var(--txt);
  padding: 10px 12px;
  outline:none;
}
.rbki-plugin .rbki-input:focus{
  border-color: rgba(0,229,255,.55);
  box-shadow: 0 0 0 3px rgba(0,229,255,.12);
}
.rbki-plugin .rbki-send{
  border:0;
  border-radius:16px;
  background: linear-gradient(90deg, rgba(0,229,255,.28), rgba(255,43,214,.20));
  color: var(--txt);
  font-weight: 900;
  padding: 10px 14px;
  cursor:pointer;
}
.rbki-plugin .rbki-send:hover{ opacity:.92; }
.rbki-plugin .rbki-send:disabled{ opacity:.55; cursor:not-allowed; }

.rbki-plugin .rbki-progress{
  height: 6px;
  background: rgba(255,255,255,.10);
  margin: 0 12px 12px;
  border-radius:999px;
  overflow:hidden;
}
.rbki-plugin .rbki-progressbar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0,229,255,.85), rgba(255,43,214,.70));
}

@media (max-width:520px){
  .rbki-plugin .rbki-out{
  padding: 14px;
  /* Default: not too high. Grows with content until max-height, then scrolls. */
  height: auto;
  min-height:50px;
  max-height: min(62vh, 680px);
  overflow:auto;
  background:
    radial-gradient(900px 450px at 20% 0%, rgba(0,229,255,.08), transparent 60%),
    radial-gradient(820px 420px at 90% 30%, rgba(255,43,214,.07), transparent 60%),
    rgba(0,0,0,.18);
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.06);
}

  .rbki-plugin .rbki-chatname{ font-size:18px; }
}

/* Media bubbles (images) */
.rbki-plugin .rbki-bubble--media{ padding:10px; }
.rbki-plugin .rbki-msg--image .rbki-bubble{ max-width: min(680px, 100%); }
.rbki-plugin .rbki-img{ display:block; width:100%; max-width:520px; height:auto; border-radius:14px; border:1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.25); }
.rbki-plugin .rbki-caption{ margin-top:8px; font-size:12px; color: rgba(233,242,255,.72); }


/* Lightbox for inline images */
.rbki-lightbox{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  z-index: 99999;
}
.rbki-lightbox.is-open{ display:flex; }
.rbki-lightbox__panel{
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,16,34,.55);
  box-shadow: 0 24px 80px rgba(0,0,0,.65);
  overflow:hidden;
}
.rbki-lightbox__img{
  display:block;
  width: 100%;
  height: auto;
  max-height: 92vh;
}
.rbki-lightbox__bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: rgba(233,242,255,.86);
  font-weight: 800;
}
.rbki-lightbox__close{
  appearance:none;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(233,242,255,.92);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 900;
}
.rbki-lightbox__close:hover{ opacity:.92; }

.rbki-plugin .rbki-img{ cursor: zoom-in; }
