/*
    Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
    Add an arbitrary list of selectors into the arguments, and the styling in the block.
    I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

    There are two mixins: 
    - focus-visible: a generic focus-visible, giving you "slots" to decide what to render for :focus, :focus reset, and :focus-visible
    - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

    Use focus-visible:
    The key thing here is checking which slot is being rendered.
    For example, you can reset box-shadow here, or anything else.

    @include focus-visible using ($slot) {
        @if $slot == focus {
            outline: 2px solid transparent;
            box-shadow: 0 0 0 4px blue;
        }
        @if $slot == focusReset {
            box-shadow: none;
        }
        @if $slot == focusVisible {
            box-shadow: 0 0 0 4px blue;
        }
    }

    Use focus-visible-outline:
    @include focus-visible-outline("button", "a[href]") {
        outline: 2px solid blue;
    }

    Resulting CSS (compressed):

    button:focus,
    a[href]:focus {
        outline: 2px solid blue;
    }

    button:focus:not(:focus-visible),
    a[href]:focus:not(:focus-visible) {
        outline: none;
    }
    button:focus-visible,
    a[href]:focus-visible {
        outline: 2px solid blue;
    }
*/
/* stylelint-disable max-nesting-depth */
/**
    @prop --uic-checkbox-border-color: the default border color 
    @prop --uic-checkbox-border-color-checked: the border color in checked state
    @prop --uic-checkbox-border-color-focus: the border color in focus state
    @prop --uic-checkbox-border-color-hover: the border color in hover state
    @prop --uic-checkbox-border-color-active: the border color in active state
    @prop --uic-checkbox-border-color-disabled: the border color in disabled state

    @prop --uic-checkbox-background-color: the default background
    @prop --uic-checkbox-background-color-focus: the background in focus state
    @prop --uic-checkbox-background-color-hover: the background in hover state
    @prop --uic-checkbox-background-color-active: the background in active state
    @prop --uic-checkbox-background-color-disabled: the background in disabled state

    @prop --uic-checkbox-mark-color: the default checkmark color
    @prop --uic-checkbox-mark-color-focus: the checkmark color in focus state
    @prop --uic-checkbox-mark-color-hover: the checkmark color in hover state
    @prop --uic-checkbox-mark-color-active: the checkmark color in active state
    @prop --uic-checkbox-mark-color-disabled: the checkmark color in disabled state

    @prop --uic-checkbox-text-color: the default text color
    @prop --uic-checkbox-text-color-focus: the text color in focus state
    @prop --uic-checkbox-text-color-hover: the text color in hover state
    @prop --uic-checkbox-text-color-active: the text color in active state
    @prop --uic-checkbox-text-color-disabled: the text color in disabled state

    @prop --uic-checkbox-box-width: the width of the box containing the checkmark
    @prop --uic-checkbox-box-height: the height of the box containing the checkmark

    @prop --uic-checkbox-mark-width: the width of the checkmark
    @prop --uic-checkbox-mark-height: the height of the checkmark
*/
uic-checkbox {
  display: inline-block;
  box-sizing: border-box;
}
uic-checkbox[checked] .uic-checkbox__mark::before, uic-checkbox[mixed] .uic-checkbox__mark::before {
  border-color: var(--uic-checkbox-border-color-checked);
}
uic-checkbox[checked] .uic-checkbox__mark-check {
  opacity: 1;
}
uic-checkbox[disabled] {
  pointer-events: none;
}
uic-checkbox[mixed] .uic-checkbox__mark-check {
  display: none;
}
uic-checkbox[mixed] .uic-checkbox__mark-mixed {
  display: block;
}
uic-checkbox[multiline] .uic-checkbox__label {
  white-space: normal;
}

.uic-checkbox__wrapper {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  width: 100%;
  padding: 10px 8px;
  box-sizing: border-box;
}
.uic-checkbox__input {
  position: absolute;
  padding: 0;
  margin: 0;
  opacity: 0.0001;
}
.uic-checkbox__input:disabled ~ .uic-checkbox__label {
  color: var(--uic-checkbox-text-color-disabled);
}
.uic-checkbox__input:disabled ~ .uic-checkbox__mark {
  color: var(--uic-checkbox-mark-color-disabled);
}
.uic-checkbox__input:disabled ~ .uic-checkbox__mark::before {
  background-color: var(--uic-checkbox-background-color-disabled);
  border-color: var(--uic-checkbox-border-color-disabled);
}
.uic-checkbox__input:focus ~ .uic-checkbox__label {
  color: var(--uic-checkbox-text-color-focus);
}
.uic-checkbox__input:focus ~ .uic-checkbox__mark {
  color: var(--uic-checkbox-mark-color-focus);
}
.uic-checkbox__input:focus ~ .uic-checkbox__mark::before {
  background-color: var(--uic-checkbox-background-color-focus);
  outline: 2px solid var(--uic-checkbox-border-color-focus);
  outline-offset: -2px;
}
.uic-checkbox__input:hover ~ .uic-checkbox__label {
  color: var(--uic-checkbox-text-color-hover);
}
.uic-checkbox__input:hover ~ .uic-checkbox__mark {
  color: var(--uic-checkbox-mark-color-hover);
}
.uic-checkbox__input:hover ~ .uic-checkbox__mark::before {
  background-color: var(--uic-checkbox-background-color-hover);
  border-color: var(--uic-checkbox-border-color-hover);
}
.uic-checkbox__input:active ~ .uic-checkbox__label {
  color: var(--uic-checkbox-text-color-active);
}
.uic-checkbox__input:active ~ .uic-checkbox__mark {
  color: var(--uic-checkbox-mark-color-active);
}
.uic-checkbox__input:active ~ .uic-checkbox__mark::before {
  background-color: var(--uic-checkbox-background-color-active);
  border-color: var(--uic-checkbox-border-color-active);
}
.uic-checkbox__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* white background required for alpha-based color scheme */
  background-color: var(--uic-color-white);
  color: var(--uic-checkbox-mark-color);
  width: var(--uic-checkbox-box-width);
  min-width: var(--uic-checkbox-box-width);
  height: var(--uic-checkbox-box-height);
}
.uic-checkbox__mark::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: "";
  background-color: var(--uic-checkbox-background-color);
  border: 1px solid var(--uic-checkbox-border-color);
}
.uic-checkbox__mark-check, .uic-checkbox__mark-mixed {
  display: block;
  position: relative;
  width: var(--uic-checkbox-mark-width);
  height: var(--uic-checkbox-mark-height);
}
.uic-checkbox__mark-check {
  opacity: 0;
}
.uic-checkbox__mark-mixed {
  display: none;
}
.uic-checkbox__label {
  font-size: var(--uic-font-size-normal);
  line-height: var(--uic-line-height-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uic-checkbox__label:not(:empty) {
  margin-left: 12px;
}

/* stylelint-enable max-nesting-depth */