:root {
  --bs-primary: #c55012;
  --bs-primary-rgb: 197, 80, 18;
  --bs-link-color: #b84a10;
  --bs-link-color-rgb: 184, 74, 16;
  --bs-link-hover-color: #8d360a;
  --bs-link-hover-color-rgb: 141, 54, 10;
  --bs-body-color: #24323a;
  --bs-body-color-rgb: 36, 50, 58;
  --bs-secondary-color: #647178;
}

.breadcrumb {
  --bs-breadcrumb-font-size: .875rem;
}

/* Bootstrap has no utility for the anchor offset below a sticky header. */
.pump-category-page #models,
.pump-category-page .catalog-model-anchor {
  scroll-margin-top: 5.5rem;
}

.navbar-nav {
  --bs-nav-link-hover-color: var(--bs-primary);
}

/* Bootstrap exposes pressed dropdown colors through component variables. */
.navbar-nav .dropdown-menu {
  --bs-dropdown-link-active-color: var(--bs-primary);
  --bs-dropdown-link-active-bg: var(--bs-light);
}

.btn-primary {
  --bs-btn-bg: #c55012;
  --bs-btn-border-color: #c55012;
  --bs-btn-hover-bg: #a6400e;
  --bs-btn-hover-border-color: #a6400e;
  --bs-btn-active-bg: #8d360a;
  --bs-btn-active-border-color: #8d360a;
  --bs-btn-disabled-bg: #c55012;
  --bs-btn-disabled-border-color: #c55012;
  --bs-btn-focus-shadow-rgb: 197, 80, 18;
}

.btn-outline-primary {
  --bs-btn-color: #b84a10;
  --bs-btn-border-color: #c55012;
  --bs-btn-hover-bg: #c55012;
  --bs-btn-hover-border-color: #c55012;
  --bs-btn-active-bg: #8d360a;
  --bs-btn-active-border-color: #8d360a;
  --bs-btn-focus-shadow-rgb: 197, 80, 18;
}

/* Bootstrap does not provide a utility for a branded background image. */
.wrs-hero {
  min-height: 0;
  overflow: hidden;
  background: #f3f6f7;
}

@media (min-width: 1200px) {
  .wrs-hero {
    min-height: 430px;
    background:
      linear-gradient(90deg, rgba(247, 249, 249, .98) 0%, rgba(247, 249, 249, .95) 44%, rgba(247, 249, 249, .2) 72%),
      url('/img/wrs-hero-pump-testbench-v3.webp') center right / auto 100% no-repeat;
  }
}

/* Fixed layout is retained for the desktop and compact technical tables. */
.table-fixed {
  table-layout: fixed;
}

.pump-category-page .table-fixed th,
.pump-category-page .table-fixed td {
  overflow-wrap: anywhere;
}

/* Model marking only: Bootstrap has no content-aware column width utilities. */
.pump-marking-table > thead > tr > th:first-child {
  width: clamp(2rem, 5vw, 3.75rem);
}

.pump-marking-table > thead > tr > th:nth-child(2) {
  width: 24%;
}

.pump-marking-table > :is(thead, tbody) > tr > :nth-child(n+2) {
  text-align: left;
}

/* Bootstrap has no utility for a sticky table column with an opaque striped background. */
.pump-model-scroll .pump-model-table {
  width: var(--wrs-model-table-width);
  min-width: 100%;
}

.pump-model-scroll .pump-model-table > thead > tr:first-child > :first-child,
.pump-model-scroll .pump-model-table > tbody > tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--bs-table-bg);
  border-right: 1px solid var(--bs-border-color);
}

.pump-model-scroll .pump-model-table > thead > tr:first-child > :first-child {
  z-index: 2;
}

/* Bootstrap provides scrolling; intrinsic column sizing keeps technical words intact. */
@media (max-width: 1199.98px) {
  .catalog-parameter-scroll > .table-fixed {
    width: 100%;
    table-layout: auto;
  }

  .catalog-parameter-scroll > .table-fixed th,
  .catalog-parameter-scroll > .table-fixed td {
    overflow-wrap: normal;
  }

  .catalog-parameter-scroll > .table-fixed > thead > tr:first-child > :first-child {
    width: auto !important;
  }

  .catalog-parameter-scroll > .catalog-parameter-pair > thead > tr > :first-child,
  .catalog-parameter-scroll > .catalog-parameter-pair > tbody > tr > :first-child {
    width: 40% !important;
  }

  .catalog-parameter-scroll > .table-fixed > thead > tr:first-child > :first-child,
  .catalog-parameter-scroll > .table-fixed > tbody > tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--bs-table-bg);
    border-right: 1px solid var(--bs-border-color);
  }

  .catalog-parameter-scroll > .table-fixed > thead > tr:first-child > :first-child {
    z-index: 2;
  }

  /* A merged value remains readable beside the pinned label while other columns scroll. */
  .catalog-parameter-scroll .catalog-cell-content {
    display: block;
    position: sticky;
    left: var(--wrs-parameter-first-width, 0px);
    max-width: calc(var(--wrs-parameter-width, 100vw) - var(--wrs-parameter-first-width, 0px) - 1rem);
  }

  .catalog-parameter-scroll > .pump-marking-table > thead > tr > th:first-child {
    width: 2.5rem !important;
  }

  .catalog-parameter-scroll > .pump-marking-table > thead > tr > th:nth-child(2) {
    width: 12rem;
    min-width: 12rem;
  }

  .catalog-parameter-scroll > .pump-marking-table > thead > tr > th:nth-child(3) {
    min-width: 11.25rem;
  }

  .catalog-parameter-scroll > .catalog-functions-table > thead > tr > th:first-child {
    width: 55% !important;
    min-width: 10.5rem;
  }

  .catalog-parameter-scroll > .catalog-functions-table > thead > tr > th:nth-child(n+2) {
    min-width: 5.5rem;
  }
}

/* The third-party widget's 300px minimum otherwise overflows narrow forms. */
.wrs-smartcaptcha .smart-captcha {
  min-width: 0;
}

@media (max-width: 575.98px) {
  .pump-category-page #specifications .accordion {
    --bs-accordion-body-padding-x: .5rem;
  }

  .catalog-parameter-scroll > .catalog-functions-table > thead > tr > th:first-child {
    width: 10.5rem !important;
  }

  .pump-category-page .table-fixed th,
  .pump-category-page .table-fixed td {
    padding: .45rem .25rem;
    font-size: .875rem;
  }

  .pump-category-page .table-fixed .btn {
    padding: .25rem .35rem;
    font-size: .75rem;
  }
}
