/* The dashboard's own rules. They come after rucy.css, which is rucy.io's stylesheet
   unchanged, and add only what a list of conversations and a real thread need. */

/* The list of conversations: each one a block that is a link as a whole. */
.convos li {
  margin: 0 0 20px;
  padding-left: 0;
  text-indent: 0;
}

.convo {
  display: block;
  text-decoration: none;
}

.convo__head,
.convo__last,
.convo__meta {
  display: block;
}

/* The last message, on one line. */
.convo__last {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Under the pointer the whole block takes the accent ink, and its marks with it. */
.brand a.convo:hover .mark {
  color: inherit;
}

/* A real message keeps its own line breaks, and carries the time it was sent or received. */
.msg {
  white-space: pre-wrap;
}

.msg__at {
  display: block;
  margin-top: 4px;
  opacity: 0.7;
}

/* What a person at the store wrote: on the store's side, like Rucy's, and outlined where
   Rucy's is filled. The padding gives up the line's width, so the bubble is no larger. */
.msg--staff {
  align-self: flex-end;
  padding: 9px 13px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--fg);
}

/* A message that went or came on a store's own WhatsApp number is set as WhatsApp sets it, as
   the others are set as iMessage (rucy.css, .thread). Rucy's is WhatsApp's own outgoing bubble:
   pale green with dark ink in the light theme, deep green with pale ink in the dark one. The
   staff's keeps its outline, in WhatsApp's teal. The shopper's stays the plain bubble. None of
   the colours is from the brand kit; they are WhatsApp's, there to name the channel at a glance,
   and each bubble's ink keeps more than 4.5:1 against it. The dark values are the default, as
   in rucy.css, and the light ones follow the device's setting or the page's own switch. */
.thread {
  --whatsapp: #005c4b;
  --on-whatsapp: #e9edef;
  --whatsapp-line: #00a884;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .thread {
    --whatsapp: #d9fdd3;
    --on-whatsapp: #111b21;
    --whatsapp-line: #008069;
  }
}

:root[data-theme="light"] .thread {
  --whatsapp: #d9fdd3;
  --on-whatsapp: #111b21;
  --whatsapp-line: #008069;
}

.msg--rucy.msg--whatsapp {
  background: var(--whatsapp);
  color: var(--on-whatsapp);
}

.msg--staff.msg--whatsapp {
  border-color: var(--whatsapp-line);
}

/* Who is signed in, at the far end of the foot. */
.colophon__who {
  margin-left: auto;
  overflow-wrap: anywhere;
}
