/* =========================================================================
   Brand-theme recolour layer (shared)
   -------------------------------------------------------------------------
   Active ONLY when App_Code/UI/Page.vb stamps "lc-theme theme-<name>" on the
   <form> -- i.e. when a custom brand theme (Win11 / iOS / macOS)
   is selected in My Account or My Company. Every control still renders with
   the fully-working embedded Telerik "Default" skin; these rules change only
   COLOUR, reading the palette from the per-theme vars file
   (App_Themes/Default/<name>/<name>.css). Structure, sizing, sprites, tab and
   window chrome are all left to the Default skin -- that is what keeps
   comboboxes, tabs, menus and windows intact.

   Palette contract (each theme file sets these on its .theme-<name> class):
     --t-accent      primary accent (buttons, focus, selected day)
     --t-accent-d    darker accent (links, hover text, pressed)
     --t-accent-l    lighter accent (button hover)
     --t-sel-bg      selected row / selected menu+list item background
     --t-hover-bg    hovered row background
     --t-chrome-bg   top nav + footer bar background
     --t-chrome-fg   text on the chrome bar
     --t-chrome-hover chrome item hover background
     --t-focus       box-shadow for focused inputs
   ========================================================================= */

/* ---- Top navigation + footer : branded chrome bar (admin master) ---- */
.lc-theme #ctl00_menuHeader,
.lc-theme #ctl00_menuHeader .rmRootGroup,
.lc-theme #ctl00_menuFooter,
.lc-theme #ctl00_menuFooter .rmRootGroup {
    background: var(--t-chrome-bg) !important;
    border-color: var(--t-chrome-bg) !important;
}
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem > .rmLink,
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem > .rmLink .rmText,
.lc-theme #ctl00_menuFooter .rmText {
    color: var(--t-chrome-fg) !important;
    background: transparent !important;
}
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem > a.rmLink:hover,
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem > a.rmFocused,
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem.rmExpanded > a.rmLink {
    background: var(--t-chrome-hover) !important;
    box-shadow: inset 0 -3px 0 var(--t-accent) !important;
}
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem > a.rmLink:hover .rmText,
.lc-theme #ctl00_menuHeader .rmRootGroup > .rmItem.rmExpanded > a.rmLink .rmText {
    color: #ffffff !important;
}
.lc-theme #ctl00_menuFooter .rmItem > a.rmLink:hover .rmText {
    color: var(--t-accent-l) !important;
}

/* flyout submenus: keep the Default border/shadow shape, recolour hover only */
.lc-theme .RadMenu_Default .rmGroup .rmItem > a.rmLink:hover,
.lc-theme .RadMenu_Default .rmGroup .rmItem > a.rmFocused,
.lc-theme .RadMenu_Default .rmGroup .rmItem.rmExpanded > a.rmLink {
    background: var(--t-sel-bg) !important;
}
.lc-theme .RadMenu_Default .rmGroup .rmItem > a.rmLink:hover .rmText,
.lc-theme .RadMenu_Default .rmGroup .rmItem.rmExpanded > a.rmLink .rmText {
    color: var(--t-accent-d) !important;
}

/* ---- Tabs : keep the Default tab shape, recolour the selected label ---- */
.lc-theme .RadTabStrip_Default .rtsSelected .rtsLink,
.lc-theme .RadTabStrip_Default .rtsSelected .rtsTxt,
.lc-theme .RadTabStrip_Default .rtsLink:hover .rtsTxt {
    color: var(--t-accent-d) !important;
}

/* ---- Buttons : brand fill; Default sizing/padding preserved so text fits -- */
.lc-theme .RadButton_Default {
    background: transparent !important;
    border: 0 !important;
}
.lc-theme .RadButton_Default .rbDecorated,
.lc-theme .RadButton_Default input.rbDecorated {
    background: var(--t-accent) !important;
    background-image: none !important;
    border: 1px solid var(--t-accent-d) !important;
    border-radius: 4px !important;
    color: #ffffff !important;
}
.lc-theme .RadButton_Default .rbDecorated:hover {
    background: var(--t-accent-l) !important;
    color: #ffffff !important;
}
.lc-theme .RadButton_Default .rbDecorated:active {
    background: var(--t-accent-d) !important;
}
.lc-theme .RadButton_Default.rbDisabled .rbDecorated {
    background: #e3e6ea !important;
    border-color: #d0d5da !important;
    color: #9aa0a6 !important;
}

/* ---- Grid : brand selected/hover rows + row links; Default header kept ---- */
.lc-theme .RadGrid_Default .rgSelectedRow,
.lc-theme .RadGrid_Default .rgSelectedRow td {
    background: var(--t-sel-bg) !important;
}
.lc-theme .RadGrid_Default .rgHoveredRow,
.lc-theme .RadGrid_Default .rgHoveredRow td,
.lc-theme .RadGrid_Default .rgActiveRow,
.lc-theme .RadGrid_Default .rgActiveRow td {
    background: var(--t-hover-bg) !important;
}
.lc-theme .RadGrid_Default .rgRow a,
.lc-theme .RadGrid_Default .rgAltRow a {
    color: var(--t-accent-d) !important;
}

