#chat-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--theme-highlight-hard);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 8px var(--theme-foreground-light);
}

#chatbox {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  background: var(--theme-background);
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--theme-foreground-light);
  opacity: 0;
  visibility: hidden;
  height: 0em;
  transition: opacity 0.4s ease, visibility 0.4s ease, height 0.4s ease;
  display: flex;
  /* Your layout, could be flex/grid/block */
  flex-direction: column;
  overflow: hidden;
}

#chat-header {
  background: var(--theme-highlight-hard);
  color: var(--theme-background);
  padding: 10px;
  text-align: center;
}

#chatbox.show {
  opacity: 1;
  height: min(70%, 30em);
  visibility: visible;
}

#chatbox.hidden {
  opacity: 0;
  height: 0em;
  visibility: hidden;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  max-width: 75%;
  padding: 10px;
  border-radius: 15px;
  animation: fadeIn 0.3s ease-in-out;
}

.support {
  align-self: flex-start;
}

.user {
  align-self: flex-end;
  background-color: #ddd;
  padding: 0.3em .8em;
  border-radius: .5em;
  border-top-right-radius: 0em;
}

#chat-input {
  display: flex;
  border-top: 1px solid #ccc;
}


#input {
  flex: 1;
  border: none;
  padding: 10px;
  outline: none;
}

#send-btn {
  margin-left: 5px;
  background: var(--theme-highlight-hard);
  color: var(--theme-background);
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}