/* Chat Widget button */
.chat-widget-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: transform 0.2s;
}

.chat-widget-button > * {
  margin: 0.8rem;
}

.chat-widget-button:hover {
  transform: scale(1.1);
}

/* Chat Widget Box */
.chat-widget-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  height: 400px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 1000;
}

.chat-widget-box.open,
.chat-widget-button.open {
  display: flex;
}

/* Chat Header */
.chat-widget-header {
  background-color: #007bff;
  color: white;
  padding: 10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Chat Body */
.chat-widget-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background-color: #f1f1f1;
}

/* Chat Message */
.chat-message {
  margin-bottom: 10px;
  border-radius: 10px;
  background-color: white;
  padding: 0.5rem 1rem;
}

/* Chat Request */
.chat-request {
  border: 1px solid gray;
  margin-right: 20%;
}

/* Chat Reply */
.chat-reply {
  border: 1px solid green;
  text-align: end;
  margin-left: 20%;
}

/* Chat Widget Footer */
.chat-widget-footer {
  padding: 10px;
  border-top: 1px solid #ccc;
  background-color: #f9f9f9;
  display: flex;
  position: relative;
  align-items: center;
}

/* Chat Input */
.chat-widget-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding-right: 45px;
}

/* Chat Send Button */
.chat-widget-send {
  background-color: transparent;
  color: black;
  border: none;
  cursor: pointer;
  position: relative;
  margin-left: 10px;
}

/* Chat Widget Close Button */
.chat-widget-close {
  cursor: pointer;
}

/* Error message styling */
.chat-error {
  /* background-color: #f8d7da; */
  color: red;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Timestamp styling */
.chat-timestamp {
  font-size: 0.75rem;
  color: gray;
  margin-top: 5px;
  text-align: right;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .chat-widget-box {
    width: 90%;
    bottom: 10px;
    right: 5%;
  }

  .chat-widget-button {
    width: 50px;
    height: 50px;
  }
}

/* RTL Support */
[dir="rtl"] .chat-widget-button {
  right: auto;
  left: 20px;
}

[dir="rtl"] .chat-widget-box {
  right: auto;
  left: 20px;
}

[dir="rtl"] .chat-widget-input {
  padding-right: 8px;
  padding-left: 45px;
}

[dir="rtl"] .chat-request {
  /* text-align: start; */
  margin-left: 20%;
  margin-right: 0;
}

[dir="rtl"] .chat-reply {
  margin-left: 0;
  margin-right: 20%;
}

[dir="rtl"] .chat-timestamp {
  text-align: left;
}

[dir="rtl"] .chat-widget-send {
  rotate: 180deg;
  margin-left: 0;
  margin-right: 10px;
}
