/* Composer (Ember Loop spec 5.6): the one sheet for Log call, Note, Snooze, Follow-up, Move and Reorder.
   Lives inside UI.sheet (ui.css). Tokens only (tokens.css); no colour literals. Labels are sentence case
   (no tracked-uppercase eyebrows: craft floor). Overdue is text and tint, never a side stripe. */

.cx-sheet .ui-sheet-body{padding-top:0}
.cx{display:flex;flex-direction:column;gap:20px;min-width:0}
.cx-part:empty,.cx-sec:empty{display:none}
.cx-sec{display:flex;flex-direction:column;gap:10px;min-width:0;margin:0}
.cx-sec[hidden]{display:none}
.cx-label{margin:0;font:600 13px/18px var(--font);color:var(--text-2);letter-spacing:0}
.cx-req{color:var(--muted);font-weight:500}
.cx-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cx-current{margin:0;font:400 13px/18px var(--font);color:var(--muted);font-variant-numeric:tabular-nums}
.cx-hint-line{margin:0}
.cx-group-label{margin:0 0 6px;font:500 12px/16px var(--font);color:var(--muted)}

/* ---------- context: who, why now, last time, call ---------- */
.cx-ctx{display:flex;align-items:flex-start;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.cx-ctx-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.cx-subtitle{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;font:400 13px/20px var(--font);color:var(--muted)}
.cx-company{font-weight:600;color:var(--text-strong);overflow-wrap:anywhere}
.cx-company.is-missing{color:var(--hint);font-weight:500}
.cx-sep{color:var(--hint)}
.cx-stagepath{display:inline-flex;align-items:center;gap:6px}
.cx-arrow{color:var(--muted)}
.cx-why{margin:0;font:500 13px/18px var(--font)}
.cx-lastline{margin:0;font:400 13px/18px var(--font);color:var(--text-2);max-width:65ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cx-last-who{color:var(--muted)}
.cx-skeleton{display:inline-block;width:min(260px,70%);height:12px;vertical-align:middle}
.cx-number{flex:none;display:flex;align-items:center;gap:4px;font:500 14px/20px var(--font);color:var(--text)}
.cx-call{flex:none;min-height:44px;gap:8px}

/* ---------- channel, outcomes, phrases ---------- */
.cx-seg{align-self:flex-start}
.cx-key{display:none;min-width:18px;height:18px;padding:0 4px;border-radius:var(--r-xs);background:var(--raised);color:var(--muted);font:600 11px/18px var(--font);font-variant-numeric:tabular-nums;text-align:center}
.chip[aria-checked="true"] .cx-key{background:var(--accent-tint);color:var(--accent-text)}
@media (hover:hover) and (pointer:fine){.cx-key{display:inline-block}}
.cx-phrases .chip{color:var(--text-2)}
.cx-phrases .chip .icon{color:var(--muted)}

/* ---------- remark ---------- */
.cx-remark{gap:8px}
.cx-sheet .cx-textarea{min-height:88px;max-height:320px;resize:none;overflow-y:auto}
.cx-sheet .cx-details{min-height:64px}
.cx-remark .voice-tools{margin-top:0}

/* ---------- follow-up and stage chips ---------- */
.cx-hint{font:500 11px/14px var(--font);color:var(--muted);white-space:nowrap}
.chip[aria-checked="true"] .cx-hint{color:inherit}
.stage-chip .cx-hint{margin-left:2px}
.cx-stages-all{display:flex;flex-direction:column;gap:12px}
.cx-inline{max-width:240px}
.cx-need{display:flex;align-items:center;gap:8px;margin:0;font:500 13px/18px var(--font);color:var(--warn)}
.cx-need .icon{flex:none}
.cx-checks{display:flex;flex-direction:column;gap:8px}
.cx-link{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 4px;margin-left:-4px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--accent-text);font:600 13px/18px var(--font);cursor:pointer}
.cx-link:hover{color:var(--accent-text-hover)}
.cx-link:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}

/* ---------- inline gates: one block per requirement of the chosen stage, never a second dialog ---------- */
.cx-gate{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--well)}
.cx-gate.is-error{border-color:var(--danger);background:var(--danger-tint)}
.cx-gate.is-error .cx-label{color:var(--danger)}
.cx-gate .ui-error{margin:0}
.cx-gate .btn{align-self:flex-start}
.cx-field{display:flex;flex-direction:column;gap:6px}
.cx-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cx-owner{padding-left:6px}
.cx-owner .avatar{flex:none}

/* ---------- footer: summary of exactly what Save sends, the reason it cannot yet, Cancel and Save ---------- */
.cx-sheet .cx-summary{color:var(--text-2)}
.cx-actions{flex:1 1 100%;display:flex;align-items:center;justify-content:flex-end;gap:8px 12px;flex-wrap:wrap;min-width:0}
.cx-reason{flex:1 1 auto;min-width:0;text-align:right;font:500 13px/18px var(--font);color:var(--muted)}
.cx-reason:empty{display:none}
/* what is missing is a button: it scrolls to and focuses the first field that resolves it */
.cx-reason-go{display:inline;min-height:0;padding:0;border:0;background:none;color:var(--accent-text);font:inherit;text-align:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.cx-reason-go:hover{color:var(--accent-text-hover)}
.cx-reason-go:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;border-radius:var(--r-xs)}
.cx-actions .btn{flex:none}

/* ---------- phone: a bottom sheet with 44px chips; the footer rides above the keyboard (UI.sheet --kb-offset) ---------- */
@media (max-width:767px){
 .cx{gap:18px}
 .cx .chip,.cx .seg-btn,.cx-link{min-height:44px}
 .cx-ctx{flex-direction:column;gap:12px;padding-bottom:14px}
 .cx-call{align-self:stretch;justify-content:center}
 .cx-phrases{flex-wrap:nowrap;overflow-x:auto;margin-inline:-16px;padding-inline:16px;scrollbar-width:none;overscroll-behavior-x:contain}
 .cx-phrases::-webkit-scrollbar{display:none}
 .cx-phrases .chip{flex:none}
 .cx-inline{max-width:none}
 .cx-reason{flex-basis:100%;text-align:left}
 .cx-actions .btn{flex:1 1 0}
}
@media (pointer:coarse){.cx-link{min-height:44px}.cx-reason-go{display:inline-flex;align-items:center;min-height:44px}}

/* ---------- pipeline: the pending drop waits for the composer (static; Cancel puts the card back) ---------- */
.card.pending-drop{opacity:.6;outline:2px dashed var(--accent-border);outline-offset:-2px}

/* ---------- call return on fine pointers: one accent ring on the row's Log call button ---------- */
.cx-pulse{position:relative}
.cx-pulse::after{content:"";position:absolute;inset:-4px;border-radius:inherit;border:2px solid var(--accent);pointer-events:none;animation:cx-ring 900ms var(--ease-out-soft) both}
@keyframes cx-ring{from{opacity:1;transform:scale(.92)}to{opacity:0;transform:scale(1.12)}}


@media (prefers-reduced-motion:reduce){.cx-pulse::after{animation:none;opacity:0}}
@media (forced-colors:active){.cx-gate.is-error{border-color:CanvasText}.card.pending-drop{outline-color:CanvasText}}
