:root {
  /* Site contract: compact below Edunexa navigation (~99,998), fullscreen above toolbar/nav. */
  --nexa-helper-z-floating: 90000;
  --nexa-helper-z-fullscreen: 110000;
}

#js-nexa-assistant-icon,
#js-nexa-assistant-wrapper,
.nexa-assistant-fullscreen-overlay {
  --nexa-helper-primary: var(--theme-primary, #5b4df5);
  --nexa-helper-primary-rgb: var(--theme-primary-rgb, 91, 77, 245);
  --nexa-helper-soft: var(--theme-primary-soft, #f1ecff);
  --nexa-helper-border: color-mix(in srgb, var(--nexa-helper-primary) 28%, #ffffff);
  --nexa-helper-text: #2d3350;
  --nexa-helper-muted: #667085;
  --nexa-helper-bot-bg: color-mix(in srgb, var(--nexa-helper-primary) 17%, #ffffff);
  --nexa-helper-user-bg: var(--nexa-helper-primary);
  --nexa-helper-shadow: 0 18px 46px rgba(45, 48, 92, 0.18);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

#js-nexa-assistant-icon.nexa-assistant-icon {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--nexa-helper-z-floating);
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  box-shadow: 0 14px 32px rgba(var(--nexa-helper-primary-rgb), 0.32);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

#js-nexa-assistant-icon.nexa-assistant-icon::before,
#js-nexa-assistant-icon.nexa-assistant-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: var(--nexa-helper-primary);
  z-index: -1;
}

#js-nexa-assistant-icon.nexa-assistant-icon:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--nexa-helper-primary) 86%, #ffffff);
  box-shadow: 0 18px 42px rgba(var(--nexa-helper-primary-rgb), 0.38);
}

#js-nexa-assistant-icon.nexa-assistant-icon:hover::before {
  animation: nexa-helper-aura-small-ring 1s infinite alternate;
}

#js-nexa-assistant-icon.nexa-assistant-icon:hover::after {
  animation: nexa-helper-aura-large-ring 1.5s infinite alternate;
}

#js-nexa-assistant-icon .nexa-helper-open-button-icon {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  animation: nexa-helper-button-icon-in 0.75s ease-in-out;
  transition: transform 0.25s ease;
}

#js-nexa-assistant-icon .nexa-helper-open-button-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

#js-nexa-assistant-icon:hover .nexa-helper-open-button-icon {
  transform: scale(1.22);
}

#js-nexa-assistant-icon svg,
#js-nexa-assistant-icon i {
  color: currentColor;
  stroke: currentColor;
}

#js-nexa-assistant-wrapper.nexa-assistant-wrapper {
  position: fixed;
  right: 20px;
  bottom: 82px;
  width: min(390px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 112px));
  height: min(560px, calc(100dvh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--nexa-helper-border);
  background: #ffffff;
  color: var(--nexa-helper-text);
  box-shadow: var(--nexa-helper-shadow);
  z-index: var(--nexa-helper-z-floating);
  animation: nexa-helper-grow 0.22s ease-out;
}

