#beauty-chatbot {
    --text-color-light: #ffffff;
    --text-color-dark: #333333;
    --bot-msg-bg: #ffffff;
    --font-family: sans-serif; 
    position: fixed;
    bottom: 25px;
    right: 25px;
    font-family: var(--font-family);
    z-index: 9999;
}


#beauty-chatbot.bc-inherit-font {
    font-family: inherit !important;
}
#beauty-chatbot[data-font="vazirmatn_local"] {
    --font-family: 'Vazirmatn', sans-serif;
}



#beauty-chatbot.theme-pink {
  --gradient-primary: linear-gradient(135deg, #e85a9b 0%, #c33764 100%);
  --gradient-user: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
  --window-bg: #fdf5f8;
  --pattern-color: "%23f2dbe7";
  --shadow-color: rgba(195, 55, 100, 0.1);
}
#beauty-chatbot.theme-blue {
  --gradient-primary: linear-gradient(135deg, #5a9be8 0%, #376ec3 100%);
  --gradient-user: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
  --window-bg: #f3f7fd;
  --pattern-color: "%23e1eaf7";
  --shadow-color: rgba(55, 110, 195, 0.1);
}
#beauty-chatbot.theme-green {
  --gradient-primary: linear-gradient(135deg, #5ae89b 0%, #37c36e 100%);
  --gradient-user: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
  --window-bg: #f3fdf7;
  --pattern-color: "%23e1f7ea";
  --shadow-color: rgba(55, 195, 110, 0.1);
}
#beauty-chatbot.theme-purple {
  --gradient-primary: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  --gradient-user: linear-gradient(135deg, #ddd6f3 0%, #faaca8 100%);
  --window-bg: #f8f5f9;
  --pattern-color: "%23e9ddee";
  --shadow-color: rgba(142, 68, 173, 0.1);
}
#beauty-chatbot.theme-orange {
  --gradient-primary: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  --gradient-user: linear-gradient(135deg, #ffe1c5 0%, #ffd1a9 100%);
  --window-bg: #fef8f2;
  --pattern-color: "%23f9e9d4";
  --shadow-color: rgba(230, 126, 34, 0.1);
}
#beauty-chatbot.theme-charcoal {
  --gradient-primary: linear-gradient(135deg, #485461 0%, #2c3e50 100%);
  --gradient-user: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  --window-bg: #f4f5f6;
  --pattern-color: "%23e4e6e8";
  --shadow-color: rgba(44, 62, 80, 0.1);
}
#beauty-chatbot.theme-red {
  --gradient-primary: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  --gradient-user: linear-gradient(135deg, #ffdde1 0%, #ee9ca7 100%);
  --window-bg: #fdf5f4;
  --pattern-color: "%23f7e5e3";
  --shadow-color: rgba(192, 57, 43, 0.1);
}
#beauty-chatbot.theme-teal {
  --gradient-primary: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
  --gradient-user: linear-gradient(135deg, #a7ffeb 0%, #64ffda 100%);
  --window-bg: #f2fbf9;
  --pattern-color: "%23d4f2ea";
  --shadow-color: rgba(22, 160, 133, 0.1);
}
#beauty-chatbot.theme-indigo {
  --gradient-primary: linear-gradient(135deg, #4834d4 0%, #341f9d 100%);
  --gradient-user: linear-gradient(135deg, #c5cae9 0%, #9fa8da 100%);
  --window-bg: #f5f4fd;
  --pattern-color: "%23e5e3f7";
  --shadow-color: rgba(52, 31, 157, 0.1);
}
#beauty-chatbot.theme-coral {
  --gradient-primary: linear-gradient(135deg, #ff7f50 0%, #ff6b6b 100%);
  --gradient-user: linear-gradient(135deg, #ffe0d8 0%, #ffcdbf 100%);
  --window-bg: #fff6f4;
  --pattern-color: "%23f9e7e3";
  --shadow-color: rgba(255, 107, 107, 0.1);
}
#beauty-chatbot.theme-slate {
  --gradient-primary: linear-gradient(135deg, #778ca3 0%, #4b6584 100%);
  --gradient-user: linear-gradient(135deg, #f1f2f6 0%, #dfe4ea 100%);
  --window-bg: #f7f8f9;
  --pattern-color: "%23e8e9eb";
  --shadow-color: rgba(75, 101, 132, 0.1);
}
#beauty-chatbot.theme-sunset {
  --gradient-primary: linear-gradient(135deg, #fdc830 0%, #f37335 100%);
  --gradient-user: linear-gradient(135deg, #fff9e6 0%, #fff2d1 100%);
  --window-bg: #fffbf2;
  --pattern-color: "%23faeed4";
  --shadow-color: rgba(243, 115, 53, 0.1);
}


#beauty-chatbot #chat-toggle {
  background: var(--gradient-primary);
  color: var(--text-color-light);
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  cursor: pointer;
  box-shadow: 0 5px 20px var(--shadow-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.chat-toggle-wrapper {
  position: relative;
}
.chat-toggle-pop {
  color: black;
  box-shadow: 0 5px 20px 11px rgb(0 0 0 / 10%);
  padding: 11px;
  text-wrap: wrap;
  border-radius: 9px;
  background-color: #fff;
  font-size: 16px;
  display: flex;
  gap: 5px;
  width: fit-content;
  max-width: 230px;
  position: fixed;
  bottom: 100px;
  right: 25px;
  font-family: inherit;
  z-index: 9999;
}
.chat-toggle-pop:before {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 21px;
  width: 12px;
  height: 12px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  border-radius: 0 0 4px 0;
  background-color: inherit;
}
.chat-toggle-pop p {
  text-wrap: wrap;
  margin: 0;
}
.chat-toggle-pop svg {
  width: 15px;
  cursor: pointer;
}
.hidden {
  display: none;
}
#beauty-chatbot #chat-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}
#beauty-chatbot #chat-toggle svg {
  transition: transform 0.3s, opacity 0.3s;
  position: absolute;
}
#beauty-chatbot #chat-toggle .icon-close {
  transform: rotate(-90deg) scale(0.5);
  opacity: 0;
}
#beauty-chatbot.open #chat-toggle .icon-chat {
  transform: rotate(90deg) scale(0.5);
  opacity: 0;
}
#beauty-chatbot.open #chat-toggle .icon-close {
  transform: rotate(0) scale(1);
  opacity: 1;
}

#beauty-chatbot #chat-window {
  display: flex;
  flex-direction: column;
  width: 360px;
  height: 550px;
  position: absolute;
  bottom: 90px;
  right: 0;
  background-color: var(--window-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
#beauty-chatbot.open #chat-window {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

#beauty-chatbot #chat-header {
  background: var(--gradient-primary);
  color: var(--text-color-light);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
#chat-header span {
  font-size: 20px;
}

#beauty-chatbot #close-chat {
  background: none;
  border: none;
  color: var(--text-color-light);
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.8;
  display: flex;
}
#close-chat svg {
  width: 20px;
}
#beauty-chatbot #chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: var(--window-bg);
}

