#anita-widget-root {
  --anita-font: var(--font-primary, Inter, "Segoe UI", system-ui, sans-serif);
  --anita-primary: var(--burnt-orange, #e8a87c);
  --anita-primary-dark: var(--burnt-orange-hover, #d99a6e);
  --anita-accent: var(--olive-green, #a8c99a);
  --anita-bg: #ffffff;
  --anita-soft: #f9efe4;
  --anita-soft-2: #fff8f2;
  --anita-text: #5f7355;
  --anita-text-light: #7d8f73;
}

#anita-widget-root .anita-toggle {
  position: static;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 158px;
  height: 62px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--anita-primary), var(--anita-primary-dark));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(232, 168, 124, 0.34);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: anita-pulse 2.3s infinite;
  font-family: var(--anita-font);
}

#anita-widget-root .anita-floating-stack {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#anita-widget-root .anita-toggle:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 32px rgba(232, 168, 124, 0.42);
}

#anita-widget-root .anita-toggle-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: #fff;
}

#anita-widget-root .anita-toggle-text {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#anita-widget-root .anita-floating-whatsapp {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#anita-widget-root .anita-floating-whatsapp:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 34px rgba(37, 211, 102, 0.38);
}

#anita-widget-root .anita-floating-whatsapp svg {
  width: 28px;
  height: 28px;
  display: block;
}

#anita-widget-root .anita-chat {
  position: fixed;
  right: 28px;
  bottom: 184px;
  z-index: 1201;
  width: 390px;
  height: 620px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--anita-bg);
  box-shadow: 0 24px 55px rgba(107, 143, 94, 0.2);
  border: 1px solid rgba(232, 168, 124, 0.2);
  animation: anita-rise 0.25s ease;
  font-family: var(--anita-font);
}

#anita-widget-root .anita-chat.active {
  display: flex;
}

#anita-widget-root .anita-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, var(--anita-primary), var(--anita-primary-dark));
  color: #fff;
}

#anita-widget-root .anita-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

#anita-widget-root .anita-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
}

#anita-widget-root .anita-avatar img,
#anita-widget-root .anita-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#anita-widget-root .anita-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

#anita-widget-root .anita-info p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  opacity: 0.92;
  color: rgba(255, 255, 255, 0.92);
}

#anita-widget-root .anita-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

#anita-widget-root .anita-close:hover {
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.28);
}

#anita-widget-root .anita-close svg,
#anita-widget-root .anita-send svg,
#anita-widget-root .anita-user-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

#anita-widget-root .anita-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at top left, rgba(245, 230, 211, 0.75), transparent 34%),
    var(--anita-soft-2);
}

#anita-widget-root .anita-messages::-webkit-scrollbar {
  width: 6px;
}

#anita-widget-root .anita-messages::-webkit-scrollbar-thumb {
  background: rgba(168, 201, 154, 0.55);
  border-radius: 999px;
}

#anita-widget-root .anita-message {
  display: flex;
  gap: 10px;
  animation: anita-fade 0.2s ease;
}

#anita-widget-root .anita-message.bot {
  justify-content: flex-start;
}

#anita-widget-root .anita-message.user {
  justify-content: flex-end;
}

#anita-widget-root .anita-message-avatar,
#anita-widget-root .anita-user-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

#anita-widget-root .anita-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 201, 154, 0.28);
  color: var(--anita-text);
}

#anita-widget-root .anita-bubble {
  max-width: 78%;
  padding: 13px 14px;
  border-radius: 16px;
  line-height: 1.55;
}

#anita-widget-root .anita-message.bot .anita-bubble {
  background: #fff;
  color: #334155;
  border-top-left-radius: 6px;
  box-shadow: 0 8px 20px rgba(107, 143, 94, 0.08);
}

#anita-widget-root .anita-message.user .anita-bubble {
  background: linear-gradient(135deg, var(--anita-accent), #94b784);
  color: #fff;
  border-top-right-radius: 6px;
}

#anita-widget-root .anita-bubble p {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

#anita-widget-root .anita-bubble p:last-child {
  margin-bottom: 0;
}

#anita-widget-root .anita-action-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8f1, #f8ecdf);
  border: 1px solid rgba(232, 168, 124, 0.28);
}

#anita-widget-root .anita-action-card h4 {
  margin: 0 0 8px;
  color: #b87958;
  font-size: 0.98rem;
}

#anita-widget-root .anita-action-card p {
  margin: 0 0 10px;
  color: var(--anita-text-light);
  font-size: 0.85rem;
}

#anita-widget-root .anita-action-link,
#anita-widget-root .anita-whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#anita-widget-root .anita-action-link {
  background: linear-gradient(135deg, var(--anita-primary), var(--anita-primary-dark));
  color: #fff;
  box-shadow: 0 10px 20px rgba(232, 168, 124, 0.22);
}

#anita-widget-root .anita-whatsapp-link {
  margin-top: 10px;
  background: #25d366;
  color: #fff;
}

#anita-widget-root .anita-action-link:hover,
#anita-widget-root .anita-whatsapp-link:hover {
  transform: translateY(-2px);
}

#anita-widget-root .anita-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-top: 1px solid rgba(168, 201, 154, 0.18);
}

#anita-widget-root .anita-input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid rgba(168, 201, 154, 0.35);
  border-radius: 14px;
  outline: none;
  font-size: 0.92rem;
  color: #475569;
  font-family: var(--anita-font);
}

#anita-widget-root .anita-input:focus {
  border-color: var(--anita-primary);
  box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.14);
}

#anita-widget-root .anita-send {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--anita-primary), var(--anita-primary-dark));
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#anita-widget-root .anita-send:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(232, 168, 124, 0.24);
}

@keyframes anita-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes anita-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes anita-pulse {
  0%,
  100% {
    box-shadow: 0 14px 28px rgba(232, 168, 124, 0.34);
  }
  50% {
    box-shadow: 0 18px 34px rgba(232, 168, 124, 0.44);
  }
}

@media (max-width: 768px) {
  #anita-widget-root .anita-floating-stack {
    right: 18px;
    bottom: 18px;
  }

  #anita-widget-root .anita-toggle {
    min-width: 142px;
    height: 56px;
    padding: 0 13px;
  }

  #anita-widget-root .anita-toggle-img {
    width: 38px;
    height: 38px;
  }

  #anita-widget-root .anita-floating-whatsapp {
    width: 54px;
    height: 54px;
  }

  #anita-widget-root .anita-chat {
    left: 16px;
    right: 16px;
    bottom: 100px;
    width: auto;
    height: calc(100vh - 130px);
    max-width: 390px;
    margin: 0 auto;
  }
}
