/* Project messages: shared by the client portal and the Studio. */

.rdm { --rdm-line: var(--rda-border, #e4e9f1); --rdm-accent: var(--rda-primary, #2454e8); --rdm-soft: var(--rda-primary-soft, #eaf0fe); --rdm-text: var(--rda-text, #10192b); --rdm-muted: var(--rda-muted, #8891a3); --rdm-radius: var(--rda-radius-md, 14px); }
.rdm-thread { display: flex; flex-direction: column; gap: 12px; max-height: 520px; min-height: 120px; overflow-y: auto; padding: 16px; background: var(--rda-tile, #f5f8fc); border: 1px solid var(--rda-border, #e4e9f1); border-radius: var(--rda-radius-md, 14px); scroll-behavior: smooth; }
.rdm-thread:focus-visible { outline: 2px solid var(--rda-primary, #2454e8); outline-offset: 2px; }
.rdm-empty { margin: auto; padding: 24px 12px; text-align: center; color: var(--rda-muted, #8891a3); }

.rdm-msg { max-width: min(640px, 86%); padding: 10px 14px 12px; border-radius: var(--rda-radius-md, 14px); background: #fff; border: 1px solid var(--rda-border, #e4e9f1); color: var(--rda-body, #4c5567); align-self: flex-start; }
.rdm-msg.is-mine { align-self: flex-end; background: var(--rda-primary-soft, #eaf0fe); border-color: transparent; }
.rdm-msg.is-new { box-shadow: 0 0 0 2px var(--rda-primary, #2454e8); }
.rdm-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 4px; font-size: 12px; color: var(--rda-muted, #8891a3); }
.rdm-meta strong { color: var(--rda-text, #10192b); font-size: 13px; }
.rdm-org { padding: 1px 8px; border-radius: 999px; background: var(--rda-tile, #f5f8fc); font-size: 11px; }
.rdm-meta time { margin-left: auto; }
.rdm-newtag { padding: 1px 8px; border-radius: 999px; background: var(--rda-primary, #2454e8); color: #fff; font-size: 11px; font-weight: 600; }
.rdm-body { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.rdm-body p { margin: 0 0 8px; }
.rdm-body p:last-child { margin-bottom: 0; }
.rdm-body a { color: var(--rda-primary, #2454e8); }

.rdm-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rdm-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--rda-border, #e4e9f1); color: var(--rda-text, #10192b); font-size: 13px; text-decoration: none; }
.rdm-file:hover { border-color: var(--rda-primary, #2454e8); }
.rdm-file .rda-icon { width: 16px; height: 16px; flex: none; }
.rdm-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdm-file small { color: var(--rda-muted, #8891a3); flex: none; }

.rdm-form { margin-top: 14px; }
.rdm-text { display: block; width: 100%; min-height: 84px; padding: 12px 14px; border: 1px solid var(--rda-border, #e4e9f1); border-radius: var(--rda-radius-md, 14px); font: inherit; resize: vertical; box-sizing: border-box; }
.rdm-text:focus { outline: 2px solid var(--rda-primary, #2454e8); outline-offset: 1px; }
.rdm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.rdm-actions .button, .rdm-actions .rds-btn { margin-left: auto; }
.rdm-attach { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px dashed var(--rda-border, #e4e9f1); border-radius: 999px; color: var(--rda-body, #4c5567); font-size: 13px; cursor: pointer; }
.rdm-attach:hover, .rdm-attach:focus-within { border-color: var(--rda-primary, #2454e8); color: var(--rda-primary, #2454e8); }
.rdm-attach .rda-icon { width: 16px; height: 16px; }
.rdm-attach input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.rdm-picked { font-size: 12px; color: var(--rda-muted, #8891a3); }
.rdm-error { margin: 8px 0 0; color: #b42318; font-size: 13px; min-height: 1em; }
.rdm-head h2 { margin: 0 0 12px; }
.rdm-intro { margin: 0 0 12px; }

/* Unread badge (sidebar links and lists). */
.rda-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: 999px; background: var(--rda-primary, #2454e8); color: #fff; font: 600 11px/1 var(--rda-font-body, system-ui); font-style: normal; box-sizing: border-box; }
.rda-link { position: relative; }
body.rda-collapsed .rda-link .rda-badge { position: absolute; top: 6px; right: 10px; min-width: 10px; height: 10px; padding: 0; font-size: 0; }

/* Studio message list. */
.rdm-list { display: flex; flex-direction: column; gap: 8px; max-width: 900px; margin-top: 16px; }
.rdm-listrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--rda-border, #e4e9f1); border-radius: var(--rda-radius-md, 14px); text-decoration: none; color: var(--rda-body, #4c5567); }
.rdm-listrow:hover { border-color: var(--rda-primary, #2454e8); }
.rdm-listrow.has-unread { border-color: var(--rda-primary, #2454e8); background: var(--rda-primary-soft, #eaf0fe); }
.rdm-listmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rdm-listmain strong { color: var(--rda-text, #10192b); font-size: 14px; }
.rdm-listsub { font-size: 12px; color: var(--rda-muted, #8891a3); }
.rdm-listsnip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rdm-listside { display: flex; align-items: center; gap: 10px; flex: none; font-size: 12px; color: var(--rda-muted, #8891a3); }
.rdm-listside .rda-badge { margin-left: 0; }
.rdm-emptybox { max-width: 900px; margin-top: 16px; padding: 32px; text-align: center; background: #fff; border: 1px dashed var(--rda-border, #e4e9f1); border-radius: var(--rda-radius-md, 14px); color: var(--rda-muted, #8891a3); }

@media (max-width: 640px) {
	.rdm-msg { max-width: 94%; }
	.rdm-thread { max-height: 60vh; padding: 12px; }
	.rdm-actions .button, .rdm-actions .rds-btn { margin-left: 0; width: 100%; }
}
