.auron-chatbot {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 90;
  display: block;
  pointer-events: none;
}

.auron-chatbot > * {
  pointer-events: auto;
}

.auron-chatbot__trigger,
.auron-chatbot__panel,
.auron-chatbot__send,
.auron-chatbot__option,
.auron-chatbot__close {
  font-family: inherit;
}

.auron-chatbot__trigger {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transform: translateY(18px);
  opacity: 0;
  animation: auron-chatbot-float-in 0.55s ease forwards;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.auron-chatbot__trigger:hover,
.auron-chatbot__trigger:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.3);
  outline: none;
}

.auron-chatbot__trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
}

.auron-chatbot__trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}

.auron-chatbot__trigger-copy strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.auron-chatbot__trigger-copy small {
  font-size: 0.78rem;
  color: #64748b;
}

.auron-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: min(420px, calc(100vw - 24px));
  max-height: min(78vh, 680px);
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  visibility: hidden;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.auron-chatbot.is-open .auron-chatbot__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.auron-chatbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.auron-chatbot__agent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auron-chatbot__agent-avatar,
.auron-chatbot__message-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
}

.auron-chatbot__avatar-image {
  width: 28px;
  height: 28px;
  display: block;
}

.auron-chatbot__eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #066fd1;
  font-weight: 700;
}

.auron-chatbot__header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

.auron-chatbot__header p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #475569;
}

.auron-chatbot__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.auron-chatbot__close:hover,
.auron-chatbot__close:focus-visible {
  background: rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.auron-chatbot__close span {
  font-size: 1.45rem;
  line-height: 1;
}

.auron-chatbot__body {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}

.auron-chatbot__messages {
  padding: 18px 18px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.auron-chatbot__message-row {
  display: flex;
  gap: 10px;
}

.auron-chatbot__message-row--user {
  justify-content: flex-end;
}

.auron-chatbot__message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.94rem;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.auron-chatbot__message--bot {
  border-bottom-left-radius: 6px;
  background: #eef4ff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(6, 111, 209, 0.08);
}

.auron-chatbot__message--user {
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.auron-chatbot__message--status {
  max-width: 100%;
  align-self: stretch;
  text-align: center;
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
}

.auron-chatbot__message--success {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.auron-chatbot__message--error {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.auron-chatbot__composer {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: #ffffff;
}

.auron-chatbot__label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}

.auron-chatbot__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.auron-chatbot__option {
  padding: 10px 12px;
  border: 1px solid rgba(6, 111, 209, 0.12);
  border-radius: 14px;
  background: rgba(239, 244, 255, 0.9);
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.auron-chatbot__option:hover,
.auron-chatbot__option:focus-visible {
  border-color: rgba(6, 111, 209, 0.35);
  background: rgba(224, 236, 255, 0.98);
  transform: translateY(-1px);
  outline: none;
}

.auron-chatbot__input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auron-chatbot__input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auron-chatbot__input::placeholder {
  color: #94a3b8;
}

.auron-chatbot__input:focus-visible {
  border-color: rgba(6, 111, 209, 0.55);
  box-shadow: 0 0 0 4px rgba(6, 111, 209, 0.1);
  outline: none;
}

.auron-chatbot__input[aria-invalid="true"] {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.auron-chatbot__send {
  min-width: 106px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: #eff6ff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.auron-chatbot__send:hover,
.auron-chatbot__send:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
  outline: none;
}

.auron-chatbot__send:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.auron-chatbot__helper,
.auron-chatbot__status {
  margin: 10px 2px 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.auron-chatbot__helper {
  color: #64748b;
}

.auron-chatbot__status {
  color: #b91c1c;
}

.auron-chatbot__typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auron-chatbot__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(6, 111, 209, 0.55);
  animation: auron-chatbot-blink 1.2s infinite ease-in-out;
}

.auron-chatbot__typing span:nth-child(2) {
  animation-delay: 0.16s;
}

.auron-chatbot__typing span:nth-child(3) {
  animation-delay: 0.32s;
}

body.auron-chatbot-open {
  overflow: hidden;
}

@keyframes auron-chatbot-float-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auron-chatbot-blink {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

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

@media (max-width: 720px) {
  .auron-chatbot {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: auto;
  }

  .auron-chatbot__trigger {
    width: auto;
    max-width: min(320px, calc(100vw - 20px));
  }

  .auron-chatbot__panel {
    right: 0;
    bottom: calc(100% + 12px);
    width: min(420px, calc(100vw - 20px));
    max-height: min(75vh, 640px);
    border-radius: 24px;
  }

  .auron-chatbot__options {
    grid-template-columns: 1fr;
  }

  .auron-chatbot__trigger-copy small {
    display: none;
  }
}
