.ac-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.ac-chat-toggle {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #0055e4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.20);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ac-chat-toggle img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
}

.ac-chat-window {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 520px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.ac-chat-window.is-open {
  display: flex;
}

.ac-chat-header {
  background: #0055e4;
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ac-chat-header-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ac-chat-header-brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.ac-chat-header-brand span {
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.92;
}

.ac-chat-close {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ac-chat-messages {
  flex: 1;
  padding: 16px;
  background: #f7f9fc;
  overflow-y: auto;
}

.ac-msg {
  display: flex;
  margin-bottom: 12px;
}

.ac-msg.user {
  justify-content: flex-end;
}

.ac-msg.bot {
  justify-content: flex-start;
}

.ac-msg-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.ac-msg.user .ac-msg-bubble {
  background: #0055e4;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ac-msg.bot .ac-msg-bubble {
  background: #ffffff;
  color: #1c2733;
  border: 1px solid #e1e7f0;
  border-bottom-left-radius: 4px;
}

.ac-msg-typing {
  color: #6b7280;
  font-style: italic;
}

.ac-chat-footer {
  padding: 12px;
  border-top: 1px solid #e3e8f0;
  background: #ffffff;
  display: flex;
  gap: 8px;
}

.ac-chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid #cfd8e3;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.ac-chat-input:focus {
  border-color: #0055e4;
  box-shadow: 0 0 0 3px rgba(0, 85, 228, 0.12);
}

.ac-chat-send {
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #0055e4;
  color: #ffffff;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}

.ac-chat-send:disabled,
.ac-chat-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 576px) {
  .ac-chat {
    right: 12px;
    bottom: 12px;
  }

  .ac-chat-window {
    right: 0;
    bottom: 74px;
    width: min(380px, calc(100vw - 24px));
    height: 70vh;
  }

  .ac-chat-toggle {
    width: 58px;
    height: 58px;
  }
}