/* ============================================================
   VegasBet — Support chat widget (Phase 4.10)
   Live-chat additions to the floating chat popup whose shell
   styles (circle button, popup frame, input row) live in
   betslip.css.
   ============================================================ */

/* Unread counter on the floating circle button */
.fp-chat-unread {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  pointer-events: none;
}

.fp-chat-unread.is-visible {
  display: block;
}

/* ── Chat header (avatar + online status) ───────────────── */
.bp-header--chat {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0.04));
  border-bottom: 1px solid rgba(124, 58, 237, 0.16);
  padding: 16px;
}
.chat-ava {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
}
.chat-ava svg { width: 20px; height: 20px; }
.chat-ava-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #34d399; border: 2px solid #16161b;
}
.chat-head-meta { line-height: 1.3; }
.chat-head-title {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.05em; color: #fff;
  text-transform: uppercase;
}
.chat-head-status { font-size: 0.72rem; color: #34d399; font-weight: 600; }

/* Support-side message bubble (client's own uses .chat-msg-user) */
.chat-msg-support {
  align-self: flex-start;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px 14px 14px 4px;
  padding: 11px 14px;
  font-size: 0.85rem;
  color: #e9e6f0;
  line-height: 1.5;
  max-width: 80%;
}

/* Message text preserves user line breaks; long tokens wrap */
.chat-msg-user,
.chat-msg-support {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.chat-msg-time {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.chat-msg-user .chat-msg-time {
  color: rgba(240, 238, 255, 0.55);
}

/* Anonymous visitors: composer hidden, login prompt shown instead */
.chat-login-note {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
  flex-shrink: 0;
}

.chat-login-note a {
  color: var(--accent);
  font-weight: 600;
}

.chat-login-note a:hover {
  color: var(--purple-light);
}

.chat-input-row.is-hidden,
.chat-login-note.is-hidden {
  display: none;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
