/* Current Checkbox atom: v1.2.2608C combined checked/disabled state.
   Official SVG already contains 30% opacity; do not dim the root or label.
   Explicit marker keeps historical unmarked calls on their locked resource behavior. */
.ds-checkbox[data-checkbox-current].ds-checkbox--disabled.ds-checkbox--checked .ds-checkbox__box,
.ds-checkbox[data-checkbox-current].ds-checkbox--disabled.ds-checkbox--checked:hover .ds-checkbox__box {
  background-image: url('./icons/icon-checkbox-disabled-checked-18.svg');
}
.ds-checkbox[data-checkbox-current].ds-checkbox--sm.ds-checkbox--disabled.ds-checkbox--checked .ds-checkbox__box,
.ds-checkbox[data-checkbox-current].ds-checkbox--sm.ds-checkbox--disabled.ds-checkbox--checked:hover .ds-checkbox__box {
  background-image: url('./icons/icon-checkbox-disabled-checked-14.svg');
}
.ds-checkbox[data-checkbox-current].ds-checkbox--disabled.ds-checkbox--checked .ds-checkbox__label {
  color: var(--color-gray-1);
}

/* Source multiline examples anchor the icon against the FIRST text line.
   lg: (22 - 18) / 2 = 2px; sm: (20 - 14) / 2 = 3px. */
.ds-checkbox[data-checkbox-current] {
  align-items: flex-start;
}
.ds-checkbox[data-checkbox-current] .ds-checkbox__box {
  margin-top: var(--spacing-2);
}
.ds-checkbox[data-checkbox-current].ds-checkbox--sm .ds-checkbox__box {
  margin-top: var(--spacing-3);
}

/* Opt-in native control. Passive host markers retain their existing contract.
   Native input owns checked/disabled, including a disabled fieldset ancestor. */
.ds-checkbox[data-checkbox-current][data-checkbox-control] {
  position: relative;
  /* Both current Default masters hug content; flex/grid hosts must not
     stretch the label and activate unrelated empty row space. */
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
}
.ds-checkbox[data-checkbox-control] > .ds-checkbox__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-default-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control]:is(:hover, .ds-checkbox--hover):not(:has(.ds-checkbox__label a:hover)) > .ds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-hover-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:checked:not(:disabled) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-checked-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:indeterminate:not(:disabled) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-indeterminate-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:disabled:not(:checked) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-disabled-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:disabled:checked + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-disabled-checked-18.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm > .ds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-default-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm:is(:hover, .ds-checkbox--hover):not(:has(.ds-checkbox__label a:hover)) > .ds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-hover-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm > .ds-checkbox__input:checked:not(:disabled) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-checked-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm > .ds-checkbox__input:indeterminate:not(:disabled) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-indeterminate-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm > .ds-checkbox__input:disabled:not(:checked) + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-disabled-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm > .ds-checkbox__input:disabled:checked + .ds-checkbox__box {
  background-image: url("./icons/icon-checkbox-disabled-checked-14.svg");
}
.ds-checkbox[data-checkbox-current][data-checkbox-control]:has(> .ds-checkbox__input:disabled) { cursor: not-allowed; }
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:disabled:not(:checked) ~ .ds-checkbox__label {
  color: var(--color-text-disabled);
}
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:disabled:checked ~ .ds-checkbox__label {
  color: var(--color-gray-1);
}
/* Preserve a visible browser focus indicator pending a canonical FS focus spec. */
.ds-checkbox[data-checkbox-current][data-checkbox-control] > .ds-checkbox__input:focus-visible + .ds-checkbox__box {
  outline: auto;
  outline-offset: var(--spacing-2);
}

/* A registered caption-omitted host still keeps the source first-line wrapper:
   lg18 icon in22 line / sm14 icon in20 line, with atom-owned top2/3 offset. */
.ds-checkbox[data-checkbox-current][data-checkbox-control]:not(:has(> .ds-checkbox__label)) {
  min-height: var(--line-height-h7);
}
.ds-checkbox[data-checkbox-current][data-checkbox-control].ds-checkbox--sm:not(:has(> .ds-checkbox__label)) {
  min-height: var(--line-height-h8);
}

/* Controlled source-backed consent caption; plain caption stays canonical. */
.ds-checkbox[data-checkbox-current][data-checkbox-caption="consent"] > .ds-checkbox__label { font-size: var(--font-size-sm); color: var(--color-gray-3); }
.ds-checkbox[data-checkbox-current][data-checkbox-caption="consent"] > .ds-checkbox__label a { color: var(--color-blue); text-decoration: none; }
.ds-checkbox[data-checkbox-current][data-checkbox-caption="consent"] > .ds-checkbox__input:disabled ~ .ds-checkbox__label { color: var(--color-text-disabled); }
.ds-checkbox[data-checkbox-current][data-checkbox-caption="consent"] > .ds-checkbox__input:disabled ~ .ds-checkbox__label a { color: inherit; }
