/* Overrides for USWDS + legacy ComBase layout coexistence. */

/* 1) Remove legacy top gap introduced for fixed nav layouts. */
body,
body.static-header {
  padding-top: 0 !important;
}

/* Keep sidebar aligned when body top padding is removed. */
#sidebar,
#page-leftbar,
#page-rightbar {
  top: 0 !important;
}

/* 2) Remove legacy canvas edge effects around main content. */
#page-content {
  box-shadow: none !important;
  border-right: 0 !important;
  padding-right: 20px !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

/* 3) Eliminate right-side strip by removing fixed max-width wrapper. */
#page-container {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
}

/* 4) Hide legacy navigation chrome (old top bar + left sidebar). */
header.navbar.navbar-inverse,
#leftmenu-trigger,
#page-leftbar {
  display: none !important;
}

/* 5) Remove leftover left offsets from legacy sidebar layout states. */
#page-content,
footer,
body.show-leftbar #page-content,
body.show-leftbar footer,
body.collapse-leftbar #page-content,
body.collapse-leftbar footer {
  margin-left: 0 !important;
  transform: none !important;
}

/* 6) Remove white strip above footer and keep transition in gray tones. */
.usa-footer__return-to-top {
  background: #e6e7e8 !important;
  border-top: 0 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Keep internal content block flush with container edge. */
#wrap,
#wrap > .container,
#wrap > .container-fluid {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

@media (min-width: 64em) {
    .usa-nav__primary button[aria-expanded=false] span::after {
        background-color: white !important;
    }
}

/* Keep legacy Bootstrap dialogs above the elevated USWDS header. */
.modal-backdrop {
  z-index: 10040 !important;
}

.modal {
  z-index: 10050 !important;
}

