/* Phase 1 chat-list additions: last-message preview, pin/mute/archive states, row menu. */
.label-bar button{display:inline-flex;align-items:center;gap:4px}
.floating{display:flex;align-items:center;justify-content:center}
.side-head #menu .icon,.side-head .search .icon{color:inherit}
.conversation{position:relative;padding-left:40px}
.conversation-body{flex:1;min-width:0}
.conversation-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.conversation-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-top time{flex:none;font-size:11px;color:var(--muted)}
.conversation-bottom{display:flex;align-items:center;gap:6px;margin-top:3px}
.conversation-bottom .preview{flex:1;min-width:0;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conversation.unread-row .preview{color:#233a36}
.conversation.unread-row .conversation-top strong{font-weight:700}
.row-flag{flex:none;color:#8a9793;display:inline-flex}
.row-flag svg{width:15px;height:15px}
.conversation.pinned{background:#f7faf9}
.conversation.muted .conversation-top strong{color:#5c6d69}
.conversation-menu-trigger{position:absolute;left:6px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:#7c8d89;display:grid;place-items:center;opacity:0;transition:opacity .15s ease,background .15s ease}
.conversation:focus-within .conversation-menu-trigger{opacity:1}@media (hover:hover){.conversation:hover .conversation-menu-trigger{opacity:1}}
.conversation-menu-trigger:hover{background:#e8f0ee}
.archive-toggle{display:flex;align-items:center;gap:8px;width:100%;margin:2px 0 6px;padding:10px 12px;border:0;border-radius:10px;background:#f0f4f3;color:#4a5b57;font-size:12px;cursor:pointer}
.archive-toggle:hover{background:#e6ece9}
.label-picker{border:0;border-radius:var(--radius-surface,16px);width:min(340px,90vw);padding:20px}
.label-picker label{display:flex;align-items:center;gap:10px;padding:8px 4px;cursor:pointer}
.label-picker label span{padding:3px 10px;border-radius:10px;font-size:12px}

/* Touch screens: one tap opens a chat — no hover-reveal (iPhone spends the first tap on it) and no double-tap-zoom wait. */
.conversation{touch-action:manipulation}
/* Touch screens: no ⋮ per row — a long press opens the chat's menu (WhatsApp style). */
@media (hover:none){
  .conversation-menu-trigger{display:none}
  .conversation{padding-left:15px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
}

/* WhatsApp-style chat list on phones: flat rows, separator inset from the avatar, bold names,
   the time in the theme color when there are unread messages, pressed-row feedback. */
@media (max-width:720px){
  #list .conversation{background:transparent;border-bottom:0;position:relative;min-height:74px;padding-top:10px;padding-bottom:10px}
  #list .conversation::after{content:'';position:absolute;bottom:0;left:0;right:78px;height:1px;background:color-mix(in srgb,currentColor 9%,transparent)}
  html[dir="ltr"] #list .conversation::after{left:78px;right:0}
  #list .conversation .circle{width:52px;height:52px}
  #list .conversation-top strong{font-size:16px;font-weight:600}
  #list .conversation-bottom .preview{font-size:14px}
  #list .conversation-top time{font-size:12px}
  #list .conversation.unread-row .conversation-top time{color:var(--theme-primary,#168c7e);font-weight:600}
  #list .conversation .unread{min-width:22px;height:22px;border-radius:11px;font-size:12px;font-weight:700;display:inline-grid;place-items:center;padding:0 6px;background:var(--theme-primary,#168c7e);color:#fff}
  #list .conversation.pinned{background:transparent}
  #list .conversation.pressing,#list .conversation:active{background:color-mix(in srgb,var(--theme-primary,#168c7e) 10%,transparent)}
  #list .conversation.active{background:color-mix(in srgb,var(--theme-primary,#168c7e) 12%,transparent)!important;color:inherit}
  #list .conversation.active span{color:inherit}
}
@media (prefers-reduced-motion:no-preference){#list .conversation{transition:background .15s}}
