/* ===== CHAT BUTTON — Сервісний чат онлайн ===== */

@keyframes chat-btn-pulse {
  0%   { box-shadow: 0 4px 20px rgba(10, 133, 217, 0.35), 0 0 0 0 rgba(10, 133, 217, 0.4); }
  60%  { box-shadow: 0 4px 20px rgba(10, 133, 217, 0.35), 0 0 0 10px rgba(10, 133, 217, 0); }
  100% { box-shadow: 0 4px 20px rgba(10, 133, 217, 0.35), 0 0 0 0 rgba(10, 133, 217, 0); }
}

@keyframes chat-btn-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8888;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  background: #fff;
  border-radius: 50px;
  padding: 8px 18px 8px 8px;
  text-decoration: none;
  color: #111;

  box-shadow: 0 4px 20px rgba(10, 133, 217, 0.35);
  animation: chat-btn-pulse 2.8s ease-out 1.5s infinite;

  /* show state */
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease;
}

.chat-btn:hover {
  box-shadow: 0 6px 28px rgba(10, 133, 217, 0.5);
  transform: translateY(-2px) scale(1.02);
  animation: none;
}

/* hidden state — клас додається через JS */
.chat-btn--hidden {
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  animation: none;
}

/* ── Іконка ── */
.chat-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.chat-btn__icon svg {
  display: block;
}

/* ── Текст ── */
.chat-btn__text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #111;
}

/* ── Online dot ── */
.chat-btn__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: chat-btn-dot 2s ease-in-out infinite;
}

/* ── Mobile ── */
@media (max-width: 767px) {
  .chat-btn {
    bottom: 20px;
    right: 16px;
    padding: 9px;
    border-radius: 50%;
    gap: 0;
  }

  .chat-btn__text,
  .chat-btn__dot {
    display: none;
  }

  .chat-btn__icon {
    width: 44px;
    height: 44px;
  }

  .chat-btn__icon svg {
    width: 44px;
    height: 44px;
  }
}
