.chat-float-window{
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 340px; height: 440px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(7,17,32,0.14);
  display: none; flex-direction: column;
  overflow: hidden;
}
.chat-float-window.open{ display: flex; }
.chat-float-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-float-user{ font-size: 14.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.chat-float-actions{ display: flex; align-items: center; gap: 2px; }
.chat-float-dots-wrap{ position: relative; }
.chat-float-dots{
  background: none; border: none; font-size: 20px; line-height: 1;
  color: var(--ink-dim); cursor: pointer; padding: 4px 6px; border-radius: 6px;
  letter-spacing: -1px;
}
.chat-float-dots:hover{ color: var(--ink); background: var(--surface); }
.chat-float-dots-menu{
  position: absolute; top: 100%; right: 0; z-index: 60;
  min-width: 160px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(7,17,32,0.1);
  display: none; flex-direction: column;
  overflow: hidden;
}
.chat-float-dots-menu.open{ display: flex; }
.chat-float-dots-item{
  padding: 10px 14px; font-size: 13px; color: var(--ink);
  text-decoration: none; transition: background 0.12s;
}
.chat-float-dots-item:hover{ background: var(--surface); }
.chat-float-close{
  background: none; border: none; font-size: 22px;
  color: var(--ink-dim); cursor: pointer; line-height: 1; padding: 2px;
}
.chat-float-close:hover{ color: var(--ink); }
.chat-float-minimize{
  background: none; border: none; font-size: 18px; font-weight: 700;
  color: var(--ink-dim); cursor: pointer; line-height: 1; padding: 2px 6px;
}
.chat-float-minimize:hover{ color: var(--ink); }
.chat-float-msgs{
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface);
}
.chat-input-row{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input-row .chat-input{
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: 'Inter', sans-serif;
  background: var(--surface); color: var(--ink);
  outline: none;
}
.chat-input-row .chat-input:focus{ border-color: var(--signal); }
.chat-send-btn{
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  cursor: pointer;
  color: var(--signal);
  padding: 4px;
  transition: color 0.15s;
}
.chat-send-btn:hover{ color: var(--signal-hover); }
.chat-send-btn:disabled{ opacity: 0.35; cursor: default; }
.chat-send-btn svg{ width: 20px; height: 20px; }
.chat-msg{
  max-width: 85%; padding: 10px 14px; border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500; line-height: 1.5; word-wrap: break-word;
  overflow-wrap: break-word; word-break: break-word;
}
.chat-msg.sent{
  align-self: flex-end;
  background: var(--signal); color: #071120;
  border-bottom-right-radius: 3px;
}
.chat-msg.received{
  align-self: flex-start;
  background: var(--paper); color: var(--ink);
  border-bottom-left-radius: 3px;
}
#chatFloatUser{
  display: flex; align-items: center;
  font-size: 15px; font-weight: 600; color: #fff;
}
.chat-msg-divider{
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--signal); padding: 10px 0 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.chat-msg-time{ font-size: 10px; opacity: 0.7; margin-top: 3px; display: block; }
.chat-typing{ font-size: 13px; color: var(--ink-dim); text-align: center; padding: 20px 0; }

.chat-float-bubble{
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--signal);
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.chat-float-bubble:hover{ transform: scale(1.08); }
.chat-float-bubble.open{ display: flex; }
.chat-float-bubble img{ width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-float-bubble .bubble-initials{ font-size: 18px; font-weight: 700; color: #fff; }

@media(max-width:768px) and (min-width:481px){
  .chat-float-window{ width: 300px; right: 20px; }
}
@media(max-width:480px){
  .chat-float-window{ width: calc(100vw - 32px); right: 16px; bottom: 16px; height: 50vh; }
}
