

#chat-window {
  display: none;
  flex-direction: column;
  position: fixed;
      bottom: 100px;
    right: 35px;
      width: 500px;
    height: 70vh;
  background: #ebe7e6;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  animation-duration: 0.3s;
  animation-timing-function: ease-in-out;
  z-index: 1001;
}
#chat-window.open {
display:flex;
  animation: slideUpChat 0.3s ease-in-out forwards;
}

/* Apply Slide-down when closing */
#chat-window.closed {
display:flex;
  animation: slideDownChat 0.3s ease-in-out forwards;
}

/* Slide-up animation */
@keyframes slideUpChat {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Slide-down animation */
@keyframes slideDownChat {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(150%);
    opacity: 0;
  }
}

#chat-header {
  background-color:#212529;
  color: white;
  padding: 10px;
  font-weight: bold;
  text-align: center;
      display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

#chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;  /* Enables vertical scrolling */
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#chat-input {
  display: flex;
  border-top: 1px solid #ccc;
  align-items: center;
}

#chat-input input {
  flex: 1;
  border: none;
  padding: 10px;
}

#chat-input button {
  padding: 10px;
  background:#212529;
  color: white;
  border: none;
  cursor: pointer;
}

.user-msg {
  background-color: #fbfbfb;
  padding: 8px;
  border-radius: 8px;
  max-width: 90%;
  align-self: flex-end;
  margin-top:10px;
}

.bot-msg {
  background-color:#decc3361;
  padding: 8px;
  border-radius: 8px;
  max-width: 90%;
  align-self: flex-start;
  margin-top:10px;
}
.bot-msg.rtl {
  direction: rtl;
  text-align: right;
}
.bot-msg strong {
    font-weight: 500;
}
.bot-msg span.sender, .user-msg span.sender{
    font-weight: 600;
}
#typing {
  font-style: italic;
  color: gray;
  margin: 5px;
}

#emoji-picker-container {
  position: absolute;
  bottom: 45px;
  left: 0;
  z-index: 1002;
}

.dots::after {
  content: '...';
  animation: blink 1s infinite;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}
#chat-input input:focus-visible {
    outline: none;
}

.image-upload-btn {
  display: inline-block;
  cursor: pointer;
  margin-right: 10px;
}

.image-upload-btn img {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}
div#chat-messages:after {
    content: '';
    background-image: url(https://its.com.pk/inc/chat-images/4445white.png);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 200px;
    height: 200px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.3;
}
/* Style for the file input to hide it */
#image-upload {
  display: none;
}

a#chat-button i.icon svg path{fill: #ffffff00;}

@media only screen and (max-width: 600px) {
    
    #chat-window{
    right: 20px;
    width: 90%;
    }
}
