.k-component,
.k-input,
.k-button,
.k-grid,
.k-window {
    font-family: var(--yess-font-family);
}

.k-button:focus-visible,
.k-input:focus-within,
.k-picker:focus-within {
    outline: 0.1875rem solid color-mix(in srgb, var(--yess-color-focus) 45%, transparent);
    outline-offset: 0.125rem;
}

.k-grid {
    max-width: 100%;
}

.yess-theme-host .k-grid,
.yess-theme-host .k-grid-content,
.yess-theme-host .k-grid-header,
.yess-theme-host .k-grid-header-wrap,
.yess-theme-host .k-pager,
.yess-theme-host .k-window,
.yess-theme-host .k-dialog,
.yess-theme-host .k-popup {
    border-color: var(--yess-color-border);
    background-color: var(--yess-color-surface);
    color: var(--yess-color-text);
}

.yess-theme-host .k-grid-header,
.yess-theme-host .k-table-th,
.yess-theme-host .k-pager {
    background-color: var(--yess-color-surface-subtle);
    color: var(--yess-color-text);
}

.yess-theme-host .k-table-row,
.yess-theme-host .k-table-td,
.yess-theme-host .k-grid td,
.yess-theme-host .k-grid th {
    border-color: var(--yess-color-border);
    background-color: transparent;
    color: var(--yess-color-text);
}

.yess-theme-host .k-table-row:hover,
.yess-theme-host .k-grid .k-table-row.k-hover {
    background-color: color-mix(in srgb, var(--yess-color-primary) 8%, var(--yess-color-surface));
}

.yess-theme-host .k-input,
.yess-theme-host .k-picker,
.yess-theme-host .k-textbox,
.yess-theme-host .k-dropdownlist,
.yess-theme-host .k-combobox {
    border-color: var(--yess-color-border);
    background-color: var(--yess-color-surface);
    color: var(--yess-color-text);
}

.yess-theme-host .k-input::placeholder,
.yess-theme-host .k-input-inner::placeholder {
    color: var(--yess-color-muted);
}

.yess-theme-host .k-button-solid-base:not(.yess-button) {
    border-color: var(--yess-color-border-strong);
    background-color: var(--yess-color-surface-subtle);
    color: var(--yess-color-text);
}

.yess-theme-host .k-button-solid-base:not(.yess-button):hover {
    background-color: color-mix(in srgb, var(--yess-color-primary) 10%, var(--yess-color-surface));
}

/* Telerik Wizard owns its navigation buttons internally. Keep its behavior,
   but bring those controls under the Yess visual button contract. */
.yess-theme-host .k-wizard .k-wizard-buttons .k-button {
    min-height: var(--yess-control-height-md);
    border-radius: var(--yess-button-border-radius);
    font-family: var(--yess-font-family);
    font-weight: var(--yess-button-font-weight);
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease,
        box-shadow 120ms ease;
}

.yess-theme-host .k-wizard .k-wizard-buttons .k-button-solid-primary {
    border-color: var(--yess-color-primary);
    background-color: var(--yess-color-primary);
    color: var(--yess-color-on-primary);
}

.yess-theme-host .k-wizard .k-wizard-buttons .k-button-solid-primary:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-color-primary-hover);
    background-color: var(--yess-color-primary-hover);
    color: var(--yess-color-on-primary);
}

.yess-theme-host .k-wizard .k-wizard-buttons .k-button-solid-base {
    border-color: var(--yess-color-border-strong);
    background-color: transparent;
    color: var(--yess-color-text);
}

.yess-theme-host .k-wizard .k-wizard-buttons .k-button-solid-base:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-color-neutral);
    background-color: color-mix(in srgb, var(--yess-color-neutral) 10%, transparent);
    color: var(--yess-color-text);
}

.yess-theme-host .k-wizard .k-wizard-buttons .k-button:focus-visible {
    outline: 3px solid var(--yess-color-focus);
    outline-offset: 2px;
    box-shadow: none;
}

.yess-theme-host .k-wizard .k-step-current .k-step-indicator,
.yess-theme-host .k-wizard .k-step-done .k-step-indicator {
    border-color: var(--yess-color-primary);
    background-color: var(--yess-color-primary);
    color: var(--yess-color-on-primary);
}

.yess-theme-host .k-wizard .k-step-label {
    color: var(--yess-color-text);
}

.yess-theme-host .k-wizard .k-step-disabled .k-step-label {
    color: var(--yess-color-muted);
}

/* Row-level Telerik Grid commands remain Telerik controls, but use the
   semantic Yess action palette and spacing. */
