/* ── Save-in-chat ─────────────────────────────────────────────── */

/* .is-saved keeps the left accent for CSS customisation hooks */
.msg-wrapper.is-saved {
  border-left: 2px solid var(--accent);
  padding-left: 0.4rem;
}
/* Thicker border when you yourself are one of the savers */
.msg-wrapper.is-saved-by-me {
  border-left-width: 3px;
}

/* ── mw-status layout ─────────────────────────────────────────── */
/* All spans inside mw-status are inline-flex, centred vertically */
.mw-status {
  display: none;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
}
.mw-status.is-visible { display: inline-flex; }

/* Transfer span — plain text */
.mws-transfer {
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
}
.mws-transfer.is-err  { color: var(--danger, #e05252); }
.mws-transfer.is-warn { color: var(--accent); }

/* Pipe separator — hidden by default, shown by JS when both spans have content */
.mws-pipe {
  font-size: var(--text-xs);
  color: var(--border-md);
  user-select: none;
}

/* Save span — contains saver blobs (or status text) */
.mws-save {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
}
.mws-save-status { color: var(--muted); font-style: italic; }
.mws-save-error  { color: var(--danger, #e05252); }

/* Saver blobs */
.mws-saver-blob {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.48rem;
  font-weight: 700;
  color: var(--bg);
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
}
.mws-saver-blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mws-saver-more {
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.45rem;
}

/* ── Progress row inside mw-status ────────────────────────────── */
.mws-prog-row {
  display: none;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: 2px;
}
.mws-prog-row.active { display: flex; }

.mws-prog {
  flex: 1;
  height: 2px;
  background: var(--border-md);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}
.mws-prog-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s;
}

/* Cancel × button */
.mws-cancel {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.12s, color 0.12s;
}
.mws-cancel:hover {
  opacity: 1;
  color: var(--danger, #e05252);
}

/* ── Saved-file bubble ─────────────────────────────────────────── */
.saved-file-wrapper {
  display: inline-flex;
  flex-direction: column;
  max-width: 320px;
}
