/* ==========================================================================
   Communications — existing SmartCare tokens only.
   ========================================================================== */

.comm-actions { display: flex; gap: 8px; }
.comm-h3 { font-size: 13px; font-weight: 650; text-transform: uppercase;
           letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.comm-note { margin: -4px 0 10px; }

.comm-prefs, .comm-list { list-style: none; margin: 0; padding: 0; }
.comm-pref { display: flex; align-items: center; gap: 12px;
             padding: 10px 0; border-bottom: 1px solid var(--line); }
.comm-pref:last-child { border-bottom: none; }
.comm-pref-main { flex: 1; min-width: 0; }
.comm-pref-label { font-weight: 600; }
.comm-pref.off .comm-pref-label { color: var(--ink-soft); }
.comm-pref.on .comm-pref-label::before {
  content: "✓"; color: var(--go); font-weight: 700; margin-right: 6px; }

.comm-row { display: flex; justify-content: space-between; gap: 12px;
            padding: 8px 10px; border-radius: var(--radius-sm); }
.comm-row.clickable { cursor: pointer; }
.comm-row.clickable:hover { background: var(--surface); }
.comm-callback { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---- thread ------------------------------------------------------------ */
.thread { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column;
          gap: 10px; padding: 4px 2px 12px; }
.msg { max-width: 78%; }
.msg.inbound  { align-self: flex-start; }
.msg.outbound { align-self: flex-end; text-align: right; }
.msg-body { display: inline-block; text-align: left; white-space: pre-wrap;
            word-break: break-word; padding: 9px 13px; border-radius: 14px;
            font-size: 14.5px; line-height: 1.45; }
.msg.inbound  .msg-body { background: var(--surface); border: 1px solid var(--line);
                          border-bottom-left-radius: 4px; }
.msg.outbound .msg-body { background: var(--accent-soft); color: var(--ink);
                          border-bottom-right-radius: 4px; }
.msg-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.msg-bad { color: var(--brand-red); font-weight: 600; }

.thread-compose { border-top: 1px solid var(--line); padding-top: 12px; }
.thread-compose textarea { width: 100%; resize: vertical; font: inherit; }
.sms-full { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px;
            color: var(--ink-soft); margin: 10px 0 0; cursor: pointer; }
/* styles.css sets width:100% on every input, which stretches a checkbox
   across the row. Put it back to a checkbox. */
.sms-full input[type="checkbox"] { margin-top: 3px; flex: none;
    width: 16px; height: 16px; min-width: 0; padding: 0; border: none;
    background: none; box-shadow: none; accent-color: var(--accent); }
.sms-warn { background: var(--warn-soft); color: var(--warn); font-size: 13px;
            padding: 9px 12px; border-radius: var(--radius-sm); margin: 8px 0 0; }

.call-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.8; }

/* ---- inbox ------------------------------------------------------------- */
tr.unread td { font-weight: 650; }
.nav-badge { margin-left: auto; background: var(--brand-red); color: #fff;
             font-size: 11px; font-weight: 700; line-height: 1;
             padding: 3px 7px; border-radius: 999px; }
#nav a { display: flex; align-items: center; }