#js-nexa-assistant-wrapper.hide {
  display: none;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-accent {
  height: 11px;
  flex: 0 0 11px;
  background: linear-gradient(90deg, var(--nexa-helper-primary), color-mix(in srgb, var(--nexa-helper-primary) 72%, #ffffff));
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(9px, 1.8vh, 13px) 20px clamp(8px, 1.5vh, 11px);
  border-bottom: 1px solid color-mix(in srgb, var(--nexa-helper-primary) 14%, #edf0f8);
  background: #ffffff;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-brand,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-logo,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-logo {
  object-fit: contain;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-logo {
  width: clamp(32px, 6vw, 40px);
  height: clamp(32px, 6vw, 40px);
  flex: 0 0 clamp(32px, 6vw, 40px);
  transform: scale(2.4);
  transform-origin: center;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-logo {
  width: clamp(58px, 8vw, 106px);
  height: 35px;
  flex: 0 1 106px;
  margin-right: 6px;
  transform: none;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-title {
  color: var(--nexa-helper-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button:hover,
#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button:focus-visible {
  transform: scale(1.1);
  background: color-mix(in srgb, var(--nexa-helper-primary) 82%, #000000);
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#js-nexa-assistant-wrapper .nexa-helper-bot-signature {
  padding: 12px 22px 2px;
  color: var(--nexa-helper-muted);
  font-size: 11px;
  line-height: 1.2;
}

#js-nexa-assistant-wrapper .nexa-helper-messages-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 22px 16px;
  scroll-behavior: smooth;
}

#js-nexa-assistant-wrapper .nexa-helper-messages-wrapper::-webkit-scrollbar {
  width: 8px;
}

#js-nexa-assistant-wrapper .nexa-helper-messages-wrapper::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--nexa-helper-primary) 24%, transparent);
  border-radius: 999px;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#js-nexa-assistant-wrapper .nexa-helper-message-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 90%;
  animation: nexa-helper-slide-up 0.22s ease-out;
}

#js-nexa-assistant-wrapper .nexa-helper-bot-message-container {
  align-self: flex-start;
}

#js-nexa-assistant-wrapper .nexa-helper-visitor-message-container {
  align-self: flex-end;
  flex-direction: row-reverse;
}

#js-nexa-assistant-wrapper .nexa-helper-bot-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  box-shadow: 0 8px 18px rgba(var(--nexa-helper-primary-rgb), 0.24);
}

#js-nexa-assistant-wrapper .nexa-helper-bot-avatar img,
.nexa-assistant-fullscreen-overlay .nexa-helper-bot-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

#js-nexa-assistant-wrapper .nexa-helper-message {
  position: relative;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

#js-nexa-assistant-wrapper .nexa-helper-message strong,
.nexa-assistant-fullscreen-overlay .nexa-helper-message strong {
  font-weight: 750;
}

#js-nexa-assistant-wrapper .nexa-helper-message code,
.nexa-assistant-fullscreen-overlay .nexa-helper-message code {
  padding: 1px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--nexa-helper-primary) 12%, #ffffff);
  color: color-mix(in srgb, var(--nexa-helper-primary) 68%, #222222);
  font-size: 0.92em;
  white-space: normal;
}

#js-nexa-assistant-wrapper .nexa-helper-message::before {
  content: "";
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
}

#js-nexa-assistant-wrapper .nexa-helper-bot-message {
  color: color-mix(in srgb, var(--nexa-helper-primary) 52%, #333333);
  background: var(--nexa-helper-bot-bg);
}

#js-nexa-assistant-wrapper .nexa-helper-bot-message::before {
  left: -6px;
  background: var(--nexa-helper-bot-bg);
  transform: scaleX(0.8) skew(45deg);
}

#js-nexa-assistant-wrapper .nexa-helper-visitor-message {
  color: #ffffff;
  background: var(--nexa-helper-user-bg);
  box-shadow: 0 8px 18px rgba(var(--nexa-helper-primary-rgb), 0.16);
}

#js-nexa-assistant-wrapper .nexa-helper-visitor-message::before {
  right: -6px;
  background: var(--nexa-helper-user-bg);
  transform: skew(-40deg);
}

#js-nexa-assistant-wrapper .nexa-helper-message-preloader {
  display: inline-flex;
  gap: 5px;
  min-width: 58px;
  align-items: center;
  justify-content: center;
}

#js-nexa-assistant-wrapper .nexa-helper-message-preloader span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--nexa-helper-primary);
  animation: nexa-helper-loader 0.72s ease-in-out infinite;
}

#js-nexa-assistant-wrapper .nexa-helper-message-preloader span:nth-child(2) {
  animation-delay: 0.12s;
}

