/*
 * Bootstrap-switch theming for dark mode.
 *
 * bootstrap-switch builds its DOM in JavaScript; the plugin stylesheet hardcodes
 * Bootstrap 3 colours (#fff, #337ab7, #eee, #333, #ccc, #66afe9). This file keeps
 * the plugin DOM/JS untouched and re-themes the emitted classes on --td-* tokens,
 * so both light and dark mode follow the design system.
 *
 * Loaded after bootstrap-switch.min.css. Tokens come from
 * /vendor/topdata-design-system/tokens.css (declaration order is irrelevant for
 * CSS custom properties).
 */

.bootstrap-switch {
    border-color: var(--td-color-border);
    border-radius: var(--td-radius-sm);
    background-color: var(--td-color-surface);
}

.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    color: var(--td-color-on-primary);
    background: var(--td-color-primary);
}

.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
    color: var(--td-color-fg);
    background: var(--td-color-surface-raised);
}

.bootstrap-switch .bootstrap-switch-label {
    color: var(--td-color-fg-muted);
    background: var(--td-color-surface);
}

.bootstrap-switch.bootstrap-switch-focused {
    border-color: var(--td-color-focus);
    outline: 2px solid var(--td-color-focus);
    outline-offset: 2px;
    box-shadow: none;
}

.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
    opacity: 1;
    color: var(--td-color-disabled-fg);
    background: var(--td-color-disabled);
}
