/* Ai Dispatches — Email & Robots module (views-comms.css).
   Companion to views-comms.js. Reuses styles.css classes (card, pill-btn,
   text-input, field-label, toggle, toggle-row, kv-row, red-notice,
   empty-state, hint, chip, notice-gold, notice-red) and theme variables —
   everything here is comm-* additions only, theme-aware via the vars. */

.comm-card{margin-bottom:16px}
.comm-small-btn{width:auto;padding:8px 16px;font-size:14px;flex:none}

/* ── Email accounts ── */
.comm-acct-row{border:2px solid var(--card-border);border-radius:16px;padding:13px 15px;margin-bottom:10px;background:var(--card)}
.comm-acct-main{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.comm-acct-main strong{color:var(--navy);font-size:16px;overflow-wrap:anywhere}
.comm-acct-meta{display:flex;gap:8px 18px;flex-wrap:wrap;color:var(--gray);font-size:13.5px;margin-top:5px}
.comm-status{font-size:11.5px;font-weight:800;padding:4px 9px;border-radius:999px;background:var(--soft);color:var(--accent);white-space:nowrap}
.comm-status-connected{background:#E7F9EE;color:#157347}
.comm-status-disconnected{background:var(--red-soft);color:var(--red-deep)}
.comm-status-pending_verification{background:var(--notice-bg);color:var(--notice-text)}
.comm-acct-row .pill-btn{margin-top:10px}

/* ── Mailbox threads ── */
.comm-thread-item{text-align:left}
.comm-thread-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline;flex-wrap:wrap}
.comm-thread-top strong{color:var(--navy)}
.comm-thread-subject{font-weight:600;color:var(--text);margin-top:3px;overflow-wrap:anywhere}
.comm-thread-heading{color:var(--navy);margin:4px 0 10px;overflow-wrap:anywhere}
.comm-summary{background:var(--soft);border:1.5px solid var(--soft-border);border-radius:14px;padding:12px 14px;margin-bottom:14px}
.comm-summary strong{color:var(--accent)}
.comm-summary p{margin:5px 0 0;line-height:1.5;color:var(--text)}
.comm-chain{max-height:none}
.comm-msg{max-width:92%}
.comm-msg-inbound{background:var(--card);border:2px solid var(--card-border)}
.comm-msg-robot{border:2px dashed var(--gold);background:var(--notice-bg)}
.comm-msg-head{font-size:12.5px;font-weight:700;color:var(--gray);margin-bottom:5px}
.comm-msg-subject{font-weight:600;margin-bottom:4px;overflow-wrap:anywhere}
.comm-msg-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.comm-picked{font-size:12.5px;font-weight:700;color:#157347;background:#E7F9EE;border-radius:999px;padding:5px 10px;white-space:nowrap}

/* ── Emailer template ── */
.comm-chips{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0 10px}
.comm-autofill-chip{background:var(--soft);border-color:var(--soft-border);color:var(--accent);font-size:13.5px;padding:8px 13px}
textarea.comm-template{width:100%;padding:12px 14px;border:2px solid var(--card-border);border-radius:12px;background:var(--card);color:var(--text);font-size:15px;line-height:1.55;font-family:inherit;resize:vertical;margin:8px 0}
.comm-gold-btn{background:var(--gold);color:#14101D;box-shadow:0 8px 16px rgba(217,165,20,.25)}
.comm-gold-btn:hover{background:var(--gold-bright)}

/* ── Robot jobs ── */
.comm-job-row{border:2px solid var(--card-border);border-radius:16px;padding:13px 15px;margin-bottom:10px;background:var(--card)}
.comm-job-row strong{color:var(--navy)}
.comm-job-steps{margin-top:8px}
.comm-job-steps summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:14px}
.comm-job-steps div{margin-top:5px}

/* ── Owner directory ── */
.comm-dir-group{border:2px solid var(--card-border);border-radius:16px;padding:14px 15px;margin-bottom:12px;background:var(--card)}
.comm-dir-group strong{color:var(--navy)}
.comm-target-line{font-weight:700;color:var(--accent);margin:14px 0 4px}

/* ── Misc ── */
.comm-card input[type="file"].text-input{padding:10px 13px}
.comm-card .btn-row{margin:10px 0}
.comm-card details{color:var(--text)}
@media(max-width:720px){
  .comm-msg{max-width:100%}
  .comm-small-btn{padding:7px 12px}
}