#js-nexa-assistant-wrapper .nexa-helper-message-preloader span:nth-child(3) {
  animation-delay: 0.24s;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-footer {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  padding: 16px 22px 18px;
  background: #ffffff;
  overflow: visible;
}

#js-nexa-assistant-wrapper .nexa-helper-send-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

#js-nexa-assistant-wrapper .nexa-helper-input-messages-field {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid var(--nexa-helper-primary);
  color: var(--nexa-helper-text);
  background: #ffffff;
  font-size: 12px;
  outline: none;
  opacity: 0.72;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#js-nexa-assistant-wrapper .nexa-helper-input-messages-field::placeholder {
  color: var(--nexa-helper-muted);
  font-size: 11px;
}

#js-nexa-assistant-wrapper .nexa-helper-input-messages-field:hover,
#js-nexa-assistant-wrapper .nexa-helper-input-messages-field:focus {
  opacity: 1;
  border-color: var(--nexa-helper-primary);
  box-shadow: 0 0 0 3px rgba(var(--nexa-helper-primary-rgb), 0.13);
}

#js-nexa-assistant-wrapper .nexa-helper-send-message-button {
  position: static;
  width: 44px;
  height: 42px;
  border: 0;
  padding: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

#js-nexa-assistant-wrapper .nexa-helper-send-message-button:hover,
#js-nexa-assistant-wrapper .nexa-helper-send-message-button:focus-visible {
  transform: scale(1.12);
  background: color-mix(in srgb, var(--nexa-helper-primary) 84%, #000000);
}

#js-nexa-assistant-wrapper .nexa-helper-send-message-button.disabled,
#js-nexa-assistant-wrapper .nexa-helper-send-message-button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-footer-text {
  margin-top: 8px;
  text-align: center;
  color: var(--nexa-helper-muted);
  font-size: 10px;
}

.nexa-assistant-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--nexa-helper-z-fullscreen);
  display: none;
  padding: 0;
  background: #ffffff;
}

.nexa-assistant-fullscreen-overlay.is-active {
  display: block;
  animation: nexa-helper-fullscreen-fade 0.18s ease-out;
}

