.amb-floating-assistant {
  --amb-assistant-right: 32px;
  --amb-assistant-bottom: 24px;
  position: fixed;
  z-index: 900;
  right: var(--amb-assistant-right);
  bottom: var(--amb-assistant-bottom);
  font-family: var(--am-font-body, Figtree, sans-serif);
  pointer-events: none;
}

.amb-floating-assistant *,
.amb-floating-assistant *::before,
.amb-floating-assistant *::after { box-sizing: border-box; }

.amb-floating-assistant__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.amb-floating-action {
  position: relative;
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 220ms ease, box-shadow 220ms ease;
}

.amb-floating-action:hover,
.amb-floating-action:focus-visible { filter: brightness(1.08); }

.amb-floating-action:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 3px;
}

.amb-floating-action--chat {
  overflow: hidden;
  background: linear-gradient(135deg, #FF6B35 0%, #FF1840 100%);
  box-shadow: 0 8px 26px rgba(255, 24, 64, .25), 0 0 18px rgba(255, 107, 53, .2);
}

.amb-floating-action__avatar-crop {
  position: absolute;
  z-index: 1;
  inset: 5px;
  overflow: hidden;
  border-radius: inherit;
  background: #111113;
  border: 2px solid #070708;
}

.amb-floating-action--chat img {
  position: absolute;
  top: -32.5%;
  left: -32.5%;
  z-index: 1;
  width: 165%;
  height: 165%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

.amb-floating-action--whatsapp {
  color: #fff !important;
  background: #25D366;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .28), 0 0 16px rgba(37, 211, 102, .2);
  animation: amb-whatsapp-pulse 2.8s ease-in-out infinite;
}

.amb-floating-action--whatsapp:hover,
.amb-floating-action--whatsapp:focus,
.amb-floating-action--whatsapp:focus-visible,
.amb-floating-action--whatsapp:active,
.amb-floating-action--whatsapp:visited {
  color: #fff !important;
}

.amb-floating-action--whatsapp svg {
  width: 38px;
  height: 38px;
  display: block;
  color: #fff !important;
  fill: #fff !important;
}

@keyframes amb-whatsapp-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, .28), 0 0 14px rgba(37, 211, 102, .18); }
  50% { box-shadow: 0 8px 26px rgba(37, 211, 102, .34), 0 0 25px rgba(37, 211, 102, .34); }
}

.amb-chat-panel {
  position: absolute;
  right: 0;
  bottom: 148px;
  width: min(370px, calc(100vw - 64px));
  max-height: min(560px, calc(100vh - 190px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background: #111113;
  border: 1px solid #24242A;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5), 0 0 34px rgba(255, 24, 64, .08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transform-origin: right bottom;
  transition: opacity 240ms ease, transform 240ms cubic-bezier(.22, 1, .36, 1), visibility 240ms ease;
}

.amb-floating-assistant.is-open .amb-chat-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.amb-chat-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #1A1A1F;
  border-bottom: 1px solid #24242A;
}

.amb-chat-panel__avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35 0%, #FF1840 100%);
}

.amb-chat-panel__avatar-crop {
  position: absolute;
  z-index: 1;
  inset: 3px;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: #111113;
  border: 1px solid #070708;
}

.amb-chat-panel__avatar img {
  position: absolute;
  top: -32.5%;
  left: -32.5%;
  z-index: 1;
  width: 165%;
  height: 165%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

.amb-chat-panel__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.amb-chat-panel__identity strong {
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.amb-chat-panel__close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #A9A9A9;
  background: transparent;
  font: 400 28px/1 Arial, sans-serif;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.amb-chat-panel__close:hover,
.amb-chat-panel__close:focus-visible {
  color: #fff;
  background: #24242A;
}

.amb-chat-panel__body {
  min-height: 238px;
  padding: 20px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0B0B0D;
}

.amb-chat-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 15px;
  color: #F7F5F0;
  font-size: 14px;
  line-height: 1.55;
}

.amb-chat-message--assistant {
  background: #1A1A1F;
  border: 1px solid #24242A;
  border-bottom-left-radius: 5px;
}

.amb-chat-message--user {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(135deg, #FF6B35 0%, #FF1840 100%);
  border-bottom-right-radius: 5px;
}

.amb-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.amb-chat-quick-replies button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #3A3A42;
  border-radius: 999px;
  color: #F7F5F0;
  background: #1A1A1F;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.amb-chat-quick-replies button:hover,
.amb-chat-quick-replies button:focus-visible {
  color: #fff;
  border-color: #FF6B35;
  background: #24242A;
}

.amb-chat-composer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px;
  background: #1A1A1F;
  border-top: 1px solid #24242A;
}

.amb-chat-composer input {
  min-width: 0;
  height: 44px;
  flex: 1 1 auto;
  padding: 0 14px;
  border: 1px solid #35353D;
  border-radius: 12px;
  outline: none;
  color: #fff !important;
  background: #111113 !important;
  background-image: none !important;
  font: inherit;
  font-size: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease !important;
}

.amb-chat-composer input::placeholder { color: #83838A; }

.amb-chat-composer input:focus {
  color: #fff !important;
  background: #111113 !important;
  background-image: none !important;
  border-color: #FF6B35;
  box-shadow: 0 0 0 1px rgba(255, 107, 53, .2);
}

.amb-chat-composer button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #FF6B35 0%, #FF1840 100%);
  cursor: pointer;
}

.amb-chat-composer button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 1024px) {
  .amb-floating-assistant {
    --amb-assistant-right: 24px;
    --amb-assistant-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .amb-floating-assistant {
    --amb-assistant-right: 24px;
    --amb-assistant-bottom: 18px;
  }

  .amb-floating-action {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .amb-floating-action--chat img {
    width: 165%;
    height: 165%;
  }

  .amb-floating-action--whatsapp svg {
    width: 35px;
    height: 35px;
  }

  .amb-chat-panel {
    right: 0;
    bottom: 136px;
    width: calc(100vw - 48px);
    max-height: min(600px, calc(100vh - 172px));
    border-radius: 20px;
  }

  .amb-chat-panel__body {
    min-height: 210px;
    padding: 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amb-chat-panel,
  .amb-floating-action,
  .amb-chat-quick-replies button { transition: none; }

  .amb-floating-action--whatsapp { animation: none; }
}

