/*
 * B Shah Impex 8.10.8 — final palette and contrast consistency layer.
 * Loaded after every theme-owned stylesheet. Colours inherit Customizer tokens;
 * readable foregrounds are selected server-side in inc/customizer.php.
 */
:root {
  --border-color: var(--bsi-line, var(--border, #d9e2ed));
}

body.bsi-redesign {
  --primary-color: var(--bsi-brand, #16477f) !important;
  --primary-dark: var(--bsi-brand-deep, #123b68) !important;
  --primary: var(--bsi-brand, #16477f) !important;
  --v50-navy: var(--bsi-brand-deep, #123b68) !important;
  --v50-blue: var(--bsi-brand, #16477f) !important;
  --v50-ink: var(--bsi-ink, #172536) !important;
  --v50-line: var(--bsi-line, #d9e2ed) !important;
  --v45-blue: var(--bsi-brand, #16477f) !important;
  --v45-ink: var(--bsi-ink, #172536) !important;
  --v45-line: var(--bsi-line, #d9e2ed) !important;
  --border-color: var(--bsi-line, #d9e2ed) !important;
  background-color: var(--bsi-page, #f5f7fa) !important;
  color: var(--bsi-ink, #172536) !important;
  font-family: var(--font-main, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif) !important;
}

body.bsi-redesign :is(h1, h2, h3, h4, h5, h6) {
  color: var(--bsi-ink, #172536);
  font-family: var(--font-heading, var(--font-main, system-ui, sans-serif));
}

body.bsi-redesign :is(p, li, blockquote, figcaption) {
  color: var(--bsi-copy, #40566a);
}

body.bsi-redesign a {
  color: var(--bsi-brand, #16477f);
}

body.bsi-redesign a:hover {
  color: var(--bsi-brand-deep, #123b68);
}

/* The brand foreground switches to dark ink for light custom brand colours. */
body.bsi-redesign :is(
  .header-trade-link-v50,
  .bsi-product-search button,
  .portal-button:not(.portal-button-light),
  .bsi-form-submit,
  .bsi-latest-view-all,
  .bsi-profile-primary-action,
  .bsi-article-quote-cta__button,
  .wp-block-button:not(.is-style-outline) .wp-block-button__link,
  .bsi-social-button,
  .bsi-share-button,
  .bsi-quote-dialog [data-bsi-prepare],
  .bsi-share-actions a,
  .mobile-action-bar .whatsapp-btn,
  .b-shah-mobile-bar .whatsapp-btn
) {
  color: var(--bsi-on-brand, #fff) !important;
}

body.bsi-redesign :is(
  .header-trade-link-v50,
  .bsi-product-search button,
  .portal-button:not(.portal-button-light),
  .bsi-form-submit,
  .bsi-latest-view-all,
  .bsi-profile-primary-action,
  .bsi-article-quote-cta__button,
  .wp-block-button:not(.is-style-outline) .wp-block-button__link,
  .bsi-social-button,
  .bsi-share-button,
  .bsi-quote-dialog [data-bsi-prepare],
  .bsi-share-actions a,
  .mobile-action-bar .whatsapp-btn,
  .b-shah-mobile-bar .whatsapp-btn
):hover {
  color: var(--bsi-on-brand-deep, #fff) !important;
}

body.bsi-redesign .trade-topbar-v50 {
  background: var(--bsi-brand-deep, #123b68) !important;
  color: var(--bsi-on-brand-deep, #fff) !important;
}

body.bsi-redesign .trade-topbar-v50 :is(a, span, strong, small) {
  color: var(--bsi-on-brand-deep, #fff) !important;
}

body.bsi-redesign .site-footer-v45 {
  background: var(--bsi-brand-deep, #123b68) !important;
  color: var(--bsi-on-brand-deep, #fff) !important;
}

body.bsi-redesign .site-footer-v45 :is(h1, h2, h3, h4, h5, h6, strong, .footer-brand-mark, p, a, small, address, span) {
  color: var(--bsi-on-brand-deep, #fff) !important;
}

body.bsi-redesign .site-footer-v45 a:hover {
  color: var(--bsi-on-brand-deep, #fff) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer enquiry remains a light button on the dark footer, not light text on white. */
body.bsi-redesign .site-footer-v45 .footer-enquiry-button-v45 {
  background: #fff !important;
  border-color: #fff !important;
  color: var(--bsi-brand-deep, #123b68) !important;
}
body.bsi-redesign .site-footer-v45 .footer-enquiry-button-v45:hover {
  background: var(--bsi-brand-soft, #eef4f9) !important;
  border-color: var(--bsi-brand-soft, #eef4f9) !important;
  color: var(--bsi-brand-deep, #123b68) !important;
}

/* The newsletter panel is a white surface nested in the dark footer. */
body.bsi-redesign .site-footer-v45 .bsi-updates-box {
  background: #fff !important;
  color: var(--bsi-ink, #172536) !important;
}
body.bsi-redesign .site-footer-v45 .bsi-updates-box :is(h1, h2, h3, h4, h5, h6, p, a, small, strong, label, span) {
  color: var(--bsi-brand, #16477f) !important;
}
body.bsi-redesign .site-footer-v45 .bsi-updates-box :is(input, textarea, select) {
  background: #fff !important;
  color: var(--bsi-ink, #172536) !important;
  border-color: #9aabba !important;
}
body.bsi-redesign .site-footer-v45 .bsi-updates-box :is(input, textarea)::placeholder {
  color: #536577 !important;
  opacity: 1;
}
body.bsi-redesign .site-footer-v45 .bsi-updates-box button {
  background: var(--bsi-brand, #16477f) !important;
  border-color: var(--bsi-brand, #16477f) !important;
  color: var(--bsi-on-brand, #fff) !important;
}

/* Light-surface secondary controls keep dark text even when the brand is pale. */
body.bsi-redesign :is(
  .portal-button-light,
  .bsi-card-link,
  .bsi-card-download,
  .bsi-shortlist-open,
  .bsi-save-product,
  .bsi-quote-row button,
  .mobile-action-bar .call-btn
) {
  color: var(--bsi-brand-deep, #123b68) !important;
}

body.bsi-redesign .bsi-quote-dialog {
  background: #fff !important;
  color: var(--bsi-ink, #172536) !important;
}
body.bsi-redesign .bsi-quote-dialog :is(input, textarea, select) {
  color: var(--bsi-ink, #172536) !important;
  background: #fff !important;
}
body.bsi-redesign .bsi-quote-dialog small,
body.bsi-redesign .bsi-product-spec-empty {
  color: var(--bsi-copy, #40566a) !important;
}

/* Use a single visible focus ring across links, form fields and controls. */
body.bsi-redesign :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #94672f !important;
  outline-offset: 3px !important;
  box-shadow: none;
}
body.bsi-redesign :is(input, textarea, select)::placeholder {
  color: #536577;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  body.bsi-redesign *,
  body.bsi-redesign *::before,
  body.bsi-redesign *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
