/**
 * Floating "Trò chuyện với chuyên gia" entry button.
 * Mirrors the Flutter widget in
 * `lib/presentation/chat/widgets/floating_chat_entry_button.dart`:
 *  - Pill caption on the LEFT
 *  - Circular avatar (52px) on the RIGHT
 *  - Hidden by default; JS toggles `.is-visible` after auth check.
 */

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: none;                /* hidden until JS proves auth */
  align-items: center;
  gap: 8px;
  padding: 4px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.chat-fab.is-visible {
  display: flex;
}

/* Caption pill (left side) */
.chat-fab__label {
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-family: 'Philosopher', serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #1A1A4D;
  text-align: center;
  white-space: pre-line;        /* honour \n in the JS-set text */
}

/* Avatar circle (right side) */
.chat-fab__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-fab__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback glyph if the image fails to load */
.chat-fab__avatar-fallback {
  width: 100%;
  height: 100%;
  background: #8B2E2A;
  color: #ffffff;
  font-family: 'Philosopher', serif;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
