/* Website chat launcher (opens Odoo Live Chat on demand). */

.tg-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 56px;
  padding: 0 1.35rem 0 1.1rem;
  border: none;
  border-radius: 50px;
  background-color: #C87941;
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.45);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.tg-chat-launcher:hover {
  background-color: #D9884E;
  transform: translateY(-2px);
}

.tg-chat-launcher:focus-visible {
  outline: 3px solid #0F172A;
  outline-offset: 3px;
}

.tg-chat-launcher[hidden] {
  display: none;
}

.tg-chat-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: tgChatSpin 0.8s linear infinite;
}

.tg-chat-launcher.is-loading .tg-chat-icon {
  display: none;
}

.tg-chat-launcher.is-loading .tg-chat-spinner {
  display: block;
}

.tg-chat-launcher.is-error {
  background-color: #1E293B;
}

@keyframes tgChatSpin {
  to { transform: rotate(360deg); }
}

/* Phones: icon-only round button. */
@media (max-width: 640px) {
  .tg-chat-launcher {
    right: 16px;
    bottom: 16px;
    width: 56px;
    padding: 0;
    justify-content: center;
  }

  .tg-chat-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tg-chat-launcher,
  .tg-chat-spinner {
    transition: none;
    animation: none;
  }
}
