/* Header subtitle on mobile devices */
@media (max-width: 420px) {
  .rw-header .rw-with-avatar {
    font-size: 12px;
  }
}

/* Webchat custom styles */
#webchat .rw-launcher, #webchat .rw-header, #webchat .rw-close-button, #webchat .rw-client, #webchat .rw-avatar{
  background-color: #ffab00;
}
#webchat .rw-conversation-container { box-shadow: 0 2px 10px 1px #606060; border-radius: 0px; }
#webchat .rw-conversation-container .rw-header { height: 70px; } 
#webchat .rw-avatar {
  width: 30px;
  height: 30px;
}
#webchat .rw-conversation-container .rw-response a:link {}
#webchat .rw-conversation-container .rw-response a:visited {}
#webchat .rw-conversation-container .rw-response a:hover {}
#webchat .rw-messages-container {
  text-align: center;
  width: 100%; /* Allow centering of livechat init message */
  white-space: pre-wrap;
}

/* Handle indent for resized avatar */
#webchat .rw-messages-container .rw-group-message.rw-from-response .rw-message:not(:first-child):not(:only-child) .rw-response {
    margin-left: 13px;
}

/* Fix for typing indication height */
#webchat .rw-message.rw-typing-indication .rw-response {
  height: 2px;
}

/* Styles from bootstrap for widget */

#webchat .rw-message.rw-with-avatar .rw-response {
  box-sizing: border-box;
}

/* Header subtitle on mobile devices */
@media (max-width: 420px) {
  .rw-header .rw-with-avatar {
    font-size: 12px;
  }
}

#webchat #rw-messages .rw-response:not([class*="rasa-exit-msg"]) a {
  color: #007bff;
  text-decoration: none;
  background-color: transparent;
}

#webchat #rw-messages .rw-response:not([class*="rasa-exit-msg"]) a:hover {
  color: #0056b3;
  text-decoration: underline;
}

#webchat #rw-messages .rw-response.rasa-exit-msg a {
  color: #fff;
  text-decoration: none;
  background-color: transparent;
}

#webchat #rw-messages .rw-response.rasa-exit-msg a:hover {
  color: #9db4ff;
  text-decoration: underline;
}

#webchat .context-msg {
  display: inline-block;
  width: 70%
}

#webchat .context-msg-wrapper {
  justify-content: center;
}

#webchat .rasa-exit-msg {
  background-color: #333333ad;
  border-radius: 2px;
  color: #fff;
  margin: 10px auto 10px auto;
}

#webchat .session-ended {
  background-color: transparent;
  border-radius: 2px;
  color: #222;
  margin: 20px auto 20px auto;
}

#webchat .session-ended::before {
  content: ""; /* Add empty content */
  position: absolute; /* Set the position to absolute */
  top: 0; /* Position the line at the top */
  left: 50%; /* Position the line at the left */
  width: 70%; /* Set the width to 100% */
  height: 1px; /* Set the height of the line */
  background-color: gray; /* Set the color of the line */
  transform: translateX(-50%);
  margin-top: 10px;
}

#webchat .rasa-exit-msg p {
  color: #fff;
}

#webchat .livechat-init-msg {
  background-color: #e00052;
  border-radius: 8px;
  margin: 0;
}

/* Temp fix for new version of MrBot typing indication */
#webchat .rw-dot {
  margin-bottom: 20px;
}

/* Typing indication for OBI welcome message */
#webchat .rw-typing-centered {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Message send button color */
#webchat .rw-conversation-container .rw-send .rw-send-icon-ready {
  fill: #333;
}

/* Styling for dropdown menu */

/* Remove avatar from header to make space for menu button */
#webchat .rw-header .rw-avatar {
  display: none;
}

#webchat .rw-tooltip-close button {
  background: inherit;
}

#webchat .rw-reply {
  background-color: #fff;
  color: #135afe;
}

#webchat #rw-messages .rw-response img {
  max-width: 100%;
}

:root {
  --avatar-url: none;
  --display-override-avatar: none;
}

/* Add avatar for messages from external services */
.rw-group-message.rw-from-response .rw-message:first-child .external-service:before {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: block;
  background-image: var(--avatar-url);
  background-size: 30px 30px;
  width: 30px;
  height: 30px;
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  z-index: 999;

  border-radius: 100%;
  margin-right: 6px;
  background-color: inherit;
}

/* Override typing indication avatar */
.rw-message.rw-typing-indication.rw-with-avatar .rw-response:before {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: var(--display-override-avatar);
  background-image: var(--avatar-url);
  background-size: 30px 30px;
  width: 30px;
  height: 30px;
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  z-index: 999;

  border-radius: 100%;
  margin-right: 6px;
  background-color: inherit;
}

/*
 * Accessibility properties
 *
 */

 /* Visible focus */
.rw-close-button:focus {
  border: 2px inset rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 5px;
}

.rw-launcher:focus {
  outline: 2px dotted rgb(150, 150, 150);
}

.rw-new-message {
  padding: 10px;
  height: 20px;
  box-sizing: content-box;
}

.rw-sender {
  padding: 5px 5px;
}

.rw-new-message:focus {
  outline: none;
  box-shadow: inset 0 0 3px #9d9d9d;
}

/*
 * Translated messages
 *
 */

/* Message to indicate translation */
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated:after {
  content: "Automatically translated";
  position: absolute;
  margin-top: 12px;
  margin-left: -12px;
  font-style: italic;
  font-size: 11px;
  color: black;
}

/* Message content per language */
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-DE:after {
  content: "Automatisch übersetzt";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-EN:after {
  content: "Automatically translated";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-FR:after {
  content: "Traduit automatiquement";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-IT:after {
  content: "Tradotto automaticamente";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-JA:after {
  content: "自動翻訳";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-ES:after {
  content: "Traducción automática";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-NL:after {
  content: "Automatisch vertaald";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-PL:after {
  content: "Automatyczne tłumaczenie";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-PT:after {
  content: "Tradução automática";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-RU:after {
  content: "Автоматический перевод";
}
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated-ZH:after {
  content: "自动翻译";
}

/* Ensure that translation indication does not overlap with message */
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated {
  margin-bottom: 12px;
}

/* Ensure that translation indication does not overlap with buttons */
.rw-group-message.rw-from-response .rw-message:last-child .rw-response.translated ~ .rw-replies {
  margin-top: 20px;
}