/* Shared message card styles — used by CRM and RMA views.
   Both views render .msg / .msg-header / .msg-body / .quoted
   with identical visual treatment. CRM-only additions (collapse,
   expand, HTML frame) remain in crm.css. */

.msg {
  border: 1px solid var(--lf-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.msg.inbound { background: var(--lf-panel-alt); }
.msg.outbound {
  background: var(--lf-success-bg);
  border-color: var(--lf-success-border);
}
.msg-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--lf-text-muted);
  margin-bottom: 10px;
}
.msg-header .from {
  color: var(--lf-text);
  font-weight: 600;
}
.msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.55;
  color: var(--lf-text);
}
.msg-body .quoted {
  display: block;
  margin-top: 12px;
}
.msg-body .quoted summary {
  color: var(--lf-text-dim);
  cursor: pointer;
  font-size: 12px;
  list-style: none;
  user-select: none;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  display: inline-block;
}
.msg-body .quoted summary::-webkit-details-marker { display: none; }
.msg-body .quoted summary::before { content: "··· "; color: var(--lf-text-dim); }
.msg-body .quoted summary:hover { background: rgba(255, 255, 255, 0.06); }
.msg-body .quoted[open] summary::before { content: "▾ "; }
.msg-body .quoted pre {
  margin: 10px 0 0 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 2px solid var(--lf-border);
  border-radius: 0 6px 6px 0;
  color: var(--lf-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}
