/* ECNChat Webchat W1 — exact renderer contrast and reconnect status */

/* Exact public sender element created by logMessage(). */
body.chatActive #log .msg > .ecnMessageSender,
body.chatActive #log .msg > b.ecnMessageSender {
  color: #063f78 !important;
  -webkit-text-fill-color: #063f78 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/*
  User-selected message colors are applied to the whole .msg row. Keep the
  message body color/style, but always make the sender readable.
*/
body.chatActive #log .msg[style] > .ecnMessageSender {
  color: #063f78 !important;
  -webkit-text-fill-color: #063f78 !important;
}

/* Exact topic renderer created by logTopic(). */
body.chatActive #log .topicNotice,
body.chatActive #log .topicNotice .ecnTopicLabel,
body.chatActive #log .topicNotice .ecnTopicText {
  color: #087b35 !important;
  -webkit-text-fill-color: #087b35 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.chatActive #log .topicNotice .ecnTopicLabel {
  font-weight: 700 !important;
}

/* Exact PM window sender labels. */
body.chatActive .dmLog .ecnDMSender {
  color: #6b228f !important;
  -webkit-text-fill-color: #6b228f !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.chatActive .dmLog .ecnDMSenderSelf {
  color: #075fae !important;
  -webkit-text-fill-color: #075fae !important;
}

/* Visible reconnect lifecycle line inside the transcript. */
body.chatActive #log .ecnReconnectStatus {
  margin: 5px 0 !important;
  padding: 6px 9px !important;
  color: #8a4f00 !important;
  -webkit-text-fill-color: #8a4f00 !important;
  font-weight: 700 !important;
  font-style: italic !important;
  background: #fff7da !important;
  border: 1px solid #e7c86a !important;
  border-radius: 5px !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.chatActive #log .ecnReconnectStatus.connecting {
  color: #075fae !important;
  -webkit-text-fill-color: #075fae !important;
  background: #eaf5ff !important;
  border-color: #8bc3f3 !important;
}

body.chatActive #log .ecnReconnectStatus.disconnected,
body.chatActive #log .ecnReconnectStatus.failed {
  color: #a40000 !important;
  -webkit-text-fill-color: #a40000 !important;
  background: #fff0f0 !important;
  border-color: #e49a9a !important;
}


/* W1A final fallback: exact renderer elements are always black. */
body.chatActive #log b.ecnMessageSender,
body.chatActive #log b.ecnTopicLabel,
body.chatActive #log span.ecnTopicText,
body.chatActive .dmLog b.ecnDMSender {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}


/* W1B: exact public chat sender name styling */
body.chatActive #log .ecnMessageSenderWrap {
  color: inherit !important;
  font-size: inherit !important;
}

body.chatActive #log .ecnMessageSenderIcon {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 2px !important;
}

body.chatActive #log .ecnMessageSenderText {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* Keep topic black and readable */
body.chatActive #log b.ecnTopicLabel,
body.chatActive #log span.ecnTopicText {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* PM labels should also be black and regular sized */
body.chatActive .dmLog b.ecnDMSender,
body.chatActive .dmLog b.ecnDMSenderSelf {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
