button.openAi {
  width: 40px;
  height: 40px;
  overflow: hidden;
  margin: 0px 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: end;
  position: fixed;
  z-index: 150;
  bottom: 120px;
  right: 15px;
  border-radius: 20px;
  border: 1px solid #000000;
  box-shadow: 4px 4px 0px color-mix(in srgb, var(--primary-color) 40%, white);
  transition: 0.3s;
  transform-origin: right;
}
button.openAi:hover {
  width: 100px;
  color: var(--primary-color);
  box-shadow: 4px 4px 0px var(--primary-color);
}
button.openAi.hide {
  transform: scale(0);
}
button.openAi .openAiWrapper {
  height: 100%;
  min-width: 98px;
  padding: 2.5px 2.5px 2.5px 10px;
  gap: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

button.openAi span {
  font-family: "font-1";
}
button.openAi img {
  width: 33px;
  border-radius: 50%;
}

/* AI Container */
.aiContainer {
  width: 100vw;
  height: var(--app-height, 100svh);
  display: flex;
  flex-direction: column;
  position: fixed;
  background: black;
  z-index: 150;
  left: -100%;
  top: var(--vv-top, 0);
  transition: left 0.3s, right 0.3s;
  transition-timing-function: ease-in;
}
.aiContainer.active {
  left: 0;
}

/* AI Header */
.aiHeader {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aiName {
  color: var(--primary-color);
  font-size: 16px;
  font-family: "font-1";
  padding: 0 0 0 8px;
  gap: 10px;
  display: flex;
  align-items: center;
}
.aiName img {
  height: 35px;
}

button.closeAi {
  width: 55px;
  height: 55px;
  margin-bottom: -5px;
  padding: 0 0 10px 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  clip-path: path(
    "M 55,55 A10,10 0,0,0 45,45 L 20,45 A10,10 0,0,1 10,35 L 10,10 A10,10 0,0,0 0,0 L 55,0 Z"
  );
}

button.closeAi span {
  display: block;
  height: 3px;
  width: 30px;
  border-radius: 3px;
  background: black;
}

/* Chatbox */
.chatbox {
  height: 100%;
  padding: 10px;
  gap: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 0 15px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--primary-color) 50%, black);
}
.chatbox::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

/* Messages */
.user-msg,
.ai-msg {
  max-width: 80%;
}
.user-msg {
  margin-left: auto;
}

.user-msg p,
.ai-msg p {
  color: white;
  padding: 5px 10px;
  word-wrap: break-word;
}

.user-msg p {
  background: var(--primary-color);
  border-radius: 20px 20px 2px 20px;
}

.ai-msg p {
  background: #ffffff2b;
  border-radius: 20px 20px 20px 2px;
}
.ai-msg a {
  color: var(--primary-color);
}

.ai-msg img {
  width: 70%;
  max-width: 250px;
  margin-top: 5px;
  background: var(--primary-color);
  border-radius: 20px 20px 20px 2px;
}

/* Typing Animation */
.typing {
  margin-right: auto;
  transition: 0.3s;
  transform: scale(0);
  transform-origin: bottom left;
}
.typing.active {
  transform: scale(1);
}

.typing .typingWrapper {
  width: 60px;
  height: 35px;
  background: #ffffff2b;
  padding: 0px 15px 10px 15px;
  gap: 5px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 20px 20px 20px 2px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: bounce 1s infinite ease-in-out;
}
.typing span:nth-child(1) {
  animation-delay: 0s;
}
.typing span:nth-child(2) {
  animation-delay: 0.1s;
}
.typing span:nth-child(3) {
  animation-delay: 0.2s;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* User Input Area */
.userQuery {
  background: black;
  margin: 7px;
  gap: 5px;
  display: flex;
}

.userQuery .userText {
  width: 100%;
  height: 40px;
  padding: 12px;
  color: white;
  max-height: 100px;
  background: transparent;
  font-size: 16px;
  line-height: 18px;
  font-family: "font-1";
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  outline: none;
  resize: none;
  transition: 0.3s;
  overflow-y: hidden;
  scrollbar-width: none;
}
.userQuery .userText::placeholder {
  color: var(--secondary-color);
}
.userQuery .userText:focus {
  box-shadow: 0px 0px 10px var(--primary-color);
}

.userQuery button {
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 20px;
  background: var(--primary-color);
}
.userQuery button:disabled {
  cursor: default;
  filter: brightness(0.5);
}

.userQuery button span {
  display: block;
  height: 30px;
  width: 35px;
  margin-left: 5px;
  background: black;
  transform: scale(0.7);
  clip-path: path("M0 30 L35 15 L0 0 L7 12 L25 15 L7 18Z");
}

/* FAQs */
.faqs {
  gap: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-bottom: 15px;
  color: var(--accent-color);
}

.faqs .faq {
  max-width: 80%;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
}

/* Media Queries */
@media (min-width: 768px) {
  button.openAi {
    width: 100px;
    margin: 0px;
    right: 40px;
    bottom: 25px;
  }

  .aiContainer {
    height: 80vh;
    max-width: 400px;
    max-height: 750px;
    bottom: 25px;
    right: -100%;
    left: auto;
    top: auto;
    overflow: hidden;
    border-radius: 15px;
    border: 1.5px solid var(--primary-color);
  }
  .aiContainer.active {
    right: 40px;
    left: auto;
  }
}
