/* cosnet-chat.css — place in /wp-content/plugins/cosnet-chat/ */

/* ── Shared components ─────────────────────────── */
.cosnet-head {
  background: #0D4F3C;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cosnet-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #0D4F3C;
  flex-shrink: 0;
}
.cosnet-head-text p  { margin: 0; font-size: 14px; font-weight: 500; color: #fff; }
.cosnet-head-text span { font-size: 11px; color: rgba(255,255,255,0.65); }
.cosnet-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-left: auto; flex-shrink: 0; }

.cosnet-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.cosnet-msgs::-webkit-scrollbar { width: 4px; }
.cosnet-msgs::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.cosnet-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 88%; }
.cosnet-msg.cosnet-user { align-self: flex-end; flex-direction: row-reverse; }

.cosnet-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.cosnet-msg.cosnet-bot  .cosnet-av { background: #0D4F3C; color: #fff; }
.cosnet-msg.cosnet-user .cosnet-av { background: #e0e7ff; color: #3730a3; }

.cosnet-bubble { padding: 9px 13px; font-size: 13px; line-height: 1.55; border-radius: 16px; }
.cosnet-msg.cosnet-bot  .cosnet-bubble { background: #f3f4f6; color: #111; border-radius: 4px 14px 14px 14px; }
.cosnet-msg.cosnet-user .cosnet-bubble { background: #0D4F3C; color: #fff; border-radius: 14px 4px 14px 14px; }

.cosnet-typing { display: flex; gap: 4px; align-items: center; padding: 9px 13px; }
.cosnet-typing span { width: 6px; height: 6px; border-radius: 50%; background: #9ca3af; display: inline-block; animation: cosnet-bounce 1.2s infinite; }
.cosnet-typing span:nth-child(2) { animation-delay: 0.2s; }
.cosnet-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cosnet-bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

.cosnet-chips { padding: 0 14px 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.cosnet-chip {
  font-size: 11px; padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid #d1d5db;
  color: #555; background: transparent;
  cursor: pointer;
  transition: all 0.12s;
}
.cosnet-chip:hover { background: #0D4F3C; color: #fff; border-color: #0D4F3C; }

.cosnet-input-row { padding: 10px 14px 14px; border-top: 1px solid #f0f0f0; display: flex; gap: 8px; flex-shrink: 0; }
.cosnet-input {
  flex: 1; padding: 9px 14px;
  border-radius: 22px;
  border: 1px solid #d1d5db;
  font-size: 13px; outline: none;
  background: #f9fafb; color: #111;
}
.cosnet-input:focus { border-color: #0D4F3C; background: #fff; }
.cosnet-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #0D4F3C; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
  transition: opacity 0.15s;
}
.cosnet-send-btn:hover { opacity: 0.85; }
.cosnet-send-btn svg { width: 14px; height: 14px; }

/* ── Inline embed ──────────────────────────────── */
.cosnet-inline-wrap {
  max-width: 520px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0 auto;
}

/* ── Floating widget ────────────────────────────── */
#cosnet-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #0D4F3C; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 99999;
  transition: transform 0.15s;
  color: #fff;
}
#cosnet-fab:hover { transform: scale(1.06); }
#cosnet-fab svg { width: 24px; height: 24px; }

#cosnet-float-panel {
  position: fixed; bottom: 90px; right: 24px;
  width: 360px; height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: none; flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#cosnet-float-panel.cosnet-open { display: flex; }

@media (max-width: 420px) {
  #cosnet-float-panel { width: calc(100vw - 24px); right: 12px; bottom: 80px; }
  #cosnet-fab { right: 12px; bottom: 12px; }
}
