/* Pictures any theme can bring (theme.json "images"). Form controls: each rule applies only when the
   active theme has the pictures, read from <html data-images="...">; size: theme.json "check_size".
   Tab icons: a theme with html_class "nav-icons" shows its picture "tab-<page>" (or "tab") before each
   header tab (the nav component gives every link its --nav-icon). */
[data-images~="check-off"][data-images~="check-on"] input[type=checkbox],
[data-images~="radio-off"][data-images~="radio-on"] input[type=radio] {
  appearance: none;
  width: var(--check-size, 1.2em);
  height: var(--check-size, 1.2em);
  margin: 0 .35em 0 0;
  vertical-align: middle;
  border: 0;
  background: center / contain no-repeat;
  cursor: pointer;
  flex: none;
}
[data-images~="check-off"][data-images~="check-on"] input[type=checkbox] { background-image: var(--img-check-off); }
[data-images~="check-off"][data-images~="check-on"] input[type=checkbox]:checked { background-image: var(--img-check-on); }
[data-images~="radio-off"][data-images~="radio-on"] input[type=radio] { background-image: var(--img-radio-off); }
[data-images~="radio-off"][data-images~="radio-on"] input[type=radio]:checked { background-image: var(--img-radio-on); }
[data-images~="check-on"] input[type=checkbox]:focus-visible,
[data-images~="radio-on"] input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-images~="check-on"] input[type=checkbox]:disabled,
[data-images~="radio-on"] input[type=radio]:disabled { opacity: .5; cursor: default; }

.nav-icons .header .nav-item::before {
  content: "";
  display: inline-block;
  width: var(--nav-icon-size, 1.25em);
  height: var(--nav-icon-size, 1.25em);
  margin-right: .35em;
  vertical-align: -.25em;
  background: var(--nav-icon, none) center / contain no-repeat;
}