#beauty-chatbot.theme-pink #chat-messages { background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f2dbe7' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
#beauty-chatbot.theme-blue #chat-messages { background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e1eaf7' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }


#beauty-chatbot #chat-messages .msg {
  padding: 12px 18px;
  border-radius: 20px;
  max-width: 85%;
  line-height: 1.6;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(10px);
  animation: message-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  font-size: 16px;
}
@keyframes message-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#beauty-chatbot #chat-messages .msg.bot {
  background: var(--bot-msg-bg);
  color: var(--text-color-dark);
  align-self: flex-start;
  border-bottom-right-radius: 5px;
}
#beauty-chatbot #chat-messages .msg.user {
  background: var(--gradient-user);
  color: var(--text-color-dark);
  align-self: flex-end;
  border-bottom-left-radius: 5px;
}

#beauty-chatbot #chat-input-container {
  display: flex;
  padding: 10px;
  background-color: #ffffff;
  border-top: 1px solid #f0f0f0;
}
#beauty-chatbot #chat-input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--text-color-dark);
  font-family: inherit;
}
#beauty-chatbot #send-btn {
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg) scaleX(-1);
}
#beauty-chatbot #send-btn:hover {
  filter: brightness(1.1);
  transform: rotate(360deg) scaleX(-1);
}

#quick-replies-container {
  padding: 5px 10px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
}

.quick-reply-btn {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

#beauty-chatbot.theme-pink .quick-reply-btn { border-color: #e85a9b; color: #c33764; }
#beauty-chatbot.theme-blue .quick-reply-btn { border-color: #5a9be8; color: #376ec3; }
#beauty-chatbot.theme-green .quick-reply-btn { border-color: #5ae89b; color: #37c36e; }

.quick-reply-btn:hover, .quick-reply-btn.selected {
  background: var(--gradient-primary);
  color: var(--text-color-light) !important;
  transform: translateY(-2px);
  border-color: transparent;
}

.quick-reply-confirm-btn {
    background: var(--gradient-primary);
    color: var(--text-color-light);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    margin-top: 5px;
}

@media (max-width: 480px) {
  #beauty-chatbot {
    bottom: 70px;
    right: 15px;
  }
  .chat-toggle-pop{
    bottom: 150px;
    right: 15px;
  }
  #beauty-chatbot.open #chat-window {
    width: 100dvw;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #beauty-chatbot.open #chat-toggle {
    opacity: 0;
    pointer-events: none;
  }
}
#beauty-chatbot #chat-header .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

#beauty-chatbot #bc-restart-chat {
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    display: flex;
    transition: 500ms;
}

#beauty-chatbot #bc-restart-chat:hover {
    opacity: 1;
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

#beauty-chatbot #bc-restart-chat svg {
    width: 20px;
}
