.carsclub-ai-chat {
  position: fixed;
  bottom: 20px;
  z-index: 999999;
  font-family: inherit;
}

.carsclub-ai-chat[dir="rtl"] {
  right: 20px;
  left: auto;
}

.carsclub-ai-chat[dir="ltr"] {
  left: 20px;
  right: auto;
}

.carsclub-ai-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #8B6F47;
  cursor: pointer;
  font-weight: 600;
  background: #8B6F47;
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.carsclub-ai-toggle::before {
  content: '💬';
  font-size: 28px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.carsclub-ai-toggle:hover {
  background: #6F5636;
  box-shadow: 0 6px 16px rgba(139, 111, 71, 0.4);
  transform: scale(1.05);
}

.carsclub-ai-toggle:active {
  transform: scale(0.95);
}

.carsclub-ai-window {
  display: none;
  position: absolute;
  bottom: 75px;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #d4c4b0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carsclub-ai-chat[dir="rtl"] .carsclub-ai-window {
  right: 0;
  left: auto;
}

.carsclub-ai-chat[dir="ltr"] .carsclub-ai-window {
  left: 0;
  right: auto;
}

.carsclub-ai-window.is-open {
  display: block !important;
}

.carsclub-ai-header {
  padding: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8dfd0;
  background: #f8f5f0;
  color: #4a3f2f;
}

.carsclub-ai-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  color: #8B6F47;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.carsclub-ai-close:hover {
  background: rgba(139, 111, 71, 0.1);
  color: #6F5636;
}

.carsclub-ai-messages {
  height: 320px;
  padding: 14px;
  overflow-y: auto;
  background: #fafafa;
}







.carsclub-ai-message {
  padding: 12px 14px !important;
  border-radius: 8px !important;
  margin-bottom: 10px !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
}




.carsclub-ai-message.bot {
  background: #fff !important;
  border: 1px solid #e8dfd0 !important;
  color: #4a3f2f !important;
}

.carsclub-ai-message.bot a {
  color: #8B6F47 !important;
  text-decoration: underline !important;
  font-weight: 500 !important;
}

.carsclub-ai-message.bot a:hover {
  color: #6F5636 !important;
}

.carsclub-ai-message.user {
  background: #8B6F47 !important;
  color: #fff !important;
  border: 1px solid #8B6F47 !important;
}

.carsclub-ai-form {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #e8dfd0;
  background: #f8f5f0;
}

.carsclub-ai-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d4c4b0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #fff;
  color: #4a3f2f;
}

.carsclub-ai-input:focus {
  border-color: #8B6F47;
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.carsclub-ai-input::placeholder {
  color: #999;
}

.carsclub-ai-form button {
  padding: 12px 20px;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: #8B6F47;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 80px;
}

.carsclub-ai-form button:hover {
  background: #6F5636;
  box-shadow: 0 2px 8px rgba(139, 111, 71, 0.3);
}

.carsclub-ai-form button:active {
  transform: translateY(1px);
}

.carsclub-ai-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}