/* ============================================================================
 * Stage 2.1.6-fix-v3 — chat-fab: голубо-фиолетовый как аватар Алины
 * Tooltip первые 5 сек + при hover, лаконичный, шрифт 15px
 * ============================================================================ */

.chat-fab-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  z-index: 9999;
  font-family: 'Manrope', system-ui, sans-serif;
}

/* === Кнопка — градиент как у .tarologist-avatar (chat.css строка 51) === */
.chat-fab-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
  z-index: 2;
}
.chat-fab-btn:hover { transform: scale(1.08); }
.chat-fab-btn:active { transform: scale(0.95); }
.chat-fab-btn svg {
  width: 28px;
  height: 28px;
}

/* === Pulse-анимация (первые 5 секунд) === */
.chat-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.5);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}
.chat-fab-pulse--active {
  opacity: 1;
  animation: chatFabPulse 1.8s ease-out infinite;
}
@keyframes chatFabPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.9);  opacity: 0;   }
}

/* === Tooltip — лаконичный, крупнее === */
.chat-fab-tooltip {
  position: absolute;
  right: 74px;
  bottom: 10px;
  background: rgba(20, 12, 40, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.4s ease;
  z-index: 3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.chat-fab-tooltip::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-left-color: rgba(20, 12, 40, 0.94);
}
.chat-fab-tooltip--active {
  opacity: 1;
  transform: translateX(0);
}
.chat-fab-wrap:hover .chat-fab-tooltip {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* === Mobile === */
@media (max-width: 600px) {
  .chat-fab-wrap {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }
  .chat-fab-btn {
    width: 54px;
    height: 54px;
  }
  .chat-fab-btn svg {
    width: 24px;
    height: 24px;
  }
  .chat-fab-tooltip {
    font-size: 14px;
    padding: 10px 14px;
  }
}
