/* Keep the existing public-site shell while using NHS frontend 10 components. */
.nhsuk-header__container {
  padding: 20px 0 28px;
}

.nhsuk-header__service-name {
  text-wrap: nowrap;
}

.nhsuk-header__search {
  flex: 0 0 280px;
}

.nhsuk-header__search-toggle {
  display: none;
}

.nhsuk-header__navigation {
  max-width: none;
}

.nhsuk-header__navigation-list {
  width: 100%;
  margin: 0;
  justify-content: space-between;
}

.nhsuk-header__navigation-link {
  padding: 14px 0;
  text-decoration: none;
}

.nhsuk-header__navigation-link[aria-current]::before {
  border: 0;
}

.nhsuk-breadcrumb {
  display: block;
  margin: 0;
  padding: 12px 0;
  background: #fff;
}

.nhsuk-breadcrumb__back {
  display: none;
}

main {
  overflow-wrap: anywhere;
}

main img,
main video {
  max-width: 100%;
  height: auto;
}

.public-site-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.aflr figure {
  min-width: 0;
  max-width: 100%;
}

.nhsuk-header__search-toggle:focus {
  outline: 3px solid #ffeb3b;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #212b32;
}

.public-site-table-scroll:focus {
  outline: 3px solid #212b32;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #ffeb3b;
}

@media (min-width: 40.0625em) {
  .nhsuk-header__navigation-item--for-mobile {
    display: none;
  }
}

@media (max-width: 40.0525em) {
  .nhsuk-header {
    position: relative;
  }

  .nhsuk-header__container {
    padding: 16px 0 64px;
  }

  .nhsuk-header__service-name {
    text-wrap: wrap;
  }

  .nhsuk-header__search {
    position: absolute;
    top: 64px;
    right: 16px;
    z-index: 11;
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .nhsuk-header__search-toggle {
    display: block;
    width: 40px;
    height: 40px;
    padding: 5px;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    background: transparent;
    cursor: pointer;
  }

  .nhsuk-header__service {
    min-width: 0;
  }

  .nhsuk-header__search-form,
  .nhsuk-header__search-input {
    min-width: 0;
  }

  .nhsuk-header__search-toggle .nhsuk-icon {
    fill: currentColor;
  }

  .nhsuk-frontend-supported .nhsuk-header .nhsuk-header__search-form {
    display: none;
  }

  .nhsuk-header__search.is-open .nhsuk-header__search-form {
    position: absolute;
    top: 48px;
    right: 0;
    display: flex;
    width: calc(100vw - 32px);
    padding: 8px 0;
    background: #005eb8;
  }

  .nhsuk-header:has(.nhsuk-header__search.is-open) {
    padding-bottom: 56px;
  }

  .nhsuk-frontend-supported .nhsuk-header__navigation-container,
  .nhsuk-frontend-supported .nhsuk-header__navigation-list {
    height: 0;
  }

  .nhsuk-header__navigation-container {
    margin-top: 0;
  }

  .nhsuk-header__navigation-list {
    position: static;
  }

  .nhsuk-frontend-supported .nhsuk-header__navigation-list {
    width: 0;
  }

  body:not(.nhsuk-frontend-supported) .nhsuk-header__search {
    width: calc(100% - 32px);
  }

  body:not(.nhsuk-frontend-supported) .nhsuk-header__search-toggle {
    display: none;
  }

  .nhsuk-header__menu {
    position: absolute;
    top: 64px;
    right: 64px;
    z-index: 12;
    padding: 0;
  }

  .nhsuk-header__menu-toggle {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #fff;
    border-radius: 4px;
  }

  .nhsuk-header__menu-toggle::after {
    display: none !important;
  }

  .nhsuk-header__menu-list {
    top: 48px;
    right: -48px;
    left: auto;
    width: calc(100vw - 32px);
    margin: 0;
    padding: 0 16px;
    background: #fff;
  }

  .nhsuk-header__navigation-link {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .nhsuk-breadcrumb__back {
    display: block;
    margin: 0;
  }

  .nhsuk-breadcrumb__backlink {
    position: relative;
    padding-left: 16px;
  }

  .nhsuk-breadcrumb__backlink::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 2px;
    width: 7px;
    height: 7px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .plg_system_eprivacy_message h2 {
    font-size: 24px;
  }

  .plg_system_eprivacy_message .nhsuk-button {
    display: inline-block;
    width: auto;
  }

  .aflr .nhsd-t-row {
    display: block;
    width: 100%;
  }

  .aflr .nhsd-a-digiblocks {
    display: none;
  }

  .aflr .nhsd-t-col-xs-12 {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .aflr table {
    display: table;
  }

  .public-site-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Keep standalone report links comfortably tappable at small widths. */
body.path-resources-annual-reports .nhsuk-grid-column-three-quarters > a {
  display: inline-block;
  padding-top: 8px;
  padding-bottom: 8px;
}
