/* The keys (js/keys.js): the row the cursor is on, the g waiting for its letter, the ? in the header and the list of
   keys. Its own file beside app.css, whose colours it uses: Today's selected line, the app's dialog and its menus. */

/* The cursor on a list (j and k): the accent's tint and a bar at its start, as Today's selected line has. */
.row[data-cursor]:focus, .qrow[data-cursor]:focus { outline: none; background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.qcard[data-cursor]:focus { outline: none; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
/* An area's heading on All (17 Nov), which j and k stop on too. */
.area-link[data-cursor]:focus { outline: none; background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }

/* The ? that lists the keys, beside the gear: for a keyboard, so not on a touch screen. */
@media (pointer: coarse) {
  .keys-btn { display: none; }
}

/* A key as the list draws it, and as the waiting g's card does. */
.keys-pending kbd {
  display: inline-block;
  min-width: 20px;
  padding: 0 5px;
  border: 1px solid var(--sep);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--field);
  color: var(--text);
  font: 11.5px/1.5 var(--mono);
  text-align: center;
}
.keys-all kbd + kbd { margin-left: 3px; }
.keys-or { margin: 0 4px; color: var(--text-3); font-size: 11.5px; }

/* g, waiting for its letter (1.5 s): a small card at the top right, under the header, with the letters it takes. */
.keys-pending {
  position: fixed;
  z-index: 45;
  top: calc(var(--top-h, 56px) + 6px);
  right: max(var(--gutter), calc((100vw - var(--col)) / 2));
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: min(420px, calc(100vw - 2 * var(--gutter)));
  padding: 7px 11px 7px 8px;
  border: 1px solid var(--sep);
  border-radius: 10px;
  background: var(--menu);
  box-shadow: var(--shadow);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 21px;
  pointer-events: none;
  animation: keys-in 0.12s ease-out;
}
.keys-pending > kbd { color: var(--accent); font-weight: 650; }
.keys-pending-list { display: flex; flex-wrap: wrap; gap: 0 11px; }
.keys-pending-list span { white-space: nowrap; }
@keyframes keys-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .keys-pending { animation: none; }
}

/* The list: every group in up to three columns, as many as the window has room for, the page's own group first and
   lit. In a small window it scrolls inside the dialog under its title, which stays. */
.keys-dialog.keys-all { width: min(1180px, 100%); padding: 0 18px 14px; }
.keys-head { position: sticky; top: 0; z-index: 1; align-items: flex-start; margin: 0 -18px 4px; padding: 16px 24px 10px; background: var(--card); }
.keys-head h2 { margin: 0; font-size: 17px; }
.keys-sub { margin-top: 1px; color: var(--text-2); font-size: 12.5px; font-weight: 400; }
.keys-groups { columns: 3 330px; column-gap: 14px; }
.keys-group { break-inside: avoid; margin: 0 0 8px; padding: 8px 10px 10px; border-radius: 10px; }
.keys-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.keys-group.here { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.keys-group.here h3 { color: var(--accent); }
.keys-here { padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-fill); font-size: 11px; font-weight: 650; line-height: 17px; }
.keys-note { margin: -4px 0 7px; color: var(--text-2); font-size: 12.5px; }
.keys-group .keys-list { grid-template-columns: minmax(84px, auto) 1fr; gap: 5px 12px; margin: 0; font-size: 13.5px; }
.keys-group .keys-list dd { overflow-wrap: anywhere; }
.keys-foot { margin: 4px 6px 0; }

/* Lines selected together (D41, js/select.js): Gmail's selected rows, a blue tint, over which the cursor's bar still
   shows; and the bar of what they can do, first under the header while any is selected. */
.page .row.todo.picked, .page .row.todo.picked:focus { background: color-mix(in srgb, var(--blue) 14%, var(--card)); }
.select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
  margin: 0 0 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 14%, var(--card));
  font-size: 13px;
}
.select-x { width: 28px; height: 28px; }
.select-count { margin-right: 4px; font-weight: 650; white-space: nowrap; }
/* Its buttons are Gmail's toolbar's: flat on the bar until the pointer is over one, each with its key. */
.select-bar .btn { height: 28px; padding: 0 7px; gap: 5px; border-color: transparent; background: none; font-size: 13px; }
.select-bar .btn:hover { border-color: transparent; background: var(--card); }
.select-bar .btn kbd.hint { padding: 1px 4px; font-size: 10.5px; }
