.acr-chat-embed {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  font-family: Arial, Helvetica, sans-serif;
}

.acr-panel {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  height: 520px;
  min-height: 520px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
}

.acr-header {
  padding: 20px 20px 16px;
  background: #ffffff;
  border-bottom: 1px solid #ececec;
  flex: 0 0 auto;
}

.acr-header-title {
  font-size: 18px;
  line-height: 1.05;
  font-weight: 800;
  color: #1c2434;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}

.acr-header-text {
  font-size: 15px;
  color: #4f5968;
  line-height: 1.45;
}

.acr-body {
  background: #eef1f5;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.acr-messages {
  padding: 18px;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scroll-behavior: smooth;
}

.acr-steps {
  display: flex;
  flex-direction: column;
}

.acr-status {
  font-size: 13px;
  color: #667085;
  margin-bottom: 12px;
  transition: opacity .2s ease;
}

.acr-row {
  display: flex;
  margin-bottom: 12px;
  width: 100%;
}

.acr-row-bot {
  justify-content: flex-start;
}

.acr-row-user {
  justify-content: flex-end;
}

.acr-bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.acr-bubble-bot {
  background: #ffffff;
  color: #1c2434;
  border-top-left-radius: 6px;
}

.acr-bubble-user {
  background: #14213d;
  color: #ffffff;
  border-top-right-radius: 6px;
}

.acr-composer {
  background: #ffffff;
  padding: 14px 14px 10px;
  border-top: 1px solid #e8e8e8;
  flex: 0 0 auto;
}

.acr-composer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acr-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.acr-input-wrap-inline {
  flex-direction: row;
}

.acr-field {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  color: #1c2434;
  outline: none;
  box-sizing: border-box;
}

textarea.acr-field {
  resize: vertical;
  min-height: 70px;
  max-height: 70px;
}

select.acr-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.acr-send,
.acr-choice,
.acr-start,
.acr-restart {
  border: 0;
  border-radius: 999px;
  background: #d6336c;
  color: #fff;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
  white-space: nowrap;
}

.acr-send:hover,
.acr-choice:hover,
.acr-start:hover,
.acr-restart:hover {
  transform: translateY(-1px);
  opacity: .95;
}

.acr-choice {
  min-width: 88px;
}

.acr-loading {
  font-size: 14px;
  color: #667085;
}

.acr-composer-footnote {
  margin-top: 10px;
  font-size: 12px;
  color: #667085;
  line-height: 1.4;
}

.acr-messages::-webkit-scrollbar {
  width: 8px;
}

.acr-messages::-webkit-scrollbar-track {
  background: transparent;
}

.acr-messages::-webkit-scrollbar-thumb {
  background: rgba(20, 33, 61, 0.22);
  border-radius: 999px;
}

@media (max-width: 520px) {
  .acr-chat-embed {
    max-width: 100%;
  }

  .acr-panel {
    height: 78vh;
    min-height: 560px;
    max-height: 78vh;
  }

  .acr-header-title {
    font-size: 26px;
  }

  .acr-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .acr-send {
    width: 100%;
  }
}

.acr-row-enter {
  animation: acrMessageIn .28s ease forwards;
}

@keyframes acrMessageIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.acr-bubble-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 54px;
  padding: 14px 16px;
}

.acr-bubble-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b3;
  display: inline-block;
  animation: acrTypingBounce 1.2s infinite ease-in-out;
}

.acr-bubble-typing span:nth-child(2) {
  animation-delay: .16s;
}

.acr-bubble-typing span:nth-child(3) {
  animation-delay: .32s;
}

@keyframes acrTypingBounce {
  0%, 80%, 100% {
    transform: scale(.7);
    opacity: .55;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.acr-composer-disabled {
  opacity: .82;
  pointer-events: none;
}

.acr-field:disabled,
.acr-send:disabled,
.acr-choice:disabled {
  cursor: not-allowed;
}

.acr-header-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acr-online {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #16a34a;
  font-weight: 600;
}

.acr-online-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  position: relative;
}

.acr-online-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(22,163,74,.25);
  animation: acrPulse 1.6s infinite;
}

@keyframes acrPulse {
  0% { transform: scale(.8); opacity: .7; }
  70% { transform: scale(1.8); opacity: 0; }
  100% { opacity: 0; }
}