* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  background: linear-gradient(#361e5c, #925fff);
  display: flex;
  justify-content: center;
  align-items: center;
}

.chatbot {
  width: 350px;
  height: 495px;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header {
  background: linear-gradient(#f24f13, #f27442);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px;
  border-radius: 20px 20px 0 0;
}

.chat-body {
  flex: 10;
  padding: 16px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #f0f6ff;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(500px - 135px);
  scrollbar-width: thin;
  scrollbar-color: #f24f13 transparent;
}

.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
  background-color: #f24f13;
  border-radius: 3px;
}

button {
  background-color: transparent;
  border: none;
}

@keyframes dotPulse {
  0%,
  44% {
    transform: translateY(0);
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
  }
  28% {
    opacity: 0.4;
    transform: translateY(-4px);
    -webkit-transform: translateY(-4px);
    -moz-transform: translateY(-4px);
    -ms-transform: translateY(-4px);
    -o-transform: translateY(-4px);
  }
  44% {
    opacity: 0.2;
  }
}

.dot:nth-child(1) {
  animation-delay: 0.4s;
}

.dot:nth-child(1) {
  animation-delay: 0.3s;
}

.dot:nth-child(1) {
  animation-delay: 0.2s;
}

.dot {
  height: 7px;
  width: 7px;
  margin: 0 1px;
  background-color: #7784b1;
  border-radius: 50%;
  display: inline-block;
  animation: dotPulse 1.8s ease-in-out infinite;
  -webkit-animation: dotPulse 1.8s ease-in-out infinite;
}

.button {
  height: 35px;
  width: 35px;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #7784b1;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
}

.button:hover {
  background-color: #f1f1ff;
}

.chat-form {
  display: flex;
  position: relative;
  align-items: center;
  background-color: #ffffff;
  border-radius: 32px;
  outline: 1px solid #cccce5;
}

.chat-form:focus-within {
  outline: 2px solid #f24f13;
}

#send-message {
  color: #fff;
  display: none;
  background-color: #f24f13;
}

#send-message:hover {
  background-color: rgb(223, 65, 3);
}

#message-input:valid ~ .chat-controls #send-message {
  display: block;
}

.user-message {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  flex-direction: column;
  align-items: end;
}

.bot-message {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.message-text {
  background: linear-gradient(#f24f13, #f27442);
  color: #ffffff;
  border-radius: 10px 10px 0 10px;
  padding: 10px;
  max-width: 80%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.logo {
  display: flex;
  align-items: end;
  justify-content: end;
  background-color: #f24f13;
  border-radius: 50%;
  padding: 4px;
  height: 30px;
  width: 30px;
}

.bubble-container {
  display: flex;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.bubble-image-container {
  height: full;
  display: flex;
  align-items: end;
}

.bot-bubble {
  background: #fae3d9;
  border-radius: 10px 10px 10px 0;
  padding: 10px;
  max-width: 80%;
  color: #1d1c1c;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.user-bubble {
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 10px 10px 0 10px;
  padding: 10px;
  max-width: 80%;
  word-wrap: break-word;
}

.attatchment {
  width: 70%;
  margin-top: 7px;
  border-radius: 13px 3px 13px 13px;
}

.file-upload-wrapper {
  height: 35px;
  width: 35px;
  position: relative;
}

.file-upload-wrapper #file-cancel {
  color: #2563eb;
  background-color: #fff;
}

.file-upload-wrapper :where(img, button) {
  position: absoute;
}

.file-upload-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.file-upload-wrapper :where(img, #file-cancel),
.file-upload-wrapper.file-uploaded #file-upload {
  display: none;
}

.file-upload-wrapper.file-uploaded img,
.file-upload-wrapper.file-uploaded:hover #file-cancel {
  display: block;
  position: absolute;
  top: 0;
}

em-emoji-picker {
  position: absolute;
  left: 50%;
  top: -337px;
  width: 100%;
  max-width: 350px;
  max-height: 330px;
  visibility: hidden;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -o-transform: translateX(-50%);
}

body.show-emoji-picker em-emoji-picker {
  visibility: visible;
}

.footer {
  width: 100%;
  background-color: #f0f6ff;
  border-radius: 0 0 20px 20px;
  padding: 10px 16px;
  flex: 1;
}

@media screen and (max-width: 768px) {
  .chatbot {
    height: 100vh;
    width: 100%;
    border-radius: 0px;
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    -ms-border-radius: 0px;
    -o-border-radius: 0px;
    background-color: #ffffff;
  }

  .header {
    border-radius: 0px;
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    -ms-border-radius: 0px;
    -o-border-radius: 0px;
  }

  .footer {
    border-radius: 0px;
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    -ms-border-radius: 0px;
    -o-border-radius: 0px;
  }

  .chat-body {
    max-height: calc(100vh - 135px);
  }
}