.nexa-assistant-fullscreen-overlay .chat-main-container {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: #ffffff;
  color: var(--nexa-helper-text);
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: nexa-helper-fullscreen-panel-in 0.24s ease-out;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-accent {
  height: 11px;
  flex: 0 0 11px;
  background: linear-gradient(90deg, var(--nexa-helper-primary), color-mix(in srgb, var(--nexa-helper-primary) 72%, #ffffff));
}

.nexa-assistant-fullscreen-overlay .nexa-helper-fullscreen-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(6px, 1.1vh, 8px) clamp(16px, 2vw, 26px);
  border-bottom: 1px solid color-mix(in srgb, var(--nexa-helper-primary) 14%, #edf0f8);
  background:
    radial-gradient(circle at 85% 10%, rgba(var(--nexa-helper-primary-rgb), 0.11), transparent 30%),
    #ffffff;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-title {
  color: var(--nexa-helper-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button:hover,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button:focus-visible {
  transform: scale(1.08);
  background: color-mix(in srgb, var(--nexa-helper-primary) 82%, #000000);
}

#js-nexa-assistant-wrapper .nexa-helper-bot-signature,
.nexa-assistant-fullscreen-overlay .nexa-helper-bot-signature {
  display: none;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-messages-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px 24px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 50% 8%, rgba(var(--nexa-helper-primary-rgb), 0.06), transparent 28%),
    linear-gradient(180deg, #fbfaff, #ffffff 48%);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-messages-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 78%;
  animation: nexa-helper-slide-up 0.22s ease-out;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-bot-message-container {
  align-self: flex-start;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-visitor-message-container {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-bot-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  box-shadow: 0 8px 18px rgba(var(--nexa-helper-primary-rgb), 0.24);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message {
  position: relative;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message::before {
  content: "";
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-bot-message {
  color: color-mix(in srgb, var(--nexa-helper-primary) 52%, #333333);
  background: var(--nexa-helper-bot-bg);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-bot-message::before {
  left: -6px;
  background: var(--nexa-helper-bot-bg);
  transform: scaleX(0.8) skew(45deg);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-visitor-message {
  color: #ffffff;
  background: var(--nexa-helper-user-bg);
  box-shadow: 0 8px 18px rgba(var(--nexa-helper-primary-rgb), 0.16);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-visitor-message::before {
  right: -6px;
  background: var(--nexa-helper-user-bg);
  transform: skew(-40deg);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message-preloader {
  display: inline-flex;
  gap: 5px;
  min-width: 58px;
  align-items: center;
  justify-content: center;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message-preloader span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--nexa-helper-primary);
  animation: nexa-helper-loader 0.72s ease-in-out infinite;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message-preloader span:nth-child(2) {
  animation-delay: 0.12s;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-message-preloader span:nth-child(3) {
  animation-delay: 0.24s;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-footer {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-items: center;
  align-items: start;
  justify-content: center;
  gap: 10px;
  padding: 18px 22px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid color-mix(in srgb, var(--nexa-helper-primary) 14%, #edf0f8);
  overflow: visible;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(var(--nexa-helper-primary-rgb), 0.1);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-input-messages-field {
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--nexa-helper-primary) 28%, #ffffff);
  color: var(--nexa-helper-text);
  background: #ffffff;
  font-size: 12px;
  outline: none;
  opacity: 0.72;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-input-messages-field:hover,
.nexa-assistant-fullscreen-overlay .nexa-helper-input-messages-field:focus {
  opacity: 1;
  border-color: var(--nexa-helper-primary);
  box-shadow: 0 0 0 3px rgba(var(--nexa-helper-primary-rgb), 0.13);
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-message-button {
  position: static;
  width: 52px;
  height: 48px;
  border: 0;
  padding: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-message-button.disabled,
.nexa-assistant-fullscreen-overlay .nexa-helper-send-message-button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-footer-text {
  grid-column: 1 / -1;
  margin-top: 8px;
  text-align: center;
  color: var(--nexa-helper-muted);
  font-size: 10px;
}

@media (max-width: 767px) {
  .nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-footer {
    grid-template-columns: 1fr;
  }

  #js-nexa-assistant-icon.nexa-assistant-icon {
    right: 16px;
    bottom: 78px;
  }

  #js-nexa-assistant-wrapper.nexa-assistant-wrapper {
    right: 10px;
    left: 10px;
    width: auto;
    height: min(560px, calc(100vh - 160px));
    bottom: 140px;
  }

  .nexa-assistant-fullscreen-overlay {
    padding: 0;
  }

  .nexa-assistant-fullscreen-overlay .chat-main-container {
    height: 100vh;
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 0;
  }

  .nexa-assistant-fullscreen-overlay .nexa-helper-message-container {
    max-width: 90%;
  }
}

@keyframes nexa-helper-grow {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes nexa-helper-slide-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nexa-helper-loader {
  0%, 100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

@keyframes nexa-helper-aura-large-ring {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 0.2;
    transform: scale(2);
  }
}

@keyframes nexa-helper-aura-small-ring {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 0.2;
    transform: scale(1.5);
  }
}

@keyframes nexa-helper-button-icon-in {
  0% {
    opacity: 1;
    transform: scale(0.25);
  }
  85% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes nexa-helper-fullscreen-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes nexa-helper-fullscreen-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* WordPress standalone surface additions. The widget above intentionally
 * keeps the reference Nexa visual language; these rules complete its live
 * DOM state and accessibility surface. */
#js-nexa-assistant-icon.hide,
#js-nexa-assistant-wrapper.hide,
#js-nexa-assistant-icon .hide,
#js-nexa-assistant-wrapper .hide,
.nexa-assistant-fullscreen-overlay .hide {
  display: none !important;
}

.nexa-helper-svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

#js-nexa-assistant-wrapper .nexa-helper-input-messages-field,
.nexa-assistant-fullscreen-overlay .nexa-helper-input-messages-field {
  box-sizing: border-box;
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}

.nexa-helper-status {
  display: none;
  margin: 7px 2px 0;
  color: #bd3f5a;
  font-size: 11px;
  line-height: 1.35;
}

.nexa-helper-status.is-visible {
  display: block;
}

/* Nexa 2.0 accessibility and layout invariants. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#js-nexa-assistant-wrapper .nexa-helper-send-message-button {
  min-width: 44px;
  min-height: 42px;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-message-button {
  min-width: 52px;
  min-height: 48px;
}

#js-nexa-assistant-icon:focus-visible,
#js-nexa-assistant-wrapper button:focus-visible,
#js-nexa-assistant-wrapper textarea:focus-visible,
.nexa-assistant-fullscreen-overlay button:focus-visible,
.nexa-assistant-fullscreen-overlay textarea:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #1f2430;
}

@media (max-height: 520px) {
  #js-nexa-assistant-wrapper.nexa-assistant-wrapper {
    bottom: max(12px, env(safe-area-inset-bottom));
    height: calc(100vh - 128px);
    height: calc(100dvh - 128px);
    min-height: 240px;
  }

  #js-nexa-assistant-icon.nexa-assistant-icon {
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  color: var(--nexa-helper-primary);
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-actions .nexa-helper-svg,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-actions .nexa-helper-svg {
  width: 14px;
  height: 14px;
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-actions .nexa-helper-action-visual,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-actions .nexa-helper-action-visual {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--nexa-helper-primary);
}

#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button:hover,
#js-nexa-assistant-wrapper .nexa-helper-chatbot-close-button:focus-visible,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button:hover,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-close-button:focus-visible {
  background: transparent;
}

#js-nexa-assistant-wrapper .nexa-helper-status,
.nexa-assistant-fullscreen-overlay .nexa-helper-status {
  min-height: 1.35em;
  color: #5b6172;
  font-size: 12px;
}

#js-nexa-assistant-wrapper .nexa-helper-status.is-visible,
.nexa-assistant-fullscreen-overlay .nexa-helper-status.is-visible {
  color: #8c2940;
}

#js-nexa-assistant-wrapper .nexa-helper-retry-button,
.nexa-assistant-fullscreen-overlay .nexa-helper-retry-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
  background: var(--nexa-helper-primary);
  cursor: pointer;
}

#js-nexa-assistant-wrapper .nexa-helper-message,
.nexa-assistant-fullscreen-overlay .nexa-helper-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-footer {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  grid-template-rows: auto auto auto;
  justify-content: center;
  align-content: end;
  gap: 6px;
  width: 100%;
  padding: 14px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-form,
.nexa-assistant-fullscreen-overlay .nexa-helper-status,
.nexa-assistant-fullscreen-overlay .nexa-helper-retry-button,
.nexa-assistant-fullscreen-overlay .nexa-helper-chatbot-footer-text {
  grid-column: 1;
}

.nexa-assistant-fullscreen-overlay .nexa-helper-send-form {
  width: 100%;
}

@media (max-width: 767px) {
  #js-nexa-assistant-wrapper.nexa-assistant-wrapper {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(74px, calc(58px + env(safe-area-inset-bottom)));
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
  }

  #js-nexa-assistant-icon.nexa-assistant-icon {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  #js-nexa-assistant-icon.nexa-assistant-icon,
  #js-nexa-assistant-wrapper.nexa-assistant-wrapper,
  .nexa-assistant-fullscreen-overlay,
  .nexa-assistant-fullscreen-overlay .chat-main-container,
  #js-nexa-assistant-icon .nexa-helper-open-button-icon,
  .nexa-helper-message-preloader span {
    animation: none !important;
    transition: none !important;
  }
}
