/* Design tokens ported from the Compyl platform theme blocks.
   Consumers read these names and never hard-code a light or dark color. */

.theme-light {
    color-scheme: light;
    --thin-border: 57.1%;
    --font-family-body: "Poppins", sans-serif;
    --font-family-title: "Poppins", sans-serif;
    --font-family-code: "Consolas", "Monaco", "Courier New", monospace;
    --brand: #407771;
    --brand-rgb: 64, 119, 113;
    --brand-tint: #57a39a;
    --brand-tint-rgb: 87, 163, 154;
    --brand-accent: #34605b;
    --action: #34605b;
    --action-rgb: 52, 96, 91;
    --action-hover: #192e2c;
    --action-focus: #274945;
    --action-fill: #407771;
    --radius-sm: 0.25rem;
    --button-text: #fafafa;
    --body: #ffffff;
    --body-secondary: #e6e6e6;
    --body-text: #121212;
    --body-text-secondary: #121212;
    --text-secondary: #7a7a7a;
    --text-muted: #7a7a7a;
    --text-disabled: rgba(148, 148, 148, 1);
    --icon-primary: #121212;
    --icon-secondary: #7a7a7a;
    --border-primary: #b5b5b5;
    --border-secondary: #cfcfcf;
    --border-selected: #121212;
    --border-warning: #ad4800;
    --border-success: #166f1d;
    --surface-low: #fafafa;
    --surface-raised: #f0f0f0;
    --surface-raised-high: #ebebeb;
    --surface-high: #ebebeb;
    --surface-high-rgba: rgba(235, 235, 235, 0.1);
    --surface-raised-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.08);
    --surface-high-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.15);
    --row-hover: rgba(112, 112, 112, 0.1);
    --ripple: rgba(112, 112, 112, 0.1);
    --scrollbar-color: rgba(13, 13, 13, 0.3);
    --segmented-hover: #f0f0f0;
    --segmented-focus: #b5b5b5;
    --yellow: #c28b00;
    --yellow-translucent: rgba(194, 139, 0, 0.1);
    --warning: #ad4800;
    --warning-hover: #803500;
    --warning-focus: #943e00;
    --warning-text: #943e00;
    --info: #0037c2;
    --info-translucent: rgba(0, 55, 194, 0.1);
    --info-hover: #001b61;
    --info-focus: #00288f;
    --info-text: #00288f;
    --success: #166f1d;
    --success-translucent: rgba(22, 111, 29, 0.1);
    --success-hover: #105116;
    --success-focus: #14621a;
    --success-text: #14621a;
    --error: #8f0700;
    --error-translucent: rgba(143, 7, 0, 0.1);
    --error-hover: #470400;
    --error-focus: #6b0500;
    --error-text: #6b0500;
    --fill-neutral: rgba(207, 207, 207, 0.1);
    --fill-warning: rgba(173, 72, 0, 0.1);
    --fill-warning-hover: rgba(173, 72, 0, 0.3);
    --fill-success: rgba(22, 111, 29, 0.1);
    --fill-success-hover: rgba(22, 111, 29, 0.3);
    --fill-error: rgba(143, 7, 0, 0.1);
    --fill-error-hover: rgba(143, 7, 0, 0.3);
    --chip-fill: rgba(122, 122, 122, 0.3);
    --chip-fill-hover: rgba(122, 122, 122, 0.5);
    --chip-fill-rgb: 122, 122, 122;
    --neutral: #7a7a7a;
    --breadcrumbs-item: #7a7a7a;
    --breadcrumb-hover: rgba(122, 122, 122, 0.1);
    --breadcrumb-pressed: rgba(122, 122, 122, 0.3);
}

