@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: rgba(79, 10, 79, 0.98);
}

.chatbot {
  position: relative;
  height: 700px;
  width: 750px;
  background-color: white;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0px 0px 10px 0 black
}

.header {
  background-color: rgba(79, 10, 79, 0.98);
  height: 70px;
  display: flex;
  align-items: center;
  padding: 15px, 22px;
}

.header-info {
  display: flex;
  align-items: center;
}

.header-info h2 {
  padding-left: 20px;
  font-size: 22px;
  color: goldenrod;
}

.header-info img {
  padding: 3px;
  background-color: goldenrod;
  height: 45px;
  margin-left: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bodyy {
  padding: 25px 0px;
  height: 540px;
  display: flex;
  flex-direction: column;
  margin-bottom: 80px;
  overflow-y: auto;
  gap: 20px;
}

.bodyy .message {
  display: flex;
  gap: 11px;
}

#chatbot-icon {
  height: 35px;
  padding: 3px;
  background-color: goldenrod;
  margin-left: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 2px;
}

.user-msg {
  flex-direction: column;
  align-items: flex-end;
  margin-left: 100px;
  margin-right: 10px;
}

.message .text {
  color: goldenrod;
  padding: 12px 16px;
  font-size: 0.95rem;
}

.bot-msg.thinking .text {
  padding: 2px 16px;
}

.bot-msg .text {
  background-color: rgba(79, 10, 79, 0.98);
  border-radius: 13px 13px 13px 3px;
  margin-right: 240px;
}

.user-msg .text {
  background-color: rgba(79, 10, 79, 0.98);
  color: white;
  border-radius: 13px 13px 3px 13px;
  margin-left: 180px;
}

.thinking-indicator {
  display: flex;
  gap: 4px;
  padding-block: 15px;
}

.thinking-indicator .dot {
  height: 7px;
  width: 7px;
  opacity: 0.7;
  border-radius: 50%;
  background-color: goldenrod;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}
.thinking-indicator .dot:nth-child(2) {
  animation-delay: 0.3s;
}
.thinking-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%,
  44% {
    transform: translateY(0);
  }

  28% {
    opacity: 0.4;
    transform: translateY(-4px);
  }

  44% {
    opacity: 0.2;
  }
}

.footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  background-color: white;
  padding: 15px 22px 20px;
}

.chat-form {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 32px;
  outline: 1px solid rgba(79, 10, 79, 0.98);
}

.chat-form:focus-within {
  outline: 2px solid rgba(79, 10, 79, 0.98);
}

.msg-input {
  border: none;
  outline: none;
  height: 47px;
  resize: none;
  width: 100%;
  font-size: 0.95rem;
  padding: 14px 0 13px 18px;
  border-radius: inherit;
}

.chat-form .controls {
  display: flex;
  height: 47px;
  align-items: center;
  align-self: flex-end;
}

.chat-form .controls button {
  height: 47px;
  width: 70px;
  cursor: pointer;
  border-radius: 32px;
  border-width: 0.8px;
  background-color: rgba(79, 10, 79, 0.98);
  color: white;
  display: none;
}

.chat-form .msg-input:valid ~ .controls button {
  display: block;
}

.chat-form .controls button:hover {
  opacity: 0.8;
}
.chat-form .controls button:active {
  opacity: 0.7;
}
