/* =============================================================================================
   TENANT BRAND (21 Oct 2026) - the colours, font and header logo of a tenant with its own brand
   (today only Enviromall).

   ⚠ SPL AND FSM NEVER LOAD THIS FILE. The iSuppli and Warehouse layouts (and their login layouts)
   link it, together with a :root block of --brand-* custom properties written from
   SPF.Common.Constants.TenantBrand.CssVariables(), and put class "tenant-brand" on <body>, ONLY when
   TenantBrand.UsesSplLook is false. So nothing here can change an SPL or FSM page.

   Loaded AFTER antworks.css. Every rule is scoped under body.tenant-brand, and the rules that
   antworks.css scopes to a shell (body.spl-shell-isuppli / body.spl-shell-warehouse / body.spl-login)
   are scoped to the same shell PLUS tenant-brand, so they win on specificity, not only on order.
   The fallbacks in var() are Enviromall's values, so a page that somehow lost the :root block still
   looks like Enviromall rather than like nothing.

   Error colours (.alert-danger, .has-error, text-danger) stay red on purpose: an error is not brand.
   ============================================================================================= */

/* --- 1. Font: Open Sans everywhere antworks.css names Inter or the theme names Roboto ----------- */
body.tenant-brand,
body.tenant-brand .navbar,
body.tenant-brand .sidebar,
body.tenant-brand .page-header,
body.tenant-brand .lg-card,
body.tenant-brand .popover,
body.tenant-brand h1, body.tenant-brand h2, body.tenant-brand h3,
body.tenant-brand h4, body.tenant-brand h5, body.tenant-brand h6 {
    font-family: var(--brand-font, 'Open Sans', sans-serif);
}

