


.ms-quote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  margin: 0 0 6px;
  padding: 5px 9px;
  border: 0;
  border-inline-start: 3px solid var(--brand, #4f46e5);
  border-radius: 6px;
  background: rgba(0, 0, 0, .05);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--fs-sm, 13px);
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
  min-width: 0;
}
html[data-theme="dark"] .ms-quote { background: rgba(255, 255, 255, .07); }
.ms-quote-label {
  font-size: var(--fs-2xs, 11px);
  font-weight: 600;
  color: var(--brand, #4f46e5);
}
html[data-theme="dark"] .ms-quote-label { color: #a5b4fc; }
.ms-quote-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
}


.bd-inbox-msg.ms-flash .bd-inbox-msg-bubble {
  box-shadow: 0 0 0 3px var(--brand-soft, rgba(79, 70, 229, .25));
  transition: box-shadow .2s ease-out;
}


.ms-edited {
  display: inline-block;
  margin-inline-start: 6px;
  font-family: var(--font-sans);
  font-style: italic;
  color: var(--text-tertiary);
}


.ms-rx-chip {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 8px;
  padding: 0 7px;
  min-height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface, #fff);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}
.ms-rx-chip:hover { background: var(--surface-2); }
@media (hover: none) { .ms-rx-chip { min-height: 30px; padding: 0 10px; } }


.bd-inbox-msg-menu.ms-is-react { min-width: 0; max-width: calc(100vw - 16px); }
.ms-rx-row { display: flex; flex-wrap: nowrap; gap: 2px; }
.bd-inbox-msg-menu .ms-rx-pick {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  border-radius: 8px;
}
.bd-inbox-msg-menu .ms-rx-pick.is-current { background: var(--brand-soft); }
@media (max-width: 900px) {
  .bd-inbox-msg-menu.ms-is-react { min-width: 0; }
  .bd-inbox-msg-menu .ms-rx-pick { width: 44px; height: 44px; padding: 0; font-size: 22px; }
}


.ms-quotebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding-block: 6px 6px; padding-inline: 10px 6px;
  border-inline-start: 3px solid var(--brand, #4f46e5);
  border-radius: 6px;
  background: var(--bg-subtle);
  min-width: 0;
}
.ms-quotebar[hidden] { display: none; }
.ms-quotebar-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ms-quotebar-label { font-size: var(--fs-2xs, 11px); font-weight: 600; color: var(--brand, #4f46e5); }
html[data-theme="dark"] .ms-quotebar-label { color: #a5b4fc; }
.ms-quotebar-text {
  font-size: var(--fs-sm, 13px);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-quotebar-cancel {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}
.ms-quotebar-cancel:hover { color: var(--text-primary); background: var(--surface-2); }
.ms-quotebar-cancel svg { width: 16px; height: 16px; }
@media (hover: none) { .ms-quotebar-cancel { width: 40px; height: 40px; } }


.ms-cm-today { margin: 0; font-size: var(--fs-body, 14px); color: var(--text-primary); }
.ms-cm-page b { color: var(--text-primary); font-weight: 600; }
.ms-cm-card .segmented { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.ms-cm-card textarea.input { width: 100%; box-sizing: border-box; resize: vertical; height: auto; min-height: 76px;
  line-height: 1.45; padding-top: 8px; padding-bottom: 8px; }
.ms-cm-card .ms-cm-rule textarea.input { min-height: 58px; }
.ms-cm-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ms-cm-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  min-width: 0;
}
.ms-cm-rule .input { width: 100%; box-sizing: border-box; min-width: 0; }
.ms-cm-rule [data-ms-reply] { grid-column: 1 / 2; }
.ms-cm-rule [data-ms-remove] { grid-column: 2; grid-row: 1; align-self: start; }
.ms-cm-card .input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ms-cm-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ms-cm-recent li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm, 13px);
}
.ms-cm-recent li:first-child { border-top: 0; }
.ms-cm-recent-when { color: var(--text-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-cm-recent-text { color: var(--text-primary); overflow-wrap: anywhere; min-width: 0; }
.ms-cm-recent-status { color: var(--text-secondary); white-space: nowrap; }
.ms-cm-recent-status.is-send_failed { color: var(--danger); }
.ms-cm-recent-status.is-sent, .ms-cm-recent-status.is-sent_no_psid { color: var(--success); }
@media (max-width: 600px) {
  .ms-cm-recent li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ms-cm-recent-status { white-space: normal; }
}

html [data-page="settings"] #settings-body #stg-comments-card.settings-card.is-wide {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6, 24px);
}
html [data-page="settings"] #settings-body #stg-comments-card.settings-card.is-wide > h3 { padding: 0; }
html [data-page="settings"] #settings-body #stg-comments-card .stg-card-hint { margin: 0; padding: 0; }
@media (max-width: 600px) {
  html [data-page="settings"] #settings-body #stg-comments-card.settings-card.is-wide { padding: 16px; }
}


.msg-bubble.ms-has-act { padding-inline-end: 38px; }
.ms-conv-act {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease-out;
}
.ms-conv-act svg { width: 15px; height: 15px; flex: none; }
.msg-row:hover .ms-conv-act,
.msg-row:focus-within .ms-conv-act,
.ms-conv-act:focus-visible { opacity: 1; }
.ms-conv-act:hover { color: var(--text-primary); }
@media (hover: none) {
  .ms-conv-act { opacity: 1; width: 34px; height: 34px; }
  .ms-conv-act svg { width: 17px; height: 17px; }
  .msg-bubble.ms-has-act { padding-inline-end: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ms-conv-act { transition: none; } }

.bd-inbox-msg-menu.ms-conv-menu { z-index: 160; }
.ms-conv-menu .ms-rx-row + .bd-inbox-msg-menu-item { margin-top: 2px; }
.ms-conv-quote { cursor: default; }
.ms-conv-rx { cursor: default; }

.ms-rx-chip.ms-cust-rx { cursor: default; }
.ms-rx-chip.ms-cust-rx:hover { background: var(--surface, #fff); }
