/* Light palette and Light-only workspace overrides. Load after the common stylesheet. */

/* Light palette */
/* Workspace palette. Shared and page-specific styles consume these semantic color tokens. */
html[data-ui-theme="light"] {
    color-scheme: light;

    /* Canvas, component surfaces, and separators */
    --ui-page-bg: #fff;
    --ui-surface: #fff;
    --ui-surface-tinted: #f4f8fd;
    --ui-surface-raised: #eef1f4;
    --ui-surface-hover: #e3eaf1;
    --ui-border: #8493a2;
    --ui-divider-subtle: #ccdff0;

    /* Foreground, accents, and keyboard focus */
    --ui-text: #222f3e;
    --ui-text-muted: #4f5e6d;
    --ui-accent: #225f8d;
    --ui-focus: #175f97;
    --ui-link: #165b8e;

    /* Status foregrounds and their matching surfaces */
    --ui-success: #24603c;
    --ui-success-surface: #e5f4e9;
    --ui-warning: #815613;
    --ui-warning-surface: #fdf3dd;
    --ui-danger: #a62d35;
    --ui-danger-surface: #fce8ea;

    /* Overlays and elevated components */
    --ui-shadow: 0 4px 16px rgb(30 46 64 / 17%);
    --ui-overlay: rgb(244 245 247 / 96%);

    /* Navigation */
    --ui-nav-bg: #bfd4e7;
    --ui-nav-text: #20394f;

    /* Primary actions */
    --ui-primary-bg: #26663e;
    --ui-primary-hover: #1a5030;
    --ui-primary-text: #fff;
}

/* Theme selector and workspace shell */
html[data-ui-theme="light"] #left-menu-support [data-role="organization-opened-tickets-count"] {
    background-color: #792581;
}

html[data-ui-theme="light"] #left-menu-support [data-role="saas-opened-tickets-count"] {
    background-color: #535e16;
}

/* Dashboard and activity feed */
html[data-ui-theme="light"]:where([data-ui-theme-components~="dashboard"])
body.proposals-dashboard-page {
    --dashboard-open-row: #f0f6fc;
    --dashboard-signed-row: #e4f1e7;
    --dashboard-closed-row: #eef0f2;
    --dashboard-selected-bg: #e1edf8;
    --dashboard-cyan: #0b6881;
    --dashboard-purple: #783985;
}

/* Event icons retain their status colors on a consistent Light feed surface. */
html[data-ui-theme="light"]:where([data-ui-theme-components~="dashboard"])
#last-events-list,
html[data-ui-theme="light"]:where([data-ui-theme-components~="dashboard"])
#last-events-list .proposal-event-element {
    background-color: var(--ui-surface-tinted);
}

html[data-ui-theme="light"]:where([data-ui-theme-components~="dashboard"])
#last-events-list :is(.last-events-header, .events-list-pagination, .proposal-event-element) {
    border-block-color: var(--ui-divider-subtle);
}

html[data-ui-theme="light"]:where([data-ui-theme-components~="dashboard"])
#last-events-list :is(.last-events-disclaimer, .event-date-and-staff) {
    color: var(--ui-text-muted);
}

/* Editors and Production templates */
/* Proposal, section, and template editor controls use the workspace palette.
   Storage also uses the production template modal rules and provides its editor tokens. */

/* Local accents cover editor selection, formula controls, and document labels. */
html[data-ui-theme="light"]:where([data-ui-theme-components~="editor"])
body:is(.edit-proposal-page, .proposal-webdoc-template-editor, .proposal-webdoc-section-editor) {
    --editor-selection-bg: #dcecf8;
    --editor-document-accent: #783d87;
}
