/* The Contacts list: the selection bar's Actions menu and the statistics column. */

/* ── Selection bar ───────────────────────────────────────────── */
.cp-count.sel { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; }
.lt-actions { position: relative; display: inline-block; }
.lt-actions-btn { display: inline-flex; align-items: center; gap: 6px; }
.lt-actions-btn[aria-expanded="true"] { background: var(--surface-2, #eef2f6); }
.lt-caret { font-size: 10px; line-height: 1; }

.lt-menu {
  position: absolute; z-index: 60; inset-block-start: calc(100% + 4px); inset-inline-start: 0;
  min-width: 220px; max-width: calc(100vw - 24px); max-height: min(85vh, 620px); overflow-y: auto;
  padding: 6px; border: 1px solid var(--border, #d6dbe1); border-radius: 8px;
  background: var(--surface, #fff); box-shadow: 0 10px 28px rgba(15, 30, 50, .18);
  font-weight: 400;
}
.lt-mi {
  display: block; width: 100%; padding: 6px 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text, #1f2933); font: inherit; text-align: start; cursor: pointer;
  min-height: 32px; white-space: nowrap;
}
.lt-mi:hover, .lt-mi:focus-visible { background: var(--surface-2, #eef2f6); outline: none; }
.lt-mi:focus-visible { box-shadow: inset 0 0 0 2px var(--focus, #1a73e8); }
.lt-mi.lt-del { color: var(--danger, #b3261e); }
.lt-mi.lt-del:hover, .lt-mi.lt-del:focus-visible { background: rgba(179, 38, 30, .1); }
.lt-sep { height: 1px; margin: 6px 4px; background: var(--border, #e3e7ec); }

.lt-clear {
  border: 0; background: transparent; padding: 4px 2px; color: var(--link, #0b57d0);
  font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer;
}
.lt-clear:focus-visible { outline: 2px solid var(--focus, #1a73e8); outline-offset: 2px; border-radius: 3px; }

@media (max-width: 600px) {
  .cp-count.sel { gap: 6px; }
  /* A phone: the menu spans the bar instead of hanging off one edge. */
  .lt-actions { position: static; }
  .lt-menu { position: fixed; inset-inline: 12px; inset-block-start: auto; inset-block-end: 12px;
             min-width: 0; max-width: none; max-height: 60vh; }
  .lt-mi { min-height: 44px; }
}

/* ── Statistics column ───────────────────────────────────────── */
.cstat-w { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cstat {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2, #eef2f6); border: 1px solid var(--border, #dde3ea);
  font-size: 12px; line-height: 18px; white-space: nowrap; color: var(--text, #1f2933);
}
.cstat b { font-weight: 700; }
.cstat-i { font-size: 12px; }
.cstat-l { color: var(--text-2, #52606d); }
@media (max-width: 900px) { .cstat-l { display: none; } }

/* A statistic at zero stays on the row, muted. */
.cstat.zero { opacity: .42; }

/* One line per row: icon and count; the name is the tooltip. A non-zero
   statistic also spells out what it counts. */
.cstat-w { flex-wrap: nowrap; gap: 4px; }
.cstat { white-space: nowrap; }
.cstat .cstat-l { display: none; }
.cstat:not(.zero) .cstat-l { display: inline; }

/* The Activities clock and its popup (list_activity widget). */
.lact-btn { background: none; border: 0; padding: 4px; border-radius: 6px; cursor: pointer; display: inline-flex; }
.lact-btn:hover:not([disabled]) { background: var(--bg-hover, #f0f1f3); }
.lact-btn:focus-visible { outline: 2px solid var(--accent, #1e63d6); outline-offset: 1px; }
.lact-btn[disabled] { cursor: default; }
.lact-pop {
  position: fixed; z-index: 60; width: 300px; max-height: 70vh; overflow: auto;
  background: var(--bg-card, #fff); color: var(--text, #191c20);
  border: 1px solid var(--border, rgba(120,130,145,.35)); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(16, 24, 40, .18); padding: 10px; font-size: 13px;
}
.lact-empty { color: var(--text-2, #52606d); padding: 6px 4px 10px; }
.lact-list { list-style: none; margin: 0 0 8px; padding: 0; }
.lact-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border-soft, rgba(120,130,145,.2)); }
.lact-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lact-sum b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lact-sum small { color: var(--text-2, #52606d); }
.lact-sum small.late { color: #c0392b; }
.lact-done { border: 1px solid var(--border, rgba(120,130,145,.4)); background: transparent; color: #28a745; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.lact-done:hover:not([disabled]) { background: rgba(40, 167, 69, .12); }
.lact-add { width: 100%; text-align: left; background: none; border: 0; color: var(--accent, #1e63d6); font-weight: 600; padding: 8px 4px; cursor: pointer; border-radius: 6px; }
.lact-add:hover { background: var(--bg-hover, #f0f1f3); }
.lact-form { display: flex; flex-direction: column; gap: 8px; }
.lact-form input, .lact-form select { width: 100%; padding: 6px 8px; border: 1px solid var(--border, rgba(120,130,145,.4)); border-radius: 6px; background: var(--bg-input, #fff); color: inherit; }
.lact-row { display: flex; gap: 8px; }
.lact-err { color: #c0392b; display: block; padding-top: 6px; }