.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--yess-button-gap-small);
    min-height: var(--yess-control-height-sm);
    margin: 0.125rem;
    border-radius: var(--yess-button-border-radius);
    font-family: var(--yess-font-family);
    font-weight: var(--yess-button-font-weight);
    line-height: 1.2;
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--warning {
    border-color: var(--yess-color-warning);
    background-color: var(--yess-color-warning);
    color: var(--yess-color-on-warning);
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--warning:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-color-warning-hover);
    background-color: var(--yess-color-warning-hover);
    color: var(--yess-color-on-warning);
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--danger {
    border-color: var(--yess-color-danger);
    background-color: var(--yess-color-danger);
    color: var(--yess-color-on-danger);
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--danger:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-color-danger-hover);
    background-color: var(--yess-color-danger-hover);
    color: var(--yess-color-on-danger);
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command:focus-visible {
    outline: 0.1875rem solid var(--yess-color-focus);
    outline-offset: 0.125rem;
    box-shadow: none;
}

.yess-grid-command__icon {
    flex: 0 0 auto;
}


/* Phase 3A.3 - complete current Foundation button acceptance coverage. */
.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--secondary {
    border-color: var(--yess-color-secondary);
    background-color: var(--yess-color-secondary);
    color: var(--yess-color-on-secondary);
}

.yess-theme-host .k-grid .k-command-cell .k-button.yess-grid-command--secondary:hover:not(:disabled):not(.k-disabled) {
    border-color: var(--yess-color-secondary-hover);
    background-color: var(--yess-color-secondary-hover);
    color: var(--yess-color-on-secondary);
}

.yess-theme-host .k-grid-toolbar,
.yess-theme-host .k-grid .k-toolbar,
.yess-theme-host .k-stepper,
.yess-theme-host .k-wizard,
.yess-theme-host .k-tabstrip,
.yess-theme-host .k-calendar,
.yess-theme-host .k-scheduler,
.yess-theme-host .k-upload {
    border-color: var(--yess-color-border);
    background-color: var(--yess-color-surface);
    color: var(--yess-color-text);
}

.yess-theme-host .k-grid-toolbar,
.yess-theme-host .k-grid .k-toolbar,
.yess-theme-host .k-window-titlebar,
.yess-theme-host .k-dialog-titlebar,
.yess-theme-host .k-tabstrip-items-wrapper,
.yess-theme-host .k-scheduler-toolbar {
    border-color: var(--yess-color-border);
    background-color: var(--yess-color-surface-subtle);
    color: var(--yess-color-text);
}

.yess-theme-host .k-window-titlebar .k-button,
.yess-theme-host .k-dialog-titlebar .k-button,
.yess-theme-host .k-picker .k-input-button,
.yess-theme-host .k-tabstrip .k-button,
.yess-theme-host .k-calendar .k-button,
.yess-theme-host .k-scheduler .k-button,
.yess-theme-host .k-upload .k-button {
    border-color: transparent;
    background-color: transparent;
    color: var(--yess-color-text);
}

.yess-theme-host .k-window-titlebar .k-button:hover,
.yess-theme-host .k-dialog-titlebar .k-button:hover,
.yess-theme-host .k-picker .k-input-button:hover,
.yess-theme-host .k-tabstrip .k-button:hover,
.yess-theme-host .k-calendar .k-button:hover,
.yess-theme-host .k-scheduler .k-button:hover,
.yess-theme-host .k-upload .k-button:hover {
    background-color: color-mix(in srgb, var(--yess-color-primary) 10%, transparent);
    color: var(--yess-color-text);
}

.yess-theme-host .k-window-titlebar .k-button:focus-visible,
.yess-theme-host .k-dialog-titlebar .k-button:focus-visible,
.yess-theme-host .k-picker .k-input-button:focus-visible,
.yess-theme-host .k-tabstrip .k-button:focus-visible,
.yess-theme-host .k-calendar .k-button:focus-visible,
.yess-theme-host .k-scheduler .k-button:focus-visible,
.yess-theme-host .k-upload .k-button:focus-visible {
    outline: 0.1875rem solid var(--yess-color-focus);
    outline-offset: 0.125rem;
    box-shadow: none;
}

.yess-theme-host .k-stepper .k-step-link {
    color: var(--yess-color-text);
}

.yess-theme-host .k-stepper .k-step-current .k-step-indicator,
.yess-theme-host .k-stepper .k-step-done .k-step-indicator {
    border-color: var(--yess-color-primary);
    background-color: var(--yess-color-primary);
    color: var(--yess-color-on-primary);
}

.yess-theme-host .k-stepper .k-step-link:focus-visible {
    outline: 0.1875rem solid var(--yess-color-focus);
    outline-offset: 0.125rem;
}

.yess-theme-host .k-tabstrip .k-tabstrip-item {
    color: var(--yess-color-text);
}

.yess-theme-host .k-tabstrip .k-tabstrip-item.k-active {
    border-color: var(--yess-color-primary);
    color: var(--yess-color-primary);
}

.yess-theme-host .k-tabstrip-content,
.yess-theme-host .k-window-content,
.yess-theme-host .k-dialog-content,
.yess-theme-host .k-dialog-actions {
    border-color: var(--yess-color-border);
    background-color: var(--yess-color-surface);
    color: var(--yess-color-text);
}