body.tenant-brand {
    color: var(--brand-text, #404040);
}

/* --- 2. Buttons: the primary colour, its hover shade, and the disabled state -------------------
   The disabled list mirrors bootstrap's (antworks.css section 1 explains why it is not optional:
   a disabled primary button otherwise stays the vendor blue). */
body.tenant-brand .btn-primary {
    background-color: var(--brand-primary, #2A6B33);
    border-color: var(--brand-primary, #2A6B33);
    color: #ffffff;
}

body.tenant-brand .btn-primary:hover,
body.tenant-brand .btn-primary:focus,
body.tenant-brand .btn-primary.focus,
body.tenant-brand .btn-primary:active,
body.tenant-brand .btn-primary.active {
    background-color: var(--brand-primary-hover, #1F5026);
    border-color: var(--brand-primary-hover, #1F5026);
    color: #ffffff;
}

body.tenant-brand .btn-primary.disabled,
body.tenant-brand .btn-primary[disabled],
body.tenant-brand fieldset[disabled] .btn-primary,
body.tenant-brand .btn-primary.disabled:hover,
body.tenant-brand .btn-primary[disabled]:hover,
body.tenant-brand fieldset[disabled] .btn-primary:hover,
body.tenant-brand .btn-primary.disabled:focus,
body.tenant-brand .btn-primary[disabled]:focus,
body.tenant-brand fieldset[disabled] .btn-primary:focus,
body.tenant-brand .btn-primary.disabled.focus,
body.tenant-brand .btn-primary[disabled].focus,
body.tenant-brand fieldset[disabled] .btn-primary.focus,
body.tenant-brand .btn-primary.disabled:active,
body.tenant-brand .btn-primary[disabled]:active,
body.tenant-brand fieldset[disabled] .btn-primary:active,
body.tenant-brand .btn-primary.disabled.active,
body.tenant-brand .btn-primary[disabled].active,
body.tenant-brand fieldset[disabled] .btn-primary.active {
    background-color: var(--brand-primary, #2A6B33);
    border-color: var(--brand-primary, #2A6B33);
}

body.tenant-brand .btn:focus,
body.tenant-brand .btn:active:focus {
    box-shadow: 0 0 0 3px var(--brand-focus, rgba(42, 107, 51, 0.18));
}

body.tenant-brand .pagination > .active > a,
body.tenant-brand .pagination > .active > a:focus {
    background: var(--brand-primary, #2A6B33);
    border-color: var(--brand-primary, #2A6B33);
}

/* --- 3. Forms: the focus ring (an accessibility fix in antworks.css section 4 - kept, recoloured) */
body.tenant-brand .form-control:focus,
body.tenant-brand textarea.form-control:focus,
body.tenant-brand select.form-control:focus,
body.tenant-brand .lg-field input:focus {
    border-color: var(--brand-primary, #2A6B33);
    box-shadow: 0 0 0 3px var(--brand-focus, rgba(42, 107, 51, 0.18));
    outline: 0;
}

body.tenant-brand .lg-field .require { color: var(--brand-primary, #2A6B33); }
body.tenant-brand .lg-card h1,
body.tenant-brand .lg-field label,
body.tenant-brand .lg-field input { color: var(--brand-text, #404040); }

/* --- 4. Rules and tabs ------------------------------------------------------------------------- */
body.tenant-brand .panel-default > .panel-heading { border-color: var(--brand-accent, #80A848); }

body.tenant-brand .nav-tabs > li.active > a,
body.tenant-brand .nav-tabs > li.active > a:hover,
body.tenant-brand .nav-tabs > li.active > a:focus {
    border-top-color: var(--brand-primary, #2A6B33);
    color: var(--brand-text, #404040);
}

body.tenant-brand .navbar-inverse .navbar-nav > .active > a,
body.tenant-brand .navbar-inverse .navbar-nav > .active > a:hover,
body.tenant-brand .navbar-inverse .navbar-nav > .open > a {
    box-shadow: inset 3px 0 0 var(--brand-accent, #80A848);
}

/* --- 5. The sign-in pages (body.spl-login): the dark bar in the website's teal, behind the white
   logo; the page on the website's light grey instead of the grey polygons. --------------------- */
body.tenant-brand.spl-login { background-color: var(--brand-page-bg, #F3F3F3); }

body.tenant-brand.spl-login .navbar-inverse {
    background: var(--brand-secondary, #498C83);
    border-color: var(--brand-secondary, #498C83);
}

body.tenant-brand.spl-login .smartparts-background,
body.tenant-brand.spl-login .page-container,
body.tenant-brand.spl-login .content-wrapper {
    background-color: var(--brand-page-bg, #F3F3F3);
    background-image: none;
}

/* --- 6. The header logo. The SPL mark is a compact 22px square; the Enviromall mark is a wide
   band (swooshes + wordmark + tagline, 400x110), so it needs more height to stay legible.
   ⚠ Not yet seen rendered - check on the Enviromall lab site. */
body.tenant-brand .navbar .navbar-brand > img.spl-nav-mark {
    height: 34px;
    width: auto;
    max-height: none;
    margin: 0 12px 0 0;
}

body.tenant-brand.spl-login .navbar .navbar-brand {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* --- 7. The white header and the menu (iSuppli = antworks.css section 25, Big Brother = 26) ----- */
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-brand,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-brand:hover,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text a,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text label,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text i,
body.tenant-brand.spl-shell-isuppli .navbar .spl-nav-title,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-brand,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-brand:hover,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text a,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text label,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text i,
body.tenant-brand.spl-shell-warehouse .navbar .spl-nav-title {
    color: var(--brand-text, #404040);
}

body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text a:hover,
body.tenant-brand.spl-shell-isuppli .navbar-inverse .navbar-text label:hover,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text a:hover,
body.tenant-brand.spl-shell-warehouse .navbar-inverse .navbar-text label:hover {
    color: var(--brand-primary, #2A6B33);
}

/* The sister-product pill (Returns). Hidden for Enviromall today (ShowMenuSections is SPL only);
   recoloured anyway so it can never appear in SPL red. */
body.tenant-brand .navbar .spl-sister-link i { color: var(--brand-accent, #80A848); }
body.tenant-brand .navbar .spl-sister-link:hover,
body.tenant-brand .navbar .spl-sister-link:focus {
    border-color: var(--brand-primary, #2A6B33);
    color: var(--brand-primary, #2A6B33);
}

/* The account avatar: the primary colour (white on #2A6B33 reads; white on the leaf green would not). */
body.tenant-brand.spl-shell-isuppli .navbar .spl-avatar,
body.tenant-brand.spl-shell-warehouse .navbar .spl-avatar {
    background: var(--brand-primary, #2A6B33);
    color: #ffffff;
}

body.tenant-brand.spl-shell-isuppli .navbar .spl-account:hover .spl-avatar,
body.tenant-brand.spl-shell-isuppli .navbar .spl-account:focus .spl-avatar,
body.tenant-brand.spl-shell-warehouse .navbar .spl-account:hover .spl-avatar,
body.tenant-brand.spl-shell-warehouse .navbar .spl-account:focus .spl-avatar {
    box-shadow: 0 0 0 3px var(--brand-focus, rgba(42, 107, 51, 0.18));
}

/* Menu: hover text and the current item's pale wash in the brand instead of SPL red. */
body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li > a:hover,
body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li > a:focus,
body.tenant-brand.spl-shell-isuppli .sidebar .navigation li ul li a:hover,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li > a:hover,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li > a:focus,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation li ul li a:hover,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation li ul li a:focus {
    color: var(--brand-primary, #2A6B33);
}

body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li.active > a,
body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li.active > a:hover,
body.tenant-brand.spl-shell-isuppli .sidebar .navigation li.active > a,
body.tenant-brand.spl-shell-isuppli .sidebar .navigation li ul li.active > a,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li.active > a,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li.active > a:hover,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation li ul li.active > a {
    background: var(--brand-tint, #E4EFE7);
    color: var(--brand-primary, #2A6B33);
}

body.tenant-brand.spl-shell-isuppli .sidebar .navigation li.active > a > i,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation li.active > a > i {
    color: var(--brand-primary, #2A6B33);
}

body.tenant-brand .sidebar .navigation > li.active > a,
body.tenant-brand .sidebar .navigation > li > a:hover {
    border-left-color: transparent;
}

/* Page titles and the account menu card: the brand's text colour instead of SPL charcoal. */
body.tenant-brand.spl-shell-isuppli .page-header .page-title h4,
body.tenant-brand.spl-shell-warehouse .page-header .page-title h4,
body.tenant-brand.spl-shell-isuppli .navbar .popover,
body.tenant-brand.spl-shell-warehouse .navbar .popover {
    color: var(--brand-text, #404040);
}

/* --- 8. The footer line (the layouts' footer was empty; Enviromall's carries the copyright) ----- */
body.tenant-brand .footer .tenant-footer {
    color: #6f6f6f;
    font-size: 12.5px;
}

body.tenant-brand .footer .tenant-footer a { color: var(--brand-primary, #2A6B33); }

/* 21 Oct 2026 lab look (envirolab): the sign-in page's "Forgotten your password?" kept SPL red, and the footer line sat
   against the left edge on a phone. Enviromall only (body.tenant-brand). */
body.tenant-brand .lg-links a,
body.tenant-brand .lg-links a:visited { color: var(--brand-primary, #2A6B33); }
body.tenant-brand .lg-links a:hover,
body.tenant-brand .lg-links a:focus { color: var(--brand-primary-hover, #1F5026); }
body.tenant-brand .footer { padding-left: 16px; padding-right: 16px; text-align: center; }
/* 22 Oct: the login footer is position:absolute; bottom:20px in the shared login CSS, so on a phone (375 px) its longer
   Enviromall line sat over the bottom 22 px of the sign-in card. Enviromall: in the page flow, under the card. */
body.tenant-brand .footer { position: static; margin: 20px 0 24px; }

/* --- 9. 23 Oct 2026 (cmcox T359: "icons are still red"). Measured signed in on envirolab (tools\enviromall_page_walk.js):
   every link - so the back arrow at the top of every page - was SPL red (antworks.css section 9 sets a { color:#C4152A }),
   the home page's round icon badges were SPL red on pink (Views\Home\Main.cshtml's own <style>), and so was the order
   tracking page (SPLOrderTracking.cshtml's own <style>). Enviromall only. */

/* Links. :where() keeps this rule at the specificity of antworks' bare "a" (it wins by loading later), so every more
   specific link colour - buttons, the menu, the header - keeps its own. */
:where(body.tenant-brand) a,
:where(body.tenant-brand) a:visited { color: var(--brand-primary, #2A6B33); }
:where(body.tenant-brand) a:hover,
:where(body.tenant-brand) a:focus { color: var(--brand-primary-hover, #1F5026); }

/* The home page tiles (Main.cshtml). */
body.tenant-brand .sp-tile .ic { background: var(--brand-tint, #E4EFE7); color: var(--brand-primary, #2A6B33); }
body.tenant-brand .sp-tile.sp-primary .ic { background: var(--brand-primary, #2A6B33); color: #ffffff; }
body.tenant-brand .sp-tile:hover,
body.tenant-brand .sp-tile:focus { border-color: var(--brand-primary, #2A6B33); }
body.tenant-brand .sp-tile:focus { box-shadow: 0 0 0 3px var(--brand-focus, rgba(42, 107, 51, 0.18)); }

/* Order tracking (SPLOrderTracking.cshtml): progress line, done steps, document links, buttons. The notice box keeps
   the brand colour too - it is information, not an error. */
body.tenant-brand .oj-alert { background: var(--brand-tint, #E4EFE7); border-left-color: var(--brand-primary, #2A6B33); color: var(--brand-text, #404040); }
body.tenant-brand .oj-fill,
body.tenant-brand .oj-step.done .oj-dot { background: var(--brand-primary, #2A6B33); }
body.tenant-brand .oj-block .doc a,
body.tenant-brand .oj-cand button { color: var(--brand-primary, #2A6B33); }
body.tenant-brand .oj-btn { background: var(--brand-primary, #2A6B33); color: #ffffff; }
body.tenant-brand .oj-btn:hover { background: var(--brand-primary-hover, #1F5026); color: #ffffff; }
body.tenant-brand .oj-btn-ghost { background: transparent; color: var(--brand-primary, #2A6B33); border-color: var(--brand-primary, #2A6B33); }
body.tenant-brand .oj-btn-ghost:hover { background: var(--brand-primary, #2A6B33); color: #ffffff; }

/* Menu hover/focus washes antworks 25c/26b paint SPL pink (#fef2f3) and SPL red text. */
body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li > a:focus,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li > a:focus { color: var(--brand-primary, #2A6B33); }
body.tenant-brand.spl-shell-isuppli .sidebar .navigation > li.active > a:hover,
body.tenant-brand.spl-shell-warehouse .sidebar .navigation > li.active > a:hover { background: var(--brand-tint, #E4EFE7); color: var(--brand-primary, #2A6B33); }
body.tenant-brand .navbar .spl-product-switcher .spl-product-current { background: var(--brand-primary, #2A6B33); }

/* The footer line. .page-container is a CSS table (the theme), so a footer after .page-content became a cell as wide as
   the menu column - the line broke into three under the menu. As the table's caption it spans the whole page. */
body.tenant-brand.spl-shell-isuppli .page-container > .footer,
body.tenant-brand.spl-shell-warehouse .page-container > .footer { display: table-caption; caption-side: bottom; text-align: center; }
