/* V-Fleet checkbox: the one tick-box style for every V-Fleet page (staff workspace, workshop, sign-in,
   customer, supplier, review, driver and inspection pages). The team hub keeps its own kit, where
   checkboxes match its radios. Hand-written for both themes and skipped by
   scripts/build-light-theme.mjs.

   Page stylesheets must not size or colour checkboxes. Generic `input` rules (padding, min-height,
   width:100%, radius, field background) used to leak onto them and turn the box into a padded
   pill, so every property this control owns is !important. Pages may still set margin and
   vertical-align for layout. Radios keep their own styles. */
:root {
  --et-check-size: 16px;
  --et-check-bg: rgba(6, 16, 24, .55);
  --et-check-line: rgba(170, 205, 232, .5);
  --et-check-hover: #c4a7f2;
  --et-check-on: #c4a7f2;
  --et-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.3l2.9 2.9 5.9-6.4' fill='none' stroke='%2306131d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --et-check-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%2306131d' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="light"] {
  --et-check-bg: #ffffff;
  --et-check-line: #a3b8af;
  --et-check-hover: #5526a9;
  --et-check-on: #5526a9;
  --et-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.3l2.9 2.9 5.9-6.4' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --et-check-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Bigger target for fingers on phones and tablets. */
@media (pointer: coarse) {
  :root { --et-check-size: 20px; }
}

:root input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  flex: none !important;
  width: var(--et-check-size) !important;
  min-width: var(--et-check-size) !important;
  max-width: var(--et-check-size) !important;
  height: var(--et-check-size) !important;
  min-height: var(--et-check-size) !important;
  max-height: var(--et-check-size) !important;
  padding: 0 !important;
  border: 1.5px solid var(--et-check-line) !important;
  border-radius: 4px !important;
  background: var(--et-check-bg) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: inherit;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
:root input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--et-check-hover) !important;
}
:root input[type="checkbox"]:checked {
  border-color: var(--et-check-on) !important;
  background-color: var(--et-check-on) !important;
  background-image: var(--et-check-mark) !important;
}
:root input[type="checkbox"]:indeterminate {
  border-color: var(--et-check-on) !important;
  background-color: var(--et-check-on) !important;
  background-image: var(--et-check-dash) !important;
}
:root input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--et-check-on) !important;
  outline-offset: 2px !important;
}
:root input[type="checkbox"]:disabled {
  opacity: .45;
  cursor: not-allowed;
}
/* Windows high-contrast mode: hand the box back to the system so the tick stays visible. */
@media (forced-colors: active) {
  :root input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
  }
}
