:host {
  --background-color: var(--pine-color-base-white);
  --background-color-disabled: var(--pine-color-neutral-grey-200);
  --background-color-hover: var(--pine-color-neutral-grey-100);
  --border: var(--pine-border-interactive);
  --border-color-disabled: var(--pine-color-neutral-charcoal-100);
  --border-color-hover: var(--pine-border-interactive-hover-color);
  --border-color-icon: var(--pine-color-base-white);
  --border-radius: var(--pine-border-radius-xs);
  --color-checked: var(--pine-color-neutral-charcoal-500);
  --color-disabled: var(--pine-color-neutral-grey-300);
  --color-focus: var(--pine-color-primary-200);
  --color-invalid-focus: var(--pine-color-red-200);
  --color-invalid: var(--pine-color-red-300);
  --message-color-disabled: var(--pine-color-neutral-grey-500);
  --message-color: var(--pine-color-neutral-charcoal-200);
  --input-size: 16px;
  align-items: center;
  display: flex;
  flex-flow: row wrap;
}

:host(.is-invalid) input {
  border-color: var(--color-invalid);
}
:host(.is-invalid) input:checked {
  background: var(--color-invalid);
}
:host(.is-invalid) input:focus-visible {
  box-shadow: 0 0 0 4px var(--color-invalid-focus);
  outline: none;
}
:host(.is-invalid) label,
:host(.is-invalid) .pds-checkbox__message--error {
  color: var(--color-invalid);
}

:host(.is-indeterminate) input:checked::after {
  border-bottom: 0;
  transform: rotate(87deg) translate3d(-114%, 25%, 0);
}

input {
  appearance: none;
  background-color: var(--background-color);
  border: var(--border);
  border-radius: var(--border-radius);
  height: var(--input-size);
  margin: 0;
  position: relative;
  width: var(--input-size);
}
input:hover {
  background: var(--background-color-hover);
  border-color: var(--border-color-hover);
}
input:checked {
  background: var(--color-checked);
  border-color: var(--color-checked);
}
input:checked::after {
  border: 1px solid var(--border-color-icon);
  border-left: 0;
  border-top: 0;
  content: "";
  display: block;
  height: 7px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: rotate(43deg) translate3d(-110%, -30%, 0);
  width: 4px;
}
input:disabled {
  background: var(--background-color-disabled);
  border-color: var(--color-disabled);
  cursor: not-allowed;
}
input:disabled:checked {
  background: var(--color-disabled);
  border-color: var(--color-disabled);
}
input:disabled:checked::after {
  border-color: var(--border-color-disabled);
}
input:disabled + label {
  color: var(--border-color-hover);
  cursor: not-allowed;
}
input:disabled ~ .pds-checkbox__message {
  color: var(--message-color-disabled);
}
input:focus-visible {
  box-shadow: 0 0 0 4px var(--color-focus);
  outline: none;
}

label {
  margin-inline-start: 10px;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: polygon(0 0, 0 0, 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.pds-checkbox__message {
  color: var(--message-color);
  font-size: 14px;
  margin-block-start: 6px;
  margin-inline-start: 26px;
  width: 100%;
}