/* Shared checkbox shape. Native inputs retain their labels, keyboard and form behaviour. */
@layer tawsill-rounded-checkboxes {
  :root {
    --tawsill-checkbox-background: #ffffff;
    --tawsill-checkbox-border: #8b9bb2;
    --tawsill-checkbox-accent: #2867e8;
  }
  html[data-tawsill-theme="dark"], html.theme-dark, html.dark, [data-theme="dark"] {
    --tawsill-checkbox-background: #152132;
    --tawsill-checkbox-border: #8b9bb2;
  }
  input[type="checkbox"]:not([role="switch"]):not([class*="switch"]):not([class*="toggle"]):not(:where(.switch input, .toggle input, .cx-switch input, .fs-switch input, .custom-switch input, .toggle-switch input)) {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1.5px solid var(--tawsill-checkbox-border) !important;
    border-radius: 4px !important;
    background-color: var(--tawsill-checkbox-background) !important;
    background-image: none !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    cursor: pointer;
  }
  input[type="checkbox"]:not([role="switch"]):not([class*="switch"]):not([class*="toggle"]):not(:where(.switch input, .toggle input, .cx-switch input, .fs-switch input, .custom-switch input, .toggle-switch input)):checked {
    background-color: var(--tawsill-checkbox-accent) !important;
    border-color: var(--tawsill-checkbox-accent) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 9 3.1 3.2L14 5.5' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  }
  input[type="checkbox"]:not([role="switch"]):not([class*="switch"]):not([class*="toggle"]):not(:where(.switch input, .toggle input, .cx-switch input, .fs-switch input, .custom-switch input, .toggle-switch input)):indeterminate {
    background-color: var(--tawsill-checkbox-accent) !important;
    border-color: var(--tawsill-checkbox-accent) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9h9' stroke='white' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  }
  input[type="checkbox"]:not([role="switch"]):focus-visible {
    outline: 3px solid #78a5ff !important;
    outline-offset: 3px !important;
  }
  input[type="checkbox"]:not([role="switch"]):disabled {
    opacity: .5;
    cursor: not-allowed;
  }
  input[type="checkbox"][aria-invalid="true"] {
    --tawsill-checkbox-border: #d9465f;
  }
  [role="checkbox"], .custom-checkbox .custom-control-label::before {
    border-radius: 4px !important;
  }
  @media (forced-colors: active) {
    input[type="checkbox"]:not([role="switch"]):not([class*="switch"]):not([class*="toggle"]):not(:where(.switch input, .toggle input, .cx-switch input, .fs-switch input, .custom-switch input, .toggle-switch input)):is(:checked, :indeterminate, :not(:checked)) {
      -webkit-appearance: auto !important;
      appearance: auto !important;
      background-image: none !important;
      forced-color-adjust: auto;
    }
  }
}