/* ---- ComboBox / DropDownList popups : brand selected/hover items ---- */
.lc-theme .RadComboBoxDropDown_Default .rcbHovered,
.lc-theme .RadDropDownListPopup_Default .rddlHovered {
    background: var(--t-sel-bg) !important;
    color: var(--t-accent-d) !important;
}
.lc-theme .RadComboBoxDropDown_Default .rcbHighlighted,
.lc-theme .RadDropDownListPopup_Default .rddlSelected {
    background: var(--t-accent) !important;
    color: #ffffff !important;
}

/* ---- Inputs / combobox : brand focus ring ---- */
.lc-theme .RadInput_Default.riFocused .riTextBox,
.lc-theme .RadComboBox_Default.rcbFocused .rcbInputCell,
.lc-theme .RadComboBox_Default.rcbFocused .rcbArrowCell {
    border-color: var(--t-accent) !important;
    box-shadow: var(--t-focus) !important;
}

/* ---- Calendar : brand selected / hover day ---- */
.lc-theme .RadCalendar_Default .rcSelected,
.lc-theme .RadCalendar_Default .rcSelected a {
    background: var(--t-accent) !important;
    color: #ffffff !important;
}
.lc-theme .RadCalendar_Default .rcHover a {
    background: var(--t-sel-bg) !important;
    color: var(--t-accent-d) !important;
}

/* ---- Primary anchors / form action links ---- */
.lc-theme .buttonContainer a,
.lc-theme #content a.button {
    color: var(--t-accent-d);
}

/* ---- Section header underline accent (edit forms) ---- */
.lc-theme .formContainer .columnLayout .SectionHeader,
.lc-theme .childFormContainer .columnLayout .SectionHeader,
.lc-theme .grandChildFormContainer .columnLayout .SectionHeader {
    border-bottom-color: var(--t-accent) !important;
}

/* ---- Wizard (marketplace onboarding) : brand the progress bar + current step
   and the Next/Finish nav buttons. Class names verified against the rendered
   Default-skin markup (rwzProgressBar / rwzProgress / rwzStep / rwzSelected /
   rwzNav / rwzButton). Scoped to .lc-theme -- colour only, no restructuring. -- */
.lc-theme .rwzProgressBar .rwzProgress {
    background: var(--t-accent) !important;
    border-color: var(--t-accent-d) !important;
}
.lc-theme .rwzStep.rwzSelected,
.lc-theme .rwzStep.rwzActive {
    background: var(--t-sel-bg) !important;
}
.lc-theme .rwzStep.rwzSelected .rwzText,
.lc-theme .rwzStep.rwzSelected .rwzLink,
.lc-theme .rwzStep.rwzActive .rwzText,
.lc-theme .rwzStep.rwzActive .rwzLink {
    color: var(--t-accent-d) !important;
    font-weight: bold !important;
}
.lc-theme .rwzNav .rwzButton {
    background: var(--t-accent) !important;
    background-image: none !important;
    border: 1px solid var(--t-accent-d) !important;
    border-radius: 4px !important;
    color: #ffffff !important;
}
.lc-theme .rwzNav .rwzButton:hover {
    background: var(--t-accent-l) !important;
    color: #ffffff !important;
}

/* ---- TileList (dashboard role tiles) : brand hover + tile links ---- */
.lc-theme .RadTileList_Default .rtileContent:hover {
    box-shadow: var(--t-focus) !important;
}
.lc-theme .RadTileList_Default .rtileContent a {
    color: var(--t-accent-d) !important;
}

/* ---- Popup windows : the frame takes the chrome bar's colours ----
   Owner 2026-11-22: window frames follow the selected theme like the page.
   A RadWindow is drawn inside the <form>, so the form's lc-theme class reaches
   it in every mode: Classic popups on a page, and the Windows-mode shell
   (Scripts/windowManager.js copies the framed page's theme classes onto the
   shell's form). The Default skin draws the frame from sprites on its table
   cells; a flat chrome fill replaces them, the title takes the chrome text
   colour and the dark button glyphs are inverted so they stay readable. The
   site favicon (rwIcon) keeps its own colours. -- */
.lc-theme .RadWindow_Default td.rwCorner,
.lc-theme .RadWindow_Default td.rwTitlebar,
.lc-theme .RadWindow_Default td.rwStatusbar,
.lc-theme .RadWindow_Default td.rwFooterCenter {
    background: var(--t-chrome-bg) !important;
}
.lc-theme .RadWindow_Default .rwTopResize {
    background: transparent !important;
}
.lc-theme .RadWindow_Default .rwTitlebarControls em {
    color: var(--t-chrome-fg) !important;
}
.lc-theme .RadWindow_Default .rwControlButtons a {
    filter: invert(1);
}
.lc-theme .RadWindow_Default.rwInactiveWindow .rwTitlebarControls em,
.lc-theme .RadWindow_Default.rwInactiveWindow .rwControlButtons a {
    opacity: 0.7;
}
