.aru-ai-enabled .back-to-top {
  right: 98px;
}

.aru-ai-widget,
.aru-ai-widget * {
  box-sizing: border-box;
}

.aru-ai-widget {
  --aru-ai-blue: #001b58;
  --aru-ai-blue-2: #072b7a;
  --aru-ai-yellow: #ffd12f;
  --aru-ai-border: #d9e1f2;
  --aru-ai-text: #172033;
  --aru-ai-muted: #68758a;
  --aru-ai-bg: #ffffff;
  --aru-ai-soft: #f4f7fb;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10050;
  font-family: Inter, Arial, sans-serif;
}

.aru-ai-toggle {
  width: 66px;
  height: 66px;
  padding: 0;
  border: 3px solid var(--aru-ai-yellow);
  border-radius: 50%;
  background: var(--aru-ai-bg);
  box-shadow: 0 18px 45px rgba(0, 27, 88, 0.24);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aru-ai-toggle:hover,
.aru-ai-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(0, 27, 88, 0.3);
  outline: none;
}

.aru-ai-toggle img {
  width: 145%;
  height: 145%;
  display: block;
  object-fit: cover;
  object-position: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.aru-ai-greeting {
  position: absolute;
  right: 78px;
  bottom: 14px;
  min-width: 190px;
  max-width: 250px;
  padding: 10px 15px;
  border: 1px solid rgba(0, 27, 88, 0.12);
  border-radius: 15px 15px 5px 15px;
  color: var(--aru-ai-blue);
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(0, 27, 88, 0.2);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
  opacity: 0;
  transform: translateX(12px) translateY(6px) scale(0.94);
  visibility: hidden;
}

.aru-ai-greeting::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 13px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
}

.aru-ai-greeting.is-visible {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  visibility: visible;
}

.aru-ai-greeting.is-entering {
  animation: aru-ai-greeting-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.aru-ai-greeting.is-idle {
  animation: aru-ai-greeting-float 2.4s ease-in-out infinite;
}

.aru-ai-greeting.is-hiding {
  animation: aru-ai-greeting-out 0.22s ease forwards;
  visibility: visible;
}

.aru-ai-greeting:hover,
.aru-ai-greeting:focus-visible {
  border-color: rgba(255, 209, 47, 0.9);
  box-shadow: 0 18px 46px rgba(0, 27, 88, 0.26);
  outline: none;
}

.aru-ai-greeting.is-question-out {
  animation: aru-ai-question-out 0.26s ease forwards;
}

.aru-ai-greeting.is-question-in {
  animation: aru-ai-question-in 0.32s ease forwards;
}

.aru-ai-panel {
  position: absolute;
  right: 0;
  bottom: 92px;
  width: min(380px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 124px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--aru-ai-border);
  border-radius: 18px;
  background: var(--aru-ai-bg);
  box-shadow: 0 28px 80px rgba(7, 18, 48, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.aru-ai-widget.is-open .aru-ai-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.aru-ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--aru-ai-blue), var(--aru-ai-blue-2));
}

.aru-ai-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid var(--aru-ai-yellow);
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
}

.aru-ai-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.aru-ai-heading {
  min-width: 0;
  flex: 1;
}

.aru-ai-title {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.aru-ai-status {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.3;
}

.aru-ai-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 26px;
  line-height: 34px;
}

.aru-ai-close:hover,
.aru-ai-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.aru-ai-messages {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px 14px;
  overflow-y: auto;
  background: var(--aru-ai-soft);
}

.aru-ai-empty-state {
  display: none;
  flex: 1 0 160px;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 14px;
  pointer-events: none;
  user-select: none;
}

.aru-ai-widget.is-initial-state .aru-ai-empty-state {
  display: flex;
}

.aru-ai-empty-logo {
  width: min(58%, 190px);
  min-width: 132px;
  max-width: 190px;
  height: auto;
  display: block;
  opacity: 0.92;
  filter: drop-shadow(0 14px 28px rgba(0, 27, 88, 0.1));
}

.aru-ai-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
}

.aru-ai-message.is-user {
  justify-content: flex-end;
  gap: 0;
}

.aru-ai-message-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 2px solid rgba(255, 209, 47, 0.92);
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 27, 88, 0.12);
}

