button, a.button {
  text-align: center;
  align-content: center;
  cursor: pointer;
  text-decoration: none;
  padding: 5px;
  border: var(--border-width) solid var(--theme-bg-muted);
  border-radius: var(--border-radius);
  background-color: var(--theme-bg-muted);
  color: var(--theme-fg-color);

  &.delete {
    border-color: var(--theme-warn-color);
    background-color: var(--theme-warn-color);
  }

  &[disabled] {
    cursor: not-allowed;
    background-color: var(--theme-bg-color);
  }
}

/* Icon action buttons: a flat, boxless clickable icon (e.g. the admin edit/
   delete controls on an event row). One shared role on both <a> and <button> so
   every such control looks identical — the `a.`/`button.` qualifiers out-specify
   the boxed button base above without depending on stylesheet order. Add the
   `danger` modifier for a destructive (delete) hover tone. */
a.icon-button,
button.icon-button {
  cursor: pointer;
  text-decoration: none;
  /* A tight centred box around the glyph, so an <a> and a <button> (with their
     differing line-box metrics) place the icon identically and align in a row. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  /* No box, but keep a small symmetric pad so the icon stays a comfortable tap
     target on touch (matching the old delete button's hit area). */
  padding: var(--gap-xsmall);
  border: 0;
  background: none;
  color: var(--theme-fg-muted);
}

a.icon-button:hover,
button.icon-button:hover {
  color: var(--theme-fg-color);
}

.icon-button.danger:hover {
  color: var(--theme-warn-color);
}

input[type=submit] {
  cursor: pointer;
  text-decoration: none;
  padding: 5px;
  border: var(--border-width) solid var(--theme-accent-color);
  border-radius: var(--border-radius);
  background-color: var(--theme-accent-color);
  color: var(--theme-bg-color);

  &[disabled] {
    color: var(--theme-fg-color);
    cursor: not-allowed;
    background-color: var(--theme-bg-color);
  }
}

input[type=checkbox],
input[type=radio] {
  accent-color: var(--theme-accent-color);
}

input[type=text] {
  background-color: inherit;
  color: inherit;
  border: none;
  font-size: inherit;
  /* The field now sits alone on its row (chips moved to their own row below), so
     it no longer needs to reserve half the combobox width against inline chips.
     min-width: 0 lets it shrink within flex instead of forcing horizontal
     overflow on narrow (mobile) viewports. */
  min-width: 0;
  padding: 0;
  text-overflow: ellipsis;
  max-width: 100%;
  flex-grow: 1;
  line-height: var(--filter-input-line-height);

  &:focus,
  &:focus-visible,
  &:focus-within {
    box-shadow: none;
    outline: none;
  }
}
