/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#Chat {
  white-space: normal;
}

/* The "#chat " is required to override "#Chat *" from conv.css */

.message {
  display: flex;
  align-items: flex-start;
  margin-block: 5px;
  padding: 5px 6px;
  border-radius: 4px;
}

#Chat .event {
  display: flex;
  flex-direction: column;
  margin-left: 0;
  clear: none;
  padding-inline: 6px;
}

.event-row {
  display: flex;
  align-items: start;
}

#Chat .event p {
  margin: 0;
  margin-block-end: 5px;
}

#Chat #unread-ruler {
  margin: 4px;
}

.sidebar {
  display: flex;
  justify-content: end;
  margin-inline-end: 10px;
  margin-block-start: 2px;
  width: 4.5em;
  flex-wrap: wrap;
  text-align: right;
}

.body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pseudo {
  font-size: 0.9em;
  font-weight: bold;
  letter-spacing: 0.01em;
  margin-block-end: 0;
}

.message.outgoing + .message.outgoing,
.message.incoming + .message.incoming {
  margin-block: 0;
}

.message:not(.action) > .next {
  visibility: hidden;
}

.date {
  font-size: 0.75em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: normal;
  white-space: nowrap;
}

.ib-sender.message-encrypted {
  position: relative;
}

.ib-sender.message-encrypted::before {
  position: relative;
  display: inline-block;
  content: '';
  width: 11px;
  height: 11px;
  opacity: 0.5;
  background: url("chrome://messenger/skin/icons/connection-secure.svg") no-repeat center;
  background-size: contain;
  margin-inline-end: 4px;
  -moz-context-properties: fill;
}

.usericon {
  display: none;
}

.nick {
  font-weight: bold;
}

.nick > .pseudo {
  text-decoration: underline;
}

.action {
  font-style: italic;
}

.context > .pseudo {
  opacity: 0.7;
}

p *:any-link img {
  margin-bottom: 1px;
  border-bottom: solid 1px;
}

.sessionstart-ruler {
  margin: 8px 0 12px;
  width: 100%;
  border: none;
}

/* used by javascript */
.eventToggle {
  background: var(--icon-nav-down-sm) no-repeat left center;
  margin-bottom: -22px;
  cursor: pointer;
  height: 22px;
  width: 20px;
  z-index: 1;
  opacity: 0.5;
  -moz-context-properties: stroke;
}

.eventToggle:hover {
  opacity: 1;
}

.hide-children > :is(.event-row,hr):not(:first-of-type,:last-of-type,.no-collapse) {
  display: none;
}

.hide-children .eventToggle {
  background: var(--icon-nav-right-sm) no-repeat left center;
}

.hide-children .eventToggle:-moz-locale-dir(rtl) {
  background: var(--icon-nav-left-sm) no-repeat right center;
}
