/* CheckBox, radio and list selection styling. */
.yess-theme-host .k-checkbox,
.yess-theme-host .k-radio {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    border: var(--yess-control-border-width) solid var(--yess-input-border);
    background: var(--yess-input-background);
    color: var(--yess-selection-foreground);
    accent-color: var(--yess-selection-background);
    cursor: pointer;
    transition:
        border-color var(--yess-control-transition-duration) ease,
        background-color var(--yess-control-transition-duration) ease,
        box-shadow var(--yess-control-transition-duration) ease;
}

.yess-theme-host .k-checkbox,
.yess-theme-host .yess-form-control--checkbox .k-checkbox,
.yess-theme-host input[type="checkbox"]:not(.k-checkbox) {
    /* A checkbox is not a text input, including in editable grids and forms. */
    box-sizing: border-box;
    inline-size: 1.25rem;
    block-size: 1.25rem;
    min-inline-size: 1.25rem;
    max-inline-size: 1.25rem;
    min-block-size: 1.25rem;
    max-block-size: 1.25rem;
    padding: 0;
    aspect-ratio: 1;
    border-radius: 0.25rem;
}

.yess-theme-host .k-radio {
    border-radius: 50%;
}

.yess-theme-host .k-checkbox:hover:not(:disabled):not(.k-disabled),
.yess-theme-host .k-radio:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-input-border-hover);
}

.yess-theme-host .k-checkbox:checked,
.yess-theme-host .k-checkbox.k-checked,
.yess-theme-host .k-radio:checked,
.yess-theme-host .k-radio.k-checked {
    border-color: var(--yess-selection-background);
    background: var(--yess-selection-background);
    color: var(--yess-selection-foreground);
}

.yess-theme-host .k-checkbox:indeterminate,
.yess-theme-host .k-checkbox.k-indeterminate {
    border-color: var(--yess-color-warning);
    background: var(--yess-color-warning);
    color: var(--yess-color-on-warning);
}

.yess-theme-host .k-checkbox:focus-visible,
.yess-theme-host .k-radio:focus-visible,
.yess-theme-host .k-checkbox.k-focus,
.yess-theme-host .k-radio.k-focus {
    outline: var(--yess-control-focus-width) solid var(--yess-selection-ring);
    outline-offset: var(--yess-control-focus-offset);
    box-shadow: none;
}

.yess-theme-host .k-checkbox:disabled,
.yess-theme-host .k-radio:disabled,
.yess-theme-host .k-checkbox.k-disabled,
.yess-theme-host .k-radio.k-disabled {
    border-color: var(--yess-color-border);
    background: var(--yess-input-background-disabled);
    color: var(--yess-input-foreground-disabled);
    cursor: not-allowed;
    opacity: var(--yess-control-disabled-opacity);
}

.yess-theme-host .k-checkbox.k-invalid,
.yess-theme-host .k-radio.k-invalid,
.yess-theme-host .k-checkbox[aria-invalid="true"],
.yess-theme-host .k-radio[aria-invalid="true"] {
    border-color: var(--yess-color-danger);
}

.yess-theme-host .yess-inline-checkbox,
.yess-theme-host .yess-checkbox-line,
.yess-theme-host .yess-role-option,
.yess-theme-host .k-checkbox-label,
.yess-theme-host .k-radio-label {
    min-height: var(--yess-target-size-minimum);
}

.yess-theme-host .k-list,
.yess-theme-host .k-list-ul,
.yess-theme-host .k-list-content,
.yess-theme-host .k-list-container {
    background: var(--yess-popup-background);
    color: var(--yess-popup-foreground);
}

.yess-theme-host .k-list-item,
.yess-theme-host .k-list-optionlabel {
    min-height: var(--yess-target-size-minimum);
    padding: var(--yess-space-2) var(--yess-space-3);
    border-radius: var(--yess-control-radius);
    color: var(--yess-color-text);
}

.yess-theme-host .k-list-item:hover,
.yess-theme-host .k-list-item.k-hover,
.yess-theme-host .k-list-optionlabel:hover {
    background: var(--yess-popup-item-hover);
    color: var(--yess-color-text);
}

.yess-theme-host .k-list-item.k-selected,
.yess-theme-host .k-list-item[aria-selected="true"],
.yess-theme-host .k-list-optionlabel.k-selected {
    background: var(--yess-popup-item-selected);
    color: var(--yess-color-text);
    font-weight: 650;
}

.yess-theme-host .k-list-item.k-disabled,
.yess-theme-host .k-list-item[aria-disabled="true"] {
    color: var(--yess-color-muted);
    cursor: not-allowed;
    opacity: var(--yess-control-disabled-opacity);
}

.yess-theme-host .k-list-item:focus-visible,
.yess-theme-host .k-list-item.k-focus {
    outline: var(--yess-control-focus-width) solid var(--yess-color-focus);
    outline-offset: calc(-1 * var(--yess-control-focus-width));
}

.yess-theme-host .k-no-data,
.yess-theme-host .k-list-no-data {
    padding: var(--yess-space-4);
    color: var(--yess-color-muted);
    text-align: center;
}

@media (forced-colors: active) {
    .yess-theme-host .k-checkbox,
    .yess-theme-host .k-radio {
        border-color: ButtonText;
        background: Field;
        color: FieldText;
        forced-color-adjust: auto;
    }

    .yess-theme-host .k-checkbox:checked,
    .yess-theme-host .k-radio:checked,
    .yess-theme-host .k-list-item.k-selected {
        background: Highlight;
        color: HighlightText;
    }
}
