/* GLICO Signature: selectable theme using the splash screen's shared palette.
   Relative imports support hosting beneath an IIS application path. */
@import url("../../_content/DevExpress.Blazor.Themes/office-white.bs5.min.css");
@import url("./glico-brand-theme.css");
@import url("./glico-theme-common.css");
/* Custom navigation skin disabled; use the standard DevExpress navigation. */

:root {

    color-scheme: light;
    --glico-primary: var(--brand-primary);
    --glico-primary-rgb: var(--brand-primary-rgb);
    --glico-primary-light: var(--brand-highlight);
    --glico-primary-dark: var(--brand-secondary);
    --glico-primary-darker: #14265e;
    --glico-app-bg: var(--brand-background);
    --glico-body-bg: var(--brand-background);
    /* Use the same artwork as the startup splash. */
    --glico-body-bg-image: var(--brand-background-art);
    --glico-body-text: var(--brand-text);
    --glico-surface-bg: var(--brand-surface);
    --glico-surface-subtle: #edf1fa;
    --glico-surface-muted: #e8edf7;
    --glico-text-color: var(--brand-text);
    --glico-text-muted: #586580;
    --glico-border-color: #d6deed;
    --glico-focus-ring: #253f9140;
    --glico-shadow-sm: 0 3px 14px #17254210;
    --bs-body-bg: var(--brand-background);
    --bs-body-color: var(--brand-text);
    --bs-border-color: var(--glico-border-color);
}

/* Workspace background; navigation retains the standard DevExpress styling. */
html :is(#main-window-template-component, #main-ribbon-window-template-component) {
    background: var(--glico-app-bg);
}

html :is(#main-window-template-component, #main-ribbon-window-template-component) .header {
    background: linear-gradient(110deg, #ffffff, #edf1fa);
    color: #172542;
    /* Keep the header clean; branding remains in tabs and the workspace artwork. */
    border-bottom: 0;
    box-shadow: 0 2px 12px #17254210;
}

html :is(#main-window-template-component, #main-ribbon-window-template-component) .main-content {
    background: var(--glico-body-bg-image), var(--glico-app-bg);
    background-repeat: no-repeat;
    background-size: cover;
}

/* The decoration belongs to the workspace. Editors and actions stay on opaque
   white panels, so labels remain readable over the dark diagonal accent. */
html :is(#main-window-template-component, #main-ribbon-window-template-component) :is(.detail-view-content, .main-toolbar) {
    background-color: var(--brand-surface);
    color: var(--brand-text);
    border-radius: 10px;
    box-shadow: 0 6px 22px #17254210;
}
html :is(#main-window-template-component, #main-ribbon-window-template-component) .detail-view-content {
    border-top: 2px solid var(--brand-primary);
}

/* White data surfaces and a blue-tinted header preserve readability of dense tables. */
html body .dxbl-grid {
    --dxbl-grid-header-bg: #edf1fa;
    --dxbl-grid-header-color: #253f91;
    --dxbl-grid-hover-bg: #253f910c;
    --dxbl-grid-selection-bg: #dae4fa;
    --dxbl-grid-selection-color: #172542;
    --dxbl-grid-selection-focus-bg: #cbdaf7;
    --dxbl-grid-selection-focus-color: #172542;
    border-radius: 10px;
    box-shadow: 0 6px 22px #17254210;
}

html body .dxbl-tabs {
    --dxbl-tabs-tab-selected-bg: #253f91;
    --dxbl-tabs-tab-selected-color: #ffffff;
    --dxbl-tabs-tab-selected-element-bg: #e71920;
    --dxbl-tabs-tab-hover-bg: #e8eefb;
    --dxbl-tabs-tab-hover-color: #1c3276;
}
html body .dxbl-tabs .dxbl-tabs-item.dxbl-active
{
    background-color: #253f91;
    color: #ffffff;
}
html body .dxbl-tabs .dxbl-tabs-item.dxbl-active .dxbl-text { color: #ffffff; }

/* Document tabs use bold text instead of a coloured selection. Target the XAF
   header template so the form's inner section tabs keep their existing style. */
html body .xaf-tabbed-mdi .dxbl-tabs-item.dxbl-active:has(.xaf-tab-header-template) {
    --dxbl-tabs-tab-selected-bg: transparent;
    --dxbl-tabs-tab-selected-color: var(--brand-text);
    --dxbl-tabs-tab-selected-element-bg: transparent;
    background-color: transparent;
    color: var(--brand-text);
}
html body .xaf-tabbed-mdi .dxbl-tabs-item.dxbl-active:has(.xaf-tab-header-template)::after {
    /* Override the shared theme's important blue selection indicator. */
    background-color: transparent !important;
}
html body .xaf-tabbed-mdi .dxbl-tabs-item.dxbl-active:has(.xaf-tab-header-template) .dxbl-text,
html body .xaf-tabbed-mdi .dxbl-tabs-item.dxbl-active .xaf-tab-header-template {
    color: var(--brand-text);
    font-weight: 700;
}

html body .dxbl-btn.dxbl-btn-primary {
    --dxbl-btn-bg: #253f91;
    --dxbl-btn-color: #ffffff;
    --dxbl-btn-hover-bg: #1c3276;
    --dxbl-btn-hover-color: #ffffff;
    --dxbl-btn-border-color: #253f91;
}
html body .dxbl-pager {
    --dxbl-pager-active-page-btn-bg: #253f91;
    --dxbl-pager-active-page-btn-color: #ffffff;
    --dxbl-pager-active-page-btn-border-color: #253f91;
}

/* Keyboard focus remains visible against both light panels and blue tabs. */
html body :is(.dxbl-btn, .xaf-nav-link):focus-visible {
    outline: 2px solid #253f91;
    outline-offset: 3px;
}

/* GLICO's reference palette pairs blue navigation with red calls to action. */
html body .dxbl-btn.dxbl-btn-primary,
html body .btn-primary {
    --dxbl-btn-bg: #c90000;
    --dxbl-btn-border-color: #c90000;
    --dxbl-btn-hover-bg: #a60000;
    --dxbl-btn-hover-border-color: #a60000;
    --dxbl-btn-active-bg: #920000;
    --dxbl-btn-active-border-color: #920000;
    --bs-btn-bg: #c90000;
    --bs-btn-border-color: #c90000;
    --bs-btn-hover-bg: #a60000;
    --bs-btn-hover-border-color: #a60000;
    --bs-btn-active-bg: #920000;
    --bs-btn-active-border-color: #920000;
    color: #ffffff;
    background-color: #c90000;
    border-color: #c90000;
}
html body :is(.dxbl-btn.dxbl-btn-primary, .btn-primary):hover
{
    background-color: #a60000;
    border-color: #a60000;
}
