/**
 * Trialive light theme – color tokens and legacy variable bridge.
 *
 * Load this file after colors.css/default-colors.css and before
 * trialive-styles.css. It deliberately contains every concrete color used by
 * the Trialive override, so layout and component styles remain color-agnostic.
 */

:root {
  color-scheme: light;

  /* Trialive brand palette */
  --trialive-primary-1: #415E97;
  --trialive-primary-2: #415E97dd;
  --trialive-primary-3: #415E97aa;
  --trialive-primary-4: #415E9788;
  --trialive-primary-5: #415E9766;
  --trialive-primary-6: #415E9744;
  --trialive-primary-7: #415E9716;

  --trialive-secondary-1: #93ABD5;
  --trialive-secondary-2: #93ABD5dd;
  --trialive-secondary-3: #93ABD5af;
  --trialive-secondary-4: #93ABD58b;
  --trialive-secondary-5: #93ABD566;
  --trialive-secondary-6: #93ABD53b;
  --trialive-secondary-7: #93ABD516;

  /* Neutral palette */
  --trialive-transparent: #ffffff00;
  --trialive-white: #ffffff;
  --trialive-black: #000000;
  --trialive-canvas: #f5f7fb;
  --trialive-surface: #ffffff;
  --trialive-surface-raised: #ffffff;
  --trialive-surface-subtle: #f4f7fb;
  --trialive-surface-muted: #edf1f6;
  --trialive-surface-pressed: #e4eaf3;
  --trialive-surface-glass: #fffffff2;
  --trialive-surface-glass-strong: #fffffff8;
  --trialive-text-1: #1d1d1f;
  --trialive-text-2: #45464b;
  --trialive-text-3: #6e6e73;
  --trialive-text-disabled: #a1a1a6;
  --trialive-text-inverse: #ffffff;
  --trialive-border-subtle: #ebecef;
  --trialive-border: #d9dce3;
  --trialive-border-strong: #aeb6c4;
  --trialive-divider: #e5e7ec;
  --trialive-overlay: #17213a66;
  --trialive-overlay-soft: #17213a29;

  /* Semantic states */
  --trialive-info: #35649c;
  --trialive-info-bg: #e9f2ff;
  --trialive-info-border: #a6bfe3;
  --trialive-success: #287a43;
  --trialive-success-strong: #1f6536;
  --trialive-success-bg: #edf8f0;
  --trialive-success-border: #aed6b9;
  --trialive-warning: #9a6400;
  --trialive-warning-bg: #fff8e8;
  --trialive-warning-border: #e6cc8f;
  --trialive-danger: #c33c35;
  --trialive-danger-strong: #9f2f2a;
  --trialive-danger-bg: #fff1f0;
  --trialive-danger-border: #edb5b1;
  --trialive-highlight: #fff0ad;

  /* Component color roles */
  --trialive-link: var(--trialive-primary-1);
  --trialive-link-hover: var(--trialive-primary-2);
  --trialive-focus: var(--trialive-primary-1);
  --trialive-focus-ring: var(--trialive-primary-6);
  --trialive-control-bg: var(--trialive-surface);
  --trialive-control-hover-bg: var(--trialive-surface-subtle);
  --trialive-control-readonly-bg: var(--trialive-surface-muted);
  --trialive-control-disabled-bg: var(--trialive-surface-subtle);
  --trialive-selection-bg: #e8eef9;
  --trialive-selection-strong-bg: #dde7f6;
  --trialive-hover-bg: #edf3fc;
  --trialive-active-bg: #e5edf9;
  --trialive-header-bg: var(--trialive-surface-glass);
  --trialive-navigation-bg: var(--trialive-surface-glass-strong);
  --trialive-sidebar-bg: var(--trialive-surface-subtle);
  --trialive-table-header-bg: #edf2faf7;
  --trialive-table-row-alt-bg: #f7f9fd;
  --trialive-table-row-hover-bg: #edf3fb;
  --trialive-table-row-selected-bg: #e2ebf8;
  --trialive-control-focus-line: var(--trialive-primary-1);
  --trialive-checkbox-bg: var(--trialive-primary-1);
  --trialive-checkbox-check: var(--trialive-white);
  --trialive-slider-track: #809bc9;
  --trialive-slider-thumb: var(--trialive-primary-1);
  --trialive-slider-readonly-track: #cbd2dd;
  --trialive-slider-readonly-thumb: #8e97a5;
  --trialive-pagination-bg: #f0f4fb;
  --trialive-pagination-hover-bg: #e3ebf8;
  --trialive-message-bg: var(--trialive-surface);
  --trialive-message-meta-bg: #f3f6fb;
  --trialive-message-body-bg: var(--trialive-surface);
  --trialive-message-border: #d7e0ee;
  --trialive-message-label: #354d78;
  --trialive-message-status: var(--trialive-primary-1);
  --trialive-form-nav-bg: #f4f6fa;
  --trialive-form-nav-border: #e0e5ed;
  --trialive-form-nav-item-bg: var(--trialive-surface);
  --trialive-form-nav-item-hover-bg: #f8faff;
  --trialive-form-nav-item-border: #d9dfe9;
  --trialive-form-nav-item-active-bg: #edf2fa;
  --trialive-form-nav-item-active-border: #9fb2d4;
  --trialive-form-nav-status: var(--trialive-success);
  --trialive-tooltip-bg: var(--trialive-surface);
  --trialive-tooltip-text: var(--trialive-text-1);

  /* Shadow colors are kept here to keep all concrete colors in one file. */
  --trialive-shadow-color-soft: #17213a0f;
  --trialive-shadow-color: #17213a1f;
  --trialive-shadow-color-strong: #17213a33;
  --trialive-shadow-xs: 0 1px 2px var(--trialive-shadow-color-soft);
  --trialive-shadow-sm: 0 2px 8px var(--trialive-shadow-color-soft), 0 1px 2px var(--trialive-shadow-color);
  --trialive-shadow-md: 0 10px 30px var(--trialive-shadow-color), 0 2px 8px var(--trialive-shadow-color-soft);
  --trialive-shadow-lg: 0 24px 70px var(--trialive-shadow-color-strong), 0 8px 24px var(--trialive-shadow-color);
  --trialive-header-shadow: 0 1px 0 var(--trialive-border-subtle), 0 4px 16px var(--trialive-shadow-color-soft);

  /* IMS palette compatibility */
  --primary-1: var(--trialive-primary-1);
  --primary-2: var(--trialive-primary-2);
  --primary-3: var(--trialive-primary-3);
  --primary-4: var(--trialive-primary-4);
  --primary-5: var(--trialive-primary-5);
  --primary-6: var(--trialive-primary-6);
  --primary-7: var(--trialive-primary-7);
  --secondary-1: var(--trialive-secondary-1);
  --secondary-2: var(--trialive-secondary-2);
  --secondary-3: var(--trialive-secondary-3);
  --secondary-4: var(--trialive-secondary-4);
  --secondary-5: var(--trialive-secondary-5);
  --secondary-6: var(--trialive-secondary-6);
  --secondary-7: var(--trialive-secondary-7);
  --background-1: var(--trialive-surface);
  --background-2: var(--trialive-surface-subtle);
  --background-3: var(--trialive-surface-muted);
  --background-4: var(--trialive-canvas);
  --gray-1: var(--trialive-text-1);
  --gray-2: var(--trialive-text-2);
  --gray-3: var(--trialive-text-3);
  --gray-4: var(--trialive-text-3);
  --gray-5: var(--trialive-text-disabled);
  --gray-6: var(--trialive-border-strong);
  --lightgray-1: var(--trialive-border-strong);
  --lightgray-2: var(--trialive-border);
  --lightgray-3: var(--trialive-divider);
  --lightgray-4: var(--trialive-border-subtle);
  --lightgray-5: var(--trialive-surface-muted);
  --lightgray-6: var(--trialive-surface-subtle);

  /* Base WSS compatibility */
  --wss-gray-0: var(--trialive-text-1);
  --wss-gray-1: var(--trialive-text-2);
  --wss-gray-2: var(--trialive-text-3);
  --wss-gray-3: var(--trialive-text-3);
  --wss-gray-4: var(--trialive-text-disabled);
  --wss-gray-5: var(--trialive-border-strong);
  --wss-lightgray-1: var(--trialive-border-strong);
  --wss-lightgray-2: var(--trialive-border);
  --wss-lightgray-3: var(--trialive-divider);
  --wss-lightgray-4: var(--trialive-border-subtle);
  --wss-lightgray-5: var(--trialive-surface-muted);
  --wss-lightgray-6: var(--trialive-surface-subtle);
  --wss-black: var(--trialive-text-1);
  --wss-gray: var(--trialive-text-3);
  --wss-lightgray: var(--trialive-surface-muted);
  --wss-darkgray: var(--trialive-text-3);
  --wss-white: var(--trialive-white);

  --wss-blue-1: var(--trialive-primary-1);
  --wss-blue-2: var(--trialive-primary-1);
  --wss-blue-3: var(--trialive-primary-1);
  --wss-blue-4: var(--trialive-primary-2);
  --wss-blue-5: var(--trialive-primary-3);
  --wss-blue-6: var(--trialive-primary-4);
  --wss-blue-7: var(--trialive-secondary-2);
  --wss-blue-8: var(--trialive-secondary-7);
  --wss-lightblue-1: var(--trialive-secondary-1);
  --wss-lightblue-2: var(--trialive-secondary-2);
  --wss-lightblue-3: var(--trialive-secondary-3);
  --wss-lightblue-4: var(--trialive-secondary-4);
  --wss-lightblue-5: var(--trialive-secondary-5);
  --wss-lightblue-6: var(--trialive-secondary-6);
  --wss-lightblue-7: var(--trialive-secondary-7);
  --wss-lightblue-8: var(--trialive-secondary-7);
  --wss-lightblue-9: var(--trialive-secondary-7);
  --wss-blue: var(--trialive-primary-1);
  --wss-lightblue: var(--trialive-secondary-3);

  --wss-greenblue-1: var(--trialive-primary-1);
  --wss-greenblue-2: var(--trialive-primary-2);
  --wss-greenblue-3: var(--trialive-primary-3);
  --wss-greenblue-4: var(--trialive-secondary-1);
  --wss-greenblue-5: var(--trialive-secondary-2);
  --wss-greenblue-6: var(--trialive-secondary-3);
  --wss-greenblue-7: var(--trialive-secondary-4);
  --wss-greenblue-8: var(--trialive-secondary-6);
  --wss-greenblue: var(--trialive-secondary-1);

  --wss-green-1: var(--trialive-success-strong);
  --wss-green-2: var(--trialive-success-strong);
  --wss-green-3: var(--trialive-success);
  --wss-green-4: var(--trialive-success);
  --wss-green-5: var(--trialive-success);
  --wss-green-6: var(--trialive-success-border);
  --wss-green-7: var(--trialive-success-border);
  --wss-green-8: var(--trialive-success-bg);
  --wss-green: var(--trialive-success);
  --wss-darkgreen: var(--trialive-success-strong);

  --wss-red-1: var(--trialive-danger-strong);
  --wss-red-2: var(--trialive-danger-strong);
  --wss-red-3: var(--trialive-danger);
  --wss-red-4: var(--trialive-danger);
  --wss-red-5: var(--trialive-danger);
  --wss-red-6: var(--trialive-danger-border);
  --wss-red-7: var(--trialive-danger-border);
  --wss-red-8: var(--trialive-danger-bg);
  --wss-red: var(--trialive-danger);
  --wss-darkred: var(--trialive-danger-strong);

  --wss-orange-1: var(--trialive-warning);
  --wss-orange-2: var(--trialive-warning);
  --wss-orange-3: var(--trialive-warning);
  --wss-orange-4: var(--trialive-warning);
  --wss-orange-5: var(--trialive-warning-border);
  --wss-orange-6: var(--trialive-warning-border);
  --wss-orange-7: var(--trialive-warning-bg);
  --wss-orange-8: var(--trialive-warning-bg);
  --wss-orange: var(--trialive-warning);
  --wss-yellow-1: var(--trialive-warning);
  --wss-yellow-2: var(--trialive-warning);
  --wss-yellow-3: var(--trialive-warning);
  --wss-yellow-4: var(--trialive-warning);
  --wss-yellow-5: var(--trialive-warning-border);
  --wss-yellow-6: var(--trialive-warning-border);
  --wss-yellow-7: var(--trialive-warning-bg);
  --wss-yellow-8: var(--trialive-warning-bg);
  --wss-yellow: var(--trialive-warning);

  --wss-purple-1: var(--trialive-primary-1);
  --wss-purple-2: var(--trialive-primary-2);
  --wss-purple-3: var(--trialive-primary-2);
  --wss-purple-4: var(--trialive-primary-1);
  --wss-purple-5: var(--trialive-primary-3);
  --wss-purple-6: var(--trialive-primary-4);
  --wss-purple-7: var(--trialive-primary-5);
  --wss-purple-8: var(--trialive-primary-7);
  --wss-purple: var(--trialive-primary-1);

  --wss-shadow: var(--trialive-shadow-sm);
  --wss-shadow-center: var(--trialive-shadow-sm);
  --wss-shadow-right: var(--trialive-shadow-md);
  --wss-shadow-left: var(--trialive-shadow-md);
  --shadow: var(--trialive-shadow-color-soft);
  --ws_bkgrnd_ro: var(--trialive-control-readonly-bg);
  --ws_border_ro: var(--trialive-border);

  /* Existing IMS semantic tokens */
  --body: var(--trialive-text-1);
  --body-bg: var(--trialive-canvas);
  --title: var(--trialive-primary-1);
  --edit: var(--trialive-text-disabled);
  --info: var(--trialive-info);
  --info-b: var(--trialive-info-border);
  --info-bg: var(--trialive-info-bg);
  --info-bg2: var(--trialive-info-bg);
  --warn-b: var(--trialive-warning-border);
  --warn-bg: var(--trialive-warning-bg);
  --error-b: var(--trialive-danger-border);
  --error-bg: var(--trialive-danger-bg);
  --esection-bg: var(--trialive-surface-muted);
  --hmenu: var(--trialive-primary-1);
  --hmenu-b: var(--trialive-primary-1);
  --hmenu-bg: var(--trialive-surface);
  --link1: var(--trialive-link);
  --link1-hov: var(--trialive-link-hover);
  --link1-sel: var(--trialive-text-2);
  --link2: var(--trialive-text-3);
  --link2-hov: var(--trialive-primary-1);
  --link2-sel: var(--trialive-text-2);
  --mmenu: var(--trialive-text-2);
  --mmenu-b: var(--trialive-primary-1);
  --mmenu-bg: var(--trialive-navigation-bg);
  --mmenu-bg2: var(--trialive-surface-subtle);
  --mmenu-bg3: var(--trialive-surface);
  --mmenu-bg4: var(--trialive-surface);
  --mmenu-hov: var(--trialive-primary-1);
  --msg-bg: var(--trialive-message-meta-bg);
  --msg-cnt: var(--trialive-text-inverse);
  --msg-cnt-bg: var(--trialive-danger);
  --tip-bg: var(--trialive-tooltip-bg);
  --tip-b: var(--trialive-tooltip-bg);
  --tip-bp: var(--trialive-tooltip-bg);
  --tip-h: var(--trialive-primary-1);
  --tip-ul: var(--trialive-primary-3);
  --txt: var(--trialive-text-1);
  --txt-a: var(--trialive-link);
  --txt-h: var(--trialive-primary-1);
  --txt-bg: var(--trialive-surface-muted);
  --vmenu: var(--trialive-text-2);
  --vmenu-bg: var(--trialive-sidebar-bg);
  --vmenu-hov: var(--trialive-primary-1);
  --vmenu-sel: var(--trialive-primary-1);
  --vmenu-sel-bg: var(--trialive-selection-bg);
  --vmenu-se1-bg: var(--trialive-selection-bg);
  --vmenu-sel-hov: var(--trialive-primary-1);
  --vmenu-sel-hov-bg: var(--trialive-selection-strong-bg);
  --note-bg: var(--trialive-warning-bg);
  --tab: var(--trialive-text-2);
  --tab-b: var(--trialive-border);
  --tab-bg: var(--trialive-surface-subtle);
  --tab-hov: var(--trialive-primary-1);
  --tab-hov-bg: var(--trialive-hover-bg);
  --tab-sel: var(--trialive-primary-1);
  --tab-sel-b: var(--trialive-primary-1);
  --tab-sel-bg: var(--trialive-surface);
  --tab2: var(--trialive-text-2);
  --tab2-b: var(--trialive-border);
  --tab2-bg: var(--trialive-surface);
  --tab2-hov: var(--trialive-primary-1);
  --tab2-hov-bg: var(--trialive-hover-bg);
  --tab2-sel: var(--trialive-primary-1);
  --tab2-sel-b: var(--trialive-primary-1);
  --tab2-sel-bg: var(--trialive-selection-bg);
  --table-h-b: var(--trialive-border-strong);
  --table-h-bg: var(--trialive-table-header-bg);
  --table-h-hov-bg: var(--trialive-table-header-bg);
  --table-row2-bg: var(--trialive-table-row-alt-bg);
  --window-h-bg: var(--trialive-primary-1);
  --form-edt-b: var(--trialive-border-strong);
  --form-dev-b: var(--trialive-secondary-1);
  --bsection-b: var(--trialive-border);
  --bgroup-bg: var(--trialive-surface);
  --bmerge: var(--trialive-secondary-6);
  --btable-tr: var(--trialive-table-row-alt-bg);
  --btable-tr-ro: var(--trialive-transparent);
  --visit-h: var(--trialive-primary-1);
  --visitmgr-h: var(--trialive-text-2);
  --visitmgr-b: var(--trialive-border-strong);
  --fmenu: var(--trialive-text-2);
  --fmenu-b: var(--trialive-border);
  --fmenu-bg: var(--trialive-surface-subtle);
  --fmenu-hov-b: var(--trialive-primary-1);
  --fmenu-hov-bg: var(--trialive-hover-bg);
  --fmenu-log-b: var(--trialive-border-subtle);
  --fmenu-log-bg: var(--trialive-surface-subtle);
  --fmenu-sel: var(--trialive-primary-1);
  --fmenu-sel-b: var(--trialive-primary-1);
  --fmenu-sel-bg: var(--trialive-selection-bg);
  --fmenu-sel-hov: var(--trialive-primary-1);
  --tSwitch: var(--trialive-primary-1);
  --button: var(--trialive-text-inverse);
  --button-b: var(--trialive-primary-1);
  --button-b2: var(--trialive-primary-1);
  --button-bg: var(--trialive-primary-1);
  --button-hov: var(--trialive-text-inverse);
  --button-hov-b: var(--trialive-primary-2);
  --button-b-hov: var(--trialive-primary-2);
  --button-b-hov2: var(--trialive-primary-2);
  --button-hov-bg: var(--trialive-primary-2);
  --button-dis: var(--trialive-text-disabled);
  --button-dis-bg: var(--trialive-control-disabled-bg);
  --focus-b: var(--trialive-focus);
  --border: var(--trialive-border-strong);
  --input: var(--trialive-text-1);
  --input-b: var(--trialive-border-strong);
  --input-bg: var(--trialive-control-bg);
  --input-bg2: var(--trialive-control-bg);
  --input-ro: var(--trialive-text-3);
  --input-ro-b: var(--trialive-border);
  --input-ro-mdfy-b: var(--trialive-warning-border);
  --input-ro-mdfy-bg: var(--trialive-warning-bg);
  --date: var(--trialive-text-2);
  --phone-b: var(--trialive-border-strong);
  --phone-bg: var(--trialive-control-bg);
  --colorpicker-bg: var(--trialive-text-2);
  --slider-bar: var(--trialive-slider-track);
  --slider-thumb: var(--trialive-slider-thumb);
  --slider-disabled: var(--trialive-slider-readonly-track);
  --signature-b: var(--trialive-border-strong);
  --upload-b: var(--trialive-secondary-1);
  --upload-file: var(--trialive-success-bg);

  /* Widget compatibility */
  --color1: var(--trialive-primary-1);
  --color2: var(--trialive-secondary-1);
  --color3: var(--trialive-secondary-7);
  --color4: var(--trialive-primary-2);
  --color5: var(--trialive-danger-strong);
  --color6: var(--trialive-success-strong);
  --color7: var(--trialive-danger);
  --color8: var(--trialive-success-bg);
  --color-blue2: var(--trialive-primary-1);

  /* Legacy system colors emitted inline in the page head */
  --syscolor0: var(--trialive-text-1);
  --syscolor1: var(--trialive-danger-bg);
  --syscolor2: var(--trialive-secondary-1);
  --syscolor3: var(--trialive-secondary-7);
  --syscolor4: var(--trialive-text-3);
  --syscolor5: var(--trialive-primary-1);
  --syscolor6: var(--trialive-secondary-7);
  --syscolor7: var(--trialive-text-disabled);
  --syscolor8: var(--trialive-divider);
  --syscolor9: var(--trialive-danger);
  --syscolor10: var(--trialive-danger-border);
  --syscolor11: var(--trialive-text-2);
  --syscolor12: var(--trialive-primary-1);
}
