/* Match the CreatuAgente widget to the JaaDs Global brand. */
#ab-widget-btn {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  right: max(24px, env(safe-area-inset-right, 0px)) !important;
  width: 60px !important;
  height: 60px !important;
  z-index: 2147483645 !important;
  animation: agent-soft-pulse 4s ease-in-out infinite;
}

#ab-widget-btn img {
  width: 50px !important;
  height: 50px !important;
  transform: none;
}

@keyframes agent-soft-pulse {
  0%, 70%, 100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(204, 0, 0, 0);
  }
  35% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 6px rgba(204, 0, 0, 0.2), 0 0 16px rgba(204, 0, 0, 0.16);
  }
}

#ab-widget-btn:hover,
#ab-widget-btn:focus-visible {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  #ab-widget-btn {
    animation: none;
  }
}

#ab-widget-btn,
#ab-widget-header,
#ab-widget-send,
#ab-widget-panel .ab-msg.user {
  background: #CC0000 !important;
}

#ab-widget-btn:hover,
#ab-widget-send:hover {
  background: #990000 !important;
}

#ab-widget-input:focus {
  border-color: #CC0000 !important;
}

#ab-widget-panel {
  max-width: calc(100vw - 32px) !important;
}

#ab-widget-input {
  min-width: 0;
  font-size: 16px !important;
}

#ab-widget-panel .ab-msg.assistant a.agent-booking-link {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  margin-block: 10px;
  border: 1px solid rgba(255, 85, 85, 0.3);
  border-radius: 999px;
  padding: 10px 16px;
  background: #CC0000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none !important;
  word-break: normal !important;
}

#ab-widget-panel .ab-msg.assistant a.agent-booking-link:hover {
  background: #990000;
}

#ab-widget-panel .ab-msg.assistant a.agent-booking-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (max-width: 767px), (max-width: 1023px) and (max-height: 500px) {
  #ab-widget-panel {
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(var(--agent-keyboard-inset, 0px) + var(--agent-panel-clearance, 96px) + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) !important;
    max-width: 420px !important;
    height: 560px !important;
    max-height: calc(var(--agent-viewport-height, 100dvh) - var(--agent-panel-clearance, 96px) - 16px - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px)) !important;
  }

  #ab-widget-messages {
    min-height: 0;
    overscroll-behavior: contain;
  }

  #ab-widget-close {
    min-width: 44px;
    min-height: 44px;
  }

  #ab-widget-header-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
