#ai-chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  overflow: hidden;
  display: none;
  font-family: 'Vazir', sans-serif;
}

#ai-chat-interface{
      background-color: #f9f9f9;
}

#ai-chatbot-messages {
  max-width: 99%;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  height: 200px;
  background-color: #f9f9f9;
}

.user-message, .bot-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  max-width: 85%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-message {
  background-color: #daf1ff;
  border: 1px solid #a5d4f7;
  right: 5px;
  color: #003366;
  border-top-right-radius: 0;
  margin-left: 20%;
}

.user-message-img {
  display: flex;
  align-self: flex-start;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-left: 10px;
  max-width: 20%;
}

.bot-message {
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  left: 5px;
  color: #222;
  border-top-left-radius: 0;
  margin-right: 20%;
}

.bot-message-img {
  align-self: flex-start;
  justify-content: flex-start;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
  max-width: 20%;
}

.message-text {
  max-width: 70%;
  word-wrap: break-word;
}

#ai-chatbot-header {
  background: #0073aa;
  color: white;
  padding: 10px;
  cursor: move;
  font-weight: bold;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #005f8d;
  justify-content: center;
  align-items: center;
  text-align: right;
}

#ai-chatbot-input {
  width: 100%;
  border: none;
  border-top: 1px solid #ccc;
  padding: 12px;
  box-sizing: border-box;
  background: #fff;
  font-size: 14px;
  border-radius: 0 0 10px 10px;
}

#ai-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: transparent;
  cursor: pointer;
  z-index: 9999;
}

#ai-chat-launcher img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

#ai-chat-launcher:hover img {
  transform: scale(1.05);
}

.ai-tooltip {
  position: absolute;
  top: -88px;
  right: 30px;
  background-color: #ffffff;
  color: #333;
  padding: 28px 44px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  display: block;
}

.ai-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

.ai-tooltip::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 14px;
  border-width: 8px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

#ai-user-info-form {
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #fdfdfd;
}

#ai-user-info-form input {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#ai-user-info-form button {
  background-color: #0073aa;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

#ai-user-info-form button:hover {
  background-color: #005f8d;
}

.ai-chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 10px;
}

.ai-chatbot-header-text {
  flex-grow: 1;
}

#ai-chatbot-subtitle {
  font-size: 0.85em;
  color: #bbb;
  margin-top: 2px;
}

#ai-chatbot-close {
    margin: 5px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    box-shadow: none;
}

#emoji-picker-toggle {
  cursor: pointer;
  font-size: 1.5em;
  padding: 0 5px;
  position: absolute;
  left: 10px;
  bottom: 5px;
  margin-left: 5px;
}

#emoji-picker {
  position: absolute;
  bottom: 45px;
  display:none;
  right: 10px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  flex-wrap: wrap;
}

#emoji-picker span {
  cursor: pointer;
  padding: 5px;
  font-size: 20px;
}
