/* ui.css — layout shared by the demo pages, on top of Pico CSS.
 *
 * Pico gives inputs and buttons a bottom margin and makes a <nav> a space-between flex row; inside a row of controls that
 * misaligns them (a button taller than the input next to it, tab buttons spread over the whole width, a <nav> row with no
 * gap).  These rows reset it: controls in a row share one height, one gap, and no stray margins. */

/* a text field with its action: the field takes the free width, the button its natural one, both the same height */
.input-group {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  margin-bottom: 1rem;
}
.input-group > input { flex: 1 1 auto; min-width: 0; margin: 0; }
.input-group > button { flex: 0 0 auto; margin: 0; width: auto; white-space: nowrap; }

/* a row of related actions */
.button-group, nav.button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: 0;
}
.button-group > button { margin: 0; width: auto; min-width: 4.5rem; }

/* a list of items that each carry an action (todo): text left, small action right */
li:has(> button) { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
li > button { margin: 0; width: auto; padding: .15rem .6rem; line-height: 1.4; flex: 0 0 auto; }
li > span { flex: 1 1 auto; cursor: pointer; }

.count-display { font-size: 3rem; text-align: center; font-weight: bold; margin-bottom: 1rem; }
.done { text-decoration: line-through; opacity: .6; }
.hint { font-size: .85rem; opacity: .7; }
