body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

#chat-widget {
  position: fixed;
  width: 360px;  
  height: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

#chat-header {
  background-color: #0078D4;
  color: white;
  padding: 0 12px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

#chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f9f9f9;
}

#chat-input {
  display: flex;
  border-top: 1px solid #ccc;
}

#chat-input input {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size:14px;
  height:24px;
}

#chat-input button {
  padding: 10px;
  background-color: #0078D4;
  color: white;
  border: none;
  cursor: pointer;
}

#chat-input button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.message {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  word-wrap: break-word;
}

.message.customer {
  background-color: #DCF8C6;
  align-self: flex-end;
  margin-left: 10%;
  font-size:14px;
}

.message.agent {
  background-color: #e6e6e6;
  align-self: flex-start;
  margin-right:10%;
  font-size:14px;
}

.message.typing {
  font-style: italic;
  color: #555;
  position: relative;
}

.message.typing::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 5px;
  border-radius: 50%;
  background-color: #555;
  animation: blinkDots 1s infinite;
}

@keyframes blinkDots {
  0%, 20% { opacity: 0; }
  40%, 60% { opacity: 0.5; }
  80%, 100% { opacity: 1; }
}