.theme-dark {
    color-scheme: dark;
    --thin-border: 57.1%;
    --font-family-body: "Poppins", sans-serif;
    --font-family-title: "Poppins", sans-serif;
    --font-family-code: "Consolas", "Monaco", "Courier New", monospace;
    --brand: #407771;
    --brand-rgb: 64, 119, 113;
    --brand-tint: #57a39a;
    --brand-tint-rgb: 87, 163, 154;
    --brand-accent: #57a39a;
    --action: #407771;
    --action-rgb: 64, 119, 113;
    --action-hover: #274945;
    --action-focus: #34605b;
    --action-fill: #57a39a;
    --radius-sm: 0.25rem;
    --button-text: #fafafa;
    --body: #121212;
    --body-secondary: #616161;
    --body-text: #fafafa;
    --body-text-secondary: #fafafa;
    --text-secondary: #999999;
    --text-muted: #999999;
    --text-disabled: rgba(112, 112, 112, 1);
    --icon-primary: #fafafa;
    --icon-secondary: #999999;
    --border-primary: #616161;
    --border-secondary: #4a4a4a;
    --border-selected: #fafafa;
    --border-warning: #c25100;
    --border-success: #197d22;
    --surface-low: #1a1a1a;
    --surface-raised: #303030;
    --surface-raised-high: #4a4a4a;
    --surface-high: #4a4a4a;
    --surface-high-rgba: rgba(74, 74, 74, 0.1);
    --surface-raised-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
    --surface-high-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.25);
    --row-hover: #1a1a1a;
    --ripple: rgba(250, 250, 250, 0.08);
    --scrollbar-color: rgba(250, 250, 250, 0.3);
    --segmented-hover: #303030;
    --segmented-focus: #0d0d0d;
    --yellow: #f0ac00;
    --yellow-translucent: rgba(240, 172, 0, 0.1);
    --warning: #c25100;
    --warning-hover: #943e00;
    --warning-focus: #943e00;
    --warning-text: #ffb26b;
    --info: #0044f0;
    --info-translucent: rgba(0, 68, 240, 0.1);
    --info-hover: #00288f;
    --info-focus: #0037c2;
    --info-text: #9db6ff;
    --success: #197d22;
    --success-translucent: rgba(25, 125, 34, 0.1);
    --success-hover: #14621a;
    --success-focus: #166f1d;
    --success-text: #8ee896;
    --error: #b20900;
    --error-translucent: rgba(178, 9, 0, 0.1);
    --error-hover: #6b0500;
    --error-focus: #8f0700;
    --error-text: #ff8a84;
    --fill-neutral: rgba(122, 122, 122, 0.1);
    --fill-warning: rgba(194, 81, 0, 0.1);
    --fill-warning-hover: rgba(194, 81, 0, 0.3);
    --fill-success: rgba(25, 125, 34, 0.1);
    --fill-success-hover: rgba(25, 125, 34, 0.3);
    --fill-error: rgba(178, 9, 0, 0.1);
    --fill-error-hover: rgba(178, 9, 0, 0.3);
    --chip-fill: rgba(153, 153, 153, 0.3);
    --chip-fill-hover: rgba(153, 153, 153, 0.5);
    --chip-fill-rgb: 153, 153, 153;
    --neutral: #999999;
    --breadcrumbs-item: #999999;
    --breadcrumb-hover: rgba(153, 153, 153, 0.1);
    --breadcrumb-pressed: rgba(153, 153, 153, 0.3);
}

/* Let Bootstrap controls follow the active theme instead of the stock blue palette. */
.theme-light,
.theme-dark {
    --bs-body-bg: var(--body);
    --bs-body-color: var(--body-text);
    --bs-emphasis-color: var(--body-text);
    --bs-secondary-color: var(--text-muted);
    --bs-secondary-bg: var(--surface-raised);
    --bs-tertiary-bg: var(--surface-low);
    --bs-tertiary-color: var(--text-muted);
    --bs-border-color: var(--border-primary);
    --bs-primary: var(--action);
    --bs-primary-rgb: var(--action-rgb);
    --bs-link-color: var(--action);
    --bs-link-hover-color: var(--action-hover);
    --bs-secondary: var(--text-secondary);
    --bs-secondary-rgb: var(--chip-fill-rgb);
    --bs-success: var(--success);
    --bs-danger: var(--error);
    --bs-warning: var(--warning);
    --bs-info: var(--info);
}
