/* kendo-sylogist.css — aligns Kendo UI (kendo-theme-bootstrap) with the SPP Bootstrap theme (48076).
 *
 * Load AFTER the kendo-theme-bootstrap stylesheet. Every value is taken from the
 * Bootstrap variables already on the page (admin: bootstrap-sylogist.css, tenant
 * portals: the PE theme bundle), so Kendo follows whichever theme is active —
 * Slate/Cobalt in admin, the tenant's colours in a portal — with no Sass build.
 */
:root {
    /* Radii: admin sets --spp-control-radius (2px) / --spp-surface-radius (4px) from the
     * design-system tokens (admin.scss); tenant portals leave them unset and keep following
     * --bs-border-radius exactly as before. */
    --kendo-border-radius-none: 0;
    --kendo-border-radius-sm: var(--spp-control-radius, var(--bs-border-radius, 0));
    --kendo-border-radius-md: var(--spp-control-radius, var(--bs-border-radius, 0));
    --kendo-border-radius-lg: var(--spp-surface-radius, var(--bs-border-radius, 0));
    --kendo-border-radius-xl: var(--spp-surface-radius, var(--bs-border-radius, 0));
    --kendo-border-radius-xxl: var(--spp-surface-radius, var(--bs-border-radius, 0));

    /* Brand colours */
    --kendo-color-primary: var(--bs-primary);
    --kendo-color-primary-emphasis: var(--bs-primary-bg-subtle, var(--bs-primary));
    --kendo-color-primary-subtle: var(--bs-primary-bg-subtle, var(--bs-primary));
    --kendo-color-primary-hover: color-mix(in srgb, var(--bs-primary) 85%, black);
    --kendo-color-primary-active: color-mix(in srgb, var(--bs-primary) 75%, black);
    --kendo-color-on-primary: #fff;
    --kendo-color-secondary: var(--bs-secondary, var(--bs-primary));
    --kendo-color-info: var(--bs-info, #00a9cc);
    --kendo-color-success: var(--bs-success, #88b04a);
    --kendo-color-warning: var(--bs-warning, #ed8e25);
    --kendo-color-error: var(--bs-danger, #ac4424);

    --kendo-font-family: var(--bs-body-font-family, inherit);
}

/* Belt and braces: some Kendo components hard-code radius instead of using the variables. */
.k-button,
.k-input,
.k-picker,
.k-tooltip,
.k-chip {
    border-radius: var(--spp-control-radius, var(--bs-border-radius, 0));
}

.k-dialog,
.k-window,
.k-grid,
.k-popup,
.k-menu-popup,
.k-animation-container .k-popup,
.k-card,
.k-notification {
    border-radius: var(--spp-surface-radius, var(--bs-border-radius, 0));
}

/* Dialog: slate title bar, primary action button */
.k-dialog .k-window-titlebar,
.k-window .k-window-titlebar {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.k-dialog .k-window-titlebar .k-window-title,
.k-window .k-window-titlebar .k-window-title {
    color: #fff;
}

.k-dialog .k-window-titlebar .k-button,
.k-window .k-window-titlebar .k-button {
    color: #fff;
}

/* Bug 50115: confirm/alert dialogs have a fixed width (set in confirm-dialog.js); long messages wrap inside it. */
.k-dialog .k-dialog-content {
    overflow-wrap: anywhere;
    white-space: normal;
}

/* 52750: the Actor ComboBox in the Logs filter is as tall as the small Bootstrap selects and date inputs beside it
   (Kendo's default is taller, so the row looked uneven). The popup height is set in audit-log-viewer.js. */
#filter-form .k-combobox {
    width: 100%;
    min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width, 1px) * 2));
    height: calc(1.5em + 0.5rem + calc(var(--bs-border-width, 1px) * 2));
    font-size: 0.875rem;
}
#filter-form .k-combobox .k-input-inner {
    padding-block: 0.25rem;
    min-height: 0;
}
