@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300&display=swap');
:root {
  --primary-color: #4caf50;
  --secondary-color: #5cd561;
  --background-color: #1d1e22;
  --disabled-color: #2a622d;
  --text-color: #fff;
  --panel-color: #333;
  --hover-color: #3e3e3e;
  --button-radius: 15px;
  --message-radius: 10px;
  --transition-duration: 200ms;
  --scrollbar-width: 10px;
  --scrollbar-thumb-color: #444;
  --scrollbar-thumb-hover-color: #4b4b4b;
}

* {
  color: var(--text-color);
  font-family: 'Nunito', sans-serif;
}

body {
  background-color: var(--background-color);
}

.msg-panel {
  background-color: var(--panel-color);
  height: calc(91vh - 1.16in);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--button-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.msg-panel .msg {
  padding: 10px 7px;
  margin-top: 15px;
  background-color: var(--primary-color);
  opacity: 0;
  width: max-content;
  max-width: 5in;
  word-wrap: break-word;
  border-radius: var(--message-radius);
  display: block;
  white-space: pre-wrap;
  position: relative;
  transition: var(--transition-duration);
  transition-property: opacity, margin;
}

#clear:hover {
  background-color: var(--secondary-color);
}

#clear:disabled {
  background-color: var(--disabled-color);
  cursor: not-allowed;
}

.dock {
  position: absolute;
  display: flex;
  gap: 5px;
  width: calc(100% - 17px);
  bottom: 10px;
}

input,
button {
  border: none;
  background-color: #333;
  border-radius: var(--button-radius);
  padding: 15px 20px;
  outline: none;
  font-size: 20px;
  resize: none;
  transition: var(--transition-duration);
  transition-property: background, box-shadow;
}

input {
  width: 100%;
}

input:focus {
  box-shadow: 0 0 0 3px var(--secondary-color);
}

input:hover {
  background-color: var(--hover-color);
}

button {
  background-color: var(--primary-color);
  cursor: pointer;
}

button:hover {
  background-color: var(--secondary-color);
}

button:disabled {
  background-color: var(--disabled-color);
  cursor: not-allowed;
}

a {
  font-weight: bold;
}

img {
  border-radius: var(--message-radius);
}


/* Chat bubble styles */
.user-bubble {
  background-color: var(--primary-color); /* Change to your preferred color */
  color: #fff;
  padding: 10px;
  margin: 8px 0;
  border-radius: var(--message-radius);
  clear: both;
  float: right;
  max-width: 70%;
}

.ai-bubble {
  background-color: var(--secondary-color); /* Change to your preferred color */
  color: #fff;
  padding: 10px;
  margin: 8px 0;
  border-radius: var(--message-radius);
  clear: both;
  float: right;
  max-width: 70%;
}

/* Define the animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes translate-y {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

/* Initial state of chat bubbles (hidden) */
.animated {
  opacity: 0;
  transform: translateY(-10px);
}

/* Apply animations to chat bubbles */
.fade-in {
  animation-name: fade-in;
  animation-duration: 0.5s; /* Adjust the duration as needed */
  animation-fill-mode: both;
}

.translate-y {
  animation-name: translate-y;
  animation-duration: 0.5s; /* Adjust the duration as needed */
  animation-fill-mode: both;
}

/* Define the fade-out animation */
@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Apply the fade-out animation to chat bubbles */
.fade-out {
  animation-name: fade-out;
  animation-duration: 0.5s; /* Adjust the duration as needed */
  animation-fill-mode: both;
}

::selection {
  background-color: #4caf50; /* Change this to the desired highlight color */
  color: #fff; /* Change this to the desired text color */
}