/*
 * BinikStock V599 — canonical sitewide header and footer chrome.
 * Change the variables below to update every supported site header/footer.
 */
:root {
  --bs-site-header-height: 68px;
  --bs-site-header-height-mobile: 64px;
  --bs-site-logo-width: 190px;
  --bs-site-logo-max-height: 34px;
  --bs-site-logo-width-mobile: 164px;
  --bs-site-logo-max-height-mobile: 30px;
  --bs-site-header-surface: #ffffff;
  --bs-site-footer-surface: #f4f7fb;
  --bs-site-ink: #071427;
  --bs-site-muted: #43536e;
  --bs-site-purple: #6045ff;
  --bs-site-line: #d9e2ef;
  --bs-site-purple-filter: brightness(0) saturate(100%) invert(34%) sepia(98%) saturate(4920%) hue-rotate(246deg) brightness(102%) contrast(101%);
}

/* Customer Account uses a more specific legacy selector; keep it in the same chain. */
html body .bs-v388-account > .bs-cdash-header {
  height: var(--bs-site-header-height) !important;
  min-height: var(--bs-site-header-height) !important;
  background: var(--bs-site-header-surface) !important;
  background-color: var(--bs-site-header-surface) !important;
  background-image: none !important;
  color: var(--bs-site-ink) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bs-site-line) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045) !important;
}

/* Shared white header surface: public, account, legal and dashboard. */
html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) {
  width: 100% !important;
  height: var(--bs-site-header-height) !important;
  min-height: var(--bs-site-header-height) !important;
  background: var(--bs-site-header-surface) !important;
  background-color: var(--bs-site-header-surface) !important;
  background-image: none !important;
  color: var(--bs-site-ink) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bs-site-line) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Match the specificity of legacy context-specific header layers. */
html body .iconsol-header.binikstock-v170-global-header,
html body .binikstock-v170-global-header.iconsol-v90-account-site-header,
html body.page-template-template-policy .binikstock-v170-global-header.bs-legal-site-header,
html body.home .bs-home-v156 > .binikstock-v170-global-header,
html body.front-page .bs-home-v156 > .binikstock-v170-global-header {
  height: var(--bs-site-header-height) !important;
  min-height: var(--bs-site-header-height) !important;
  background: var(--bs-site-header-surface) !important;
  background-color: var(--bs-site-header-surface) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--bs-site-line) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
)::before,
html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Public/account/legal navigation uses the Contributor Dashboard height. */
html body .binikstock-v170-global-header > .iconsol-container.iconsol-nav,
html body .iconsol-v90-account-site-header > .iconsol-container.iconsol-nav,
html body.page-template-template-policy .bs-legal-site-header > .iconsol-container.iconsol-nav {
  width: min(calc(100% - 64px), 1760px) !important;
  max-width: 1760px !important;
  height: var(--bs-site-header-height) !important;
  min-height: var(--bs-site-header-height) !important;
  margin-inline: auto !important;
  padding-block: 0 !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
) :is(.iconsol-menu a, .iconsol-actions a, .signin, .signup) {
  color: var(--bs-site-ink) !important;
  -webkit-text-fill-color: var(--bs-site-ink) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
) :is(.iconsol-menu a, .iconsol-actions a):hover {
  color: var(--bs-site-purple) !important;
  -webkit-text-fill-color: var(--bs-site-purple) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) :is(.binikstock-logo-img, .bs-cdash-logo img) {
  filter: var(--bs-site-purple-filter) !important;
}

/* One compact logo measurement for every header implementation. */
html body .binikstock-v170-global-header .iconsol-logo,
html body .iconsol-v90-account-site-header .iconsol-logo,
html body.page-template-template-policy .bs-legal-site-header .iconsol-logo,
html body .bs-cdash-header .bs-cdash-logo,
html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo {
  width: var(--bs-site-logo-width) !important;
  max-width: var(--bs-site-logo-width) !important;
  min-width: 0 !important;
}

html body .binikstock-v170-global-header .iconsol-logo img,
html body .binikstock-v170-global-header .iconsol-logo .binikstock-logo-img,
html body .iconsol-v90-account-site-header .iconsol-logo img,
html body .iconsol-v90-account-site-header .iconsol-logo .binikstock-logo-img,
html body.page-template-template-policy .bs-legal-site-header .iconsol-logo img,
html body.page-template-template-policy .bs-legal-site-header .iconsol-logo .binikstock-logo-img,
html body .bs-cdash-header .bs-cdash-logo img,
html body .bs-cdash-header .bs-cdash-logo .binikstock-logo-img,
html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo img,
html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo .binikstock-logo-img {
  display: block !important;
  width: var(--bs-site-logo-width) !important;
  max-width: var(--bs-site-logo-width) !important;
  height: auto !important;
  max-height: var(--bs-site-logo-max-height) !important;
  object-fit: contain !important;
  filter: var(--bs-site-purple-filter) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) :is(.iconsol-logo strong, .iconsol-logo span:not(.iconsol-logo-mark), .bs-cdash-logo-text, .bs-cdash-logo-text b) {
  color: var(--bs-site-purple) !important;
  -webkit-text-fill-color: var(--bs-site-purple) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
) .menu-toggle {
  border-color: var(--bs-site-line) !important;
  background: #fff !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
) .menu-toggle span {
  background: var(--bs-site-ink) !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header
) :is(.iconsol-v90-header-search, .iconsol-v105-header-search, .iconsol-v88-search-toggle) {
  border-color: var(--bs-site-line) !important;
  background: #f8fafc !important;
  color: var(--bs-site-ink) !important;
}

