:root {
  --main-color: rgb(0, 125, 252);
  --secondary-color: rgb(1 200 255);
  --accent-color: rgb(0, 125, 252);
  --default-font: "Roboto", sans-serif;
  --default-gradient: linear-gradient(100deg, var(--main-color)10%, var(--secondary-color));
}

div,
p,
span {
  font-family: var(--default-font);
}

/* General Styles */
#chat-widget {
  width: 370px;
  height: calc(100% - 47px);
  max-height: 700px;
  position: fixed;
  bottom: 26px;
  right: 48px;
  border-radius: 16px;
  box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 36px 0px;
  font-family: var(--default-font);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  display: none;
  font-family: var(--default-font);
}

/* Header Styles */
#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--default-gradient);
  color: #ffffff;
  padding: 24px 28px 24px;
}

#agent-section {
  display: flex;
  align-items: center;
}

#agent-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: url('5nizza.webp') center/cover;
  margin-right: 10px;
}

#header-text h2 {
  margin: 0;
  font-weight: 300;
  font-family: var(--default-font);
}

#close-button {
  position: relative;
  cursor: pointer;
}

/* Body Styles */
#chat-body {
  padding: 10px 10px 20px 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

#hello-message {
  margin-bottom: 10px;
}

#hello-message div {
  width: auto;
}

.message {
  border-radius: 20px;
  padding: 10px 15px;
  margin: 5px;
  display: inline-block;
  align-self: flex-end;
}

#type-animation {
  border-radius: 20px;
  padding: 10px 15px;
  margin: 5px;
}

.user-message {
  min-width: 75%;
  align-self: flex-end;
  border-radius: 20px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
}

.message p {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  overflow-wrap: break-word;
}

.chat-message {
  color: black;
  max-width: 75%;
  align-self: flex-start;
  margin-bottom: 5px;
  ;
}

.chat-message-container {
  background-color: #f1f1f1;
}

.user-message-container {
  background-color: var(--accent-color);
  color: white;
}

.message-status-container {
  display: flex;
  font-size: 12px;
  color: rgb(136, 148, 171);
}

.message-divider::before {
  content: ' - ';
  margin: 0 5px;
  color: rgb(136, 148, 171);
}

.user-message-status {
  margin-left: auto;
}

.user-message-status-time {
  margin-right: 10px;
}

.chat-message-username {
  margin-left: 10px;
}

.chat-message-status-time {
  margin-left: 5 px;
}

/* Response Styles */
#quick-response {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

#quick-response button {
  background-color: transparent;
  border: none;
  color: var(--accent-color);
  text-decoration: none;
  position: relative;
  cursor: pointer;

}


/* Footer Styles */
#chat-footer {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  padding-bottom: 10px;
  margin: 20px;
  margin-bottom: 0px;
  ;
}

#footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chat-footer hr {
  margin: 0px;
  border-width: 0px 0px 1px;
  border-top-style: initial;
  border-right-style: initial;
  border-left-style: initial;
  border-top-color: initial;
  border-right-color: initial;
  border-left-color: initial;
  border-image: initial;
  border-bottom-style: solid;
  border-bottom-color: rgb(219, 223, 230);
}

#message-section {
  width: 100%;
}

#user-message {
  letter-spacing: -0.24px;
  -webkit-font-smoothing: antialiased;
  color: rgb(6, 19, 43);
  border: none;
  /* Remove border */
  width: 100%;
  font-size: 17px;
  padding: 20px 0px 14px;
  resize: none;
  line-height: 24px;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: var(--default-font);
  height: 42px;
  ;
}

#user-message:focus,
#user-message:active {
  border: none;
  /* Remove border on active state */
  outline: 0;
  /* Remove outline */
}

#send-button {
  background-color: transparent;
  border: none;
  ;
}

#send-button svg {
  height: 30px;
  width: 30px;
  fill: var(--accent-color);
  cursor: pointer;
  transition: transform 0.2s;
  /* Add transition for smooth movement */
}

#send-button svg:hover {
  transform: translate(2px, -2px);
  /* Move the element 2px to the right and 2px up on hover */
}

@keyframes shake {
  0% {
    transform: translate(0);
  }

  10%,
  20% {
    transform: translate(-5px, 0);
  }

  30%,
  50%,
  70%,
  90% {
    transform: translate(5px, 0);
  }

  40%,
  60%,
  80% {
    transform: translate(-5px, 0);
  }

  100% {
    transform: translate(0);
  }
}

.shake-animation {
  animation: shake 0.6s;
}

/* Typing dots */
#type-animation {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#type-animation p {
  padding-right: 20px;
  color: var(--accent-color);
  font-size: 14px;
}

.dot-elastic {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 7px;
  background-color: var(--accent-color);
  color: var(--accent-color);
  animation: dot-elastic 1s infinite linear;
}

.dot-elastic::before,
.dot-elastic::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
}

.dot-elastic::before {
  left: -10px;
  width: 6px;
  height: 6px;
  border-radius: 7px;
  background-color: var(--accent-color);
  color: var(--accent-color);
  animation: dot-elastic-before 1s infinite linear;
}

.dot-elastic::after {
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 7px;
  background-color: var(--accent-color);
  color: var(--accent-color);
  animation: dot-elastic-after 1s infinite linear;
}

@keyframes dot-elastic-before {
  0% {
    transform: scale(1, 1);
  }

  25% {
    transform: scale(1, 1.5);
  }

  50% {
    transform: scale(1, 0.67);
  }

  75% {
    transform: scale(1, 1);
  }

  100% {
    transform: scale(1, 1);
  }
}

@keyframes dot-elastic {
  0% {
    transform: scale(1, 1);
  }

  25% {
    transform: scale(1, 1);
  }

  50% {
    transform: scale(1, 1.5);
  }

  75% {
    transform: scale(1, 1);
  }

  100% {
    transform: scale(1, 1);
  }
}

@keyframes dot-elastic-after {
  0% {
    transform: scale(1, 1);
  }

  25% {
    transform: scale(1, 1);
  }

  50% {
    transform: scale(1, 0.67);
  }

  75% {
    transform: scale(1, 1.5);
  }

  100% {
    transform: scale(1, 1);
  }
}

/* Chat Mini Widget */
#chat-mini-widget{
  position: fixed;
  bottom: 30px;
  right: 30px;
}

#chat-house {
  width: 60px;
  height: 60px;
  background-color: var(--main-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: absolute;
  bottom: 0px;
  right: 0px;
  z-index: 2;
}

#chat-house-icon {
  fill: white;
  width: 50%;
  transition: width 0.15s ease-in-out;
}

#chat-house:hover #chat-house-icon {
  width: 55%;
}

#new-message-counter {
  background-color: red;
  color: white;
  font-size: 12px;
  position: absolute;
  right: 5px;
  top: 0;
  font-weight: 700;
  border-radius: 10px;
  width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
}

