/* Advanced Floating Chat Widget (itemsatis vibe) */

.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #8b5cff, #35a7ff);
  box-shadow: 0 12px 30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08) inset;
}

.chat-fab .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #00ff9d;
  box-shadow: 0 0 10px rgba(0,255,157,.9);
  display:none;
}

.chat-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 360px;
  max-height: 560px;
  z-index: 99999;
  background: rgba(12,8,20,.98);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  overflow: hidden;
  display: none;
  box-shadow: 0 18px 50px rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
}

.chat-panel.show { display: flex; flex-direction: column; }

.chat-header {
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.chat-title {
  font-weight: 900; font-size: .95rem; color: #fff;
}
.chat-sub {
  font-size: .78rem; color: rgba(255,255,255,.7);
}

.chat-close {
  border: 0; cursor: pointer;
  background: rgba(255,255,255,.06);
  color: #fff; font-weight: 900;
  font-size: 14px; padding: 6px 10px;
  border-radius: 999px;
}

.chat-body {
  display:grid;
  grid-template-columns: 120px 1fr;
  height: 100%;
  min-height: 420px;
}

/* INBOX */
.chat-inbox {
  border-right:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  display:flex; flex-direction:column;
}
.inbox-head{
  padding:8px; font-weight:900; font-size:.8rem; color:#fff;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.inbox-list{
  overflow:auto; display:flex; flex-direction:column; gap:4px;
  padding:6px;
}
.inbox-item{
  padding:8px; border-radius:10px; cursor:pointer;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.35);
  color:#fff; font-weight:800; font-size:.82rem;
  display:flex; flex-direction:column; gap:2px;
}
.inbox-item.active{
  background: rgba(139,92,255,.18);
  border-color:rgba(139,92,255,.65);
}
.inbox-item .last{
  font-size:.72rem; opacity:.8; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* RIGHT SIDE */
.chat-right{
  display:grid;
  grid-template-rows: auto 1fr auto;
  height:100%;
}

.chat-topbar {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display:flex; gap:6px; align-items:center;
  background: rgba(255,255,255,.03);
}
.chat-topbar input {
  flex:1; background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 999px; padding: 7px 10px; color:#fff; outline:0;
  font-size:.9rem;
}
.chat-topbar button {
  border:0; cursor:pointer; font-weight:900; color:#fff;
  padding:7px 10px; border-radius:999px;
  background: linear-gradient(90deg,#8b5cff,#35a7ff);
}

.chat-messages {
  padding: 10px;
  overflow-y: auto;
  display:flex; flex-direction:column; gap:6px;
}

.msg {
  display:flex; gap:6px; align-items:flex-end;
  max-width: 88%;
}
.msg.me { align-self:flex-end; flex-direction:row-reverse; }
.msg .bubble {
  padding: 8px 10px; border-radius: 12px;
  font-size: .9rem; line-height:1.35;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color:#fff;
}
.msg.me .bubble{
  background: linear-gradient(180deg, rgba(139,92,255,.9), rgba(53,167,255,.9));
  border:0;
}
.msg .meta{
  font-size:.72rem; opacity:.75; margin-top:2px;
}

.seen{
  font-size:.72rem; opacity:.7; margin-top:2px; text-align:right;
}

.chat-inputbar {
  padding: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex; gap:6px; align-items:center;
  background: rgba(255,255,255,.03);
}
.chat-inputbar input{
  flex:1; background: rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.1);
  border-radius: 999px; padding: 8px 10px; color:#fff; outline:0;
}
.chat-inputbar button{
  border:0; cursor:pointer; font-weight:900; color:#fff;
  padding:8px 12px; border-radius:999px;
  background: linear-gradient(90deg,#8b5cff,#35a7ff);
}