/* Keep real profile photography unchanged on the new light surface. */
html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) :is(
  .iconsol-v88-avatar-btn img,
  .iconsol-v88-avatar-img,
  .iconsol-header-avatar,
  .bs-cdash-avatar img,
  .bs-cdash-avatar .avatar
) {
  filter: none !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) :is(.iconsol-v88-avatar-btn, .bs-cdash-avatar) {
  box-shadow: none !important;
}

html body :is(
  .binikstock-v170-global-header,
  .iconsol-v90-account-site-header,
  .bs-legal-site-header,
  .bs-cdash-header
) :is(.iconsol-v88-avatar-btn img, .bs-cdash-avatar img, .bs-cdash-avatar .avatar) {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 1px var(--bs-site-line) !important;
}

/* Canonical plain blue-gray footer across every supported layout. */
html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
) {
  width: 100% !important;
  background: var(--bs-site-footer-surface) !important;
  background-color: var(--bs-site-footer-surface) !important;
  background-image: none !important;
  color: var(--bs-site-ink) !important;
  border-top: 1px solid var(--bs-site-line) !important;
  box-shadow: none !important;
}

html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
)::before,
html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
}

html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
) :is(h3, h4, p, a, .footer-copy, .binikstock-v167-footer-copy, .bs-legal-footer-bottom) {
  color: var(--bs-site-ink) !important;
  -webkit-text-fill-color: var(--bs-site-ink) !important;
}

html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
) a:hover {
  color: var(--bs-site-purple) !important;
  -webkit-text-fill-color: var(--bs-site-purple) !important;
}

html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
) :is(.footer-copy, .binikstock-v167-footer-copy, .bs-legal-footer-bottom) {
  border-top-color: var(--bs-site-line) !important;
}

html body :is(
  .footer.binikstock-v167-global-footer,
  .bs-v156-footer,
  .bs-legal-footer
) :is(.binikstock-logo-img, .binikstock-v167-footer-logo img, .bs-legal-footer-logo img) {
  filter: var(--bs-site-purple-filter) !important;
}

@media (max-width: 760px) {
  html body :is(
    .binikstock-v170-global-header,
    .iconsol-v90-account-site-header,
    .bs-legal-site-header,
    .bs-cdash-header
  ) {
    height: var(--bs-site-header-height-mobile) !important;
    min-height: var(--bs-site-header-height-mobile) !important;
  }

  html body .bs-v388-account > .bs-cdash-header {
    height: var(--bs-site-header-height-mobile) !important;
    min-height: var(--bs-site-header-height-mobile) !important;
    background: var(--bs-site-header-surface) !important;
    background-color: var(--bs-site-header-surface) !important;
  }

  html body .binikstock-v170-global-header .iconsol-logo,
  html body .iconsol-v90-account-site-header .iconsol-logo,
  html body.page-template-template-policy .bs-legal-site-header .iconsol-logo,
  html body .bs-cdash-header .bs-cdash-logo,
  html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo,
  html body .binikstock-v170-global-header .iconsol-logo img,
  html body .binikstock-v170-global-header .iconsol-logo .binikstock-logo-img,
  html body .iconsol-v90-account-site-header .iconsol-logo img,
  html body .iconsol-v90-account-site-header .iconsol-logo .binikstock-logo-img,
  html body.page-template-template-policy .bs-legal-site-header .iconsol-logo img,
  html body.page-template-template-policy .bs-legal-site-header .iconsol-logo .binikstock-logo-img,
  html body .bs-cdash-header .bs-cdash-logo img,
  html body .bs-cdash-header .bs-cdash-logo .binikstock-logo-img,
  html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo img,
  html body .bs-v388-account > .bs-cdash-header .bs-cdash-logo .binikstock-logo-img {
    width: var(--bs-site-logo-width-mobile) !important;
    max-width: var(--bs-site-logo-width-mobile) !important;
    max-height: var(--bs-site-logo-max-height-mobile) !important;
  }

  html body .iconsol-header.binikstock-v170-global-header,
  html body .binikstock-v170-global-header.iconsol-v90-account-site-header,
  html body.page-template-template-policy .binikstock-v170-global-header.bs-legal-site-header,
  html body.home .bs-home-v156 > .binikstock-v170-global-header,
  html body.front-page .bs-home-v156 > .binikstock-v170-global-header {
    height: var(--bs-site-header-height-mobile) !important;
    min-height: var(--bs-site-header-height-mobile) !important;
    background: var(--bs-site-header-surface) !important;
  }

  html body .binikstock-v170-global-header > .iconsol-container.iconsol-nav,
  html body .iconsol-v90-account-site-header > .iconsol-container.iconsol-nav,
  html body.page-template-template-policy .bs-legal-site-header > .iconsol-container.iconsol-nav {
    width: min(calc(100% - 28px), 680px) !important;
    height: auto !important;
    min-height: var(--bs-site-header-height-mobile) !important;
    grid-template-rows: var(--bs-site-header-height-mobile) auto !important;
  }

  html body :is(
    .binikstock-v170-global-header,
    .iconsol-v90-account-site-header,
    .bs-legal-site-header
  ).is-menu-open {
    height: auto !important;
  }

  html body.home .bs-home-v156 > .binikstock-v170-global-header.is-menu-open,
  html body.front-page .bs-home-v156 > .binikstock-v170-global-header.is-menu-open {
    height: auto !important;
    min-height: var(--bs-site-header-height-mobile) !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
  }

  html body :is(
    .binikstock-v170-global-header,
    .iconsol-v90-account-site-header,
    .bs-legal-site-header
  ) .iconsol-menu {
    background: #ffffff !important;
    color: var(--bs-site-ink) !important;
    border-color: var(--bs-site-line) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .10) !important;
  }
}