.aru-ai-message-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.aru-ai-bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--aru-ai-text);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(13, 32, 73, 0.08);
  font-size: 14px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.aru-ai-message.is-user .aru-ai-bubble {
  color: #ffffff;
  background: var(--aru-ai-blue);
  border-bottom-right-radius: 5px;
}

.aru-ai-message.is-assistant .aru-ai-bubble {
  max-width: calc(100% - 42px);
  border-bottom-left-radius: 5px;
}

.aru-ai-bubble strong {
  color: inherit;
  font-weight: 700;
}

.aru-ai-bubble a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.aru-ai-bubble a:hover,
.aru-ai-bubble a:focus-visible {
  text-decoration-thickness: 2px;
  outline: none;
}

.aru-ai-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-width: 38px;
  min-height: 16px;
}

.aru-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aru-ai-muted);
  animation: aru-ai-pulse 1s infinite ease-in-out;
}

.aru-ai-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.aru-ai-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.aru-ai-starters {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  overflow-x: auto;
  background: var(--aru-ai-soft);
}

.aru-ai-starter {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--aru-ai-border);
  border-radius: 999px;
  color: var(--aru-ai-blue);
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.aru-ai-starter:hover,
.aru-ai-starter:focus-visible {
  border-color: var(--aru-ai-yellow);
  outline: none;
}

.aru-ai-error {
  display: none;
  padding: 10px 14px 0;
  color: #a92a2a;
  background: #ffffff;
  font-size: 12px;
  line-height: 1.35;
}

.aru-ai-error:not(:empty) {
  display: block;
}

.aru-ai-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--aru-ai-border);
  background: #ffffff;
}

.aru-ai-input {
  width: 100%;
  min-height: 44px;
  max-height: 116px;
  resize: none;
  border: 1px solid var(--aru-ai-border);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--aru-ai-text);
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}

.aru-ai-input:focus {
  border-color: var(--aru-ai-blue-2);
  box-shadow: 0 0 0 3px rgba(7, 43, 122, 0.12);
}

.aru-ai-send {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 50%;
  color: var(--aru-ai-blue);
  background: var(--aru-ai-yellow);
  cursor: pointer;
  font-size: 20px;
  line-height: 44px;
}

.aru-ai-send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@keyframes aru-ai-pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes aru-ai-greeting-in {
  from {
    opacity: 0;
    transform: translateX(12px) translateY(6px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes aru-ai-greeting-float {
  0%,
  100% {
    transform: translateX(0) translateY(0) scale(1);
  }

  50% {
    transform: translateX(0) translateY(-3px) scale(1);
  }
}

@keyframes aru-ai-greeting-out {
  to {
    opacity: 0;
    transform: translateX(10px) translateY(4px) scale(0.96);
  }
}

@keyframes aru-ai-question-out {
  to {
    opacity: 0;
    transform: translateX(8px) translateY(6px) scale(0.94);
    visibility: hidden;
  }
}

@keyframes aru-ai-question-in {
  from {
    opacity: 0;
    transform: translateX(8px) translateY(6px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@media (max-width: 575px) {
  .aru-ai-enabled .back-to-top {
    right: 90px;
  }

  .aru-ai-widget {
    right: 16px;
    bottom: 16px;
  }

  .aru-ai-toggle {
    width: 62px;
    height: 62px;
  }

  .aru-ai-greeting {
    right: 74px;
    bottom: 13px;
    min-width: min(188px, calc(100vw - 112px));
    max-width: min(220px, calc(100vw - 112px));
    padding: 9px 12px;
    font-size: 13px;
  }

  .aru-ai-panel {
    bottom: 84px;
    width: calc(100vw - 24px);
    height: min(560px, calc(100vh - 108px));
  }

  .aru-ai-empty-state {
    flex-basis: 132px;
    padding: 20px 12px 12px;
  }

  .aru-ai-empty-logo {
    width: min(54%, 164px);
    min-width: 112px;
  }

  .aru-ai-message {
    gap: 7px;
  }

  .aru-ai-message-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .aru-ai-message.is-assistant .aru-ai-bubble {
    max-width: calc(100% - 39px);
  }
}
