/* Mobile bottom navigation fed by the "Mobile Bottom Quicklinks" menu. */
.mobile-bottom-quicklinks-bar {
  display: none;
}

@media (max-width: 991px) {
  :root {
    --fktt-mobile-quicklinks-height: 3.5rem;
    --fktt-mobile-quicklinks-viewport-offset: 0px;
  }

  body:has(.mobile-bottom-quicklinks-bar) {
    padding-bottom: calc(
      var(--fktt-mobile-quicklinks-height) + env(safe-area-inset-bottom, 0px)
    );
  }

  .mobile-bottom-quicklinks-bar {
    position: fixed;
    z-index: 450;
    right: 0;
    bottom: var(--fktt-mobile-quicklinks-viewport-offset);
    left: 0;
    display: block;
    box-sizing: border-box;
    width: 100vw;
    width: 100dvw;
    max-width: 100vw;
    max-width: 100dvw;
    min-height: var(--fktt-mobile-quicklinks-height);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: clip;
    border-top: 1px solid #d5dadd;
    background: #fff;
    box-shadow: 0 -0.2rem 0.8rem rgb(0 0 0 / 10%);
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: bottom;
  }

  .mobile-bottom-quicklinks-bar .block,
  .mobile-bottom-quicklinks-bar .region-mobile-bottom-quicklinks,
  .mobile-bottom-quicklinks-bar nav {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .mobile-bottom-quicklinks-bar ul.menu {
    --fktt-mobile-quicklink-min-width: 80px;

    display: grid;
    grid-template-columns: repeat(
      auto-fit,
      minmax(var(--fktt-mobile-quicklink-min-width), 1fr)
    );
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-bottom-quicklinks-bar li.menu-item {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-bottom-quicklinks-bar li.menu-item::before {
    content: none;
  }

  .mobile-bottom-quicklinks__overflow[hidden] {
    display: none;
  }

  .mobile-bottom-quicklinks__primary-item > a,
  .mobile-bottom-quicklinks__toggle {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: var(--fktt-mobile-quicklinks-height);
    min-height: var(--fktt-mobile-quicklinks-height);
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.15rem 0.15rem 0.1rem;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6d7177;
    font-size: clamp(0.62rem, 2.6vw, 0.75rem);
    font-weight: 500;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-bottom-quicklinks__primary-item > a:hover,
  .mobile-bottom-quicklinks__primary-item > a:focus-visible,
  .mobile-bottom-quicklinks__toggle:hover,
  .mobile-bottom-quicklinks__toggle:focus-visible {
    background: #f7f7f7;
    color: #062b5c;
  }

  .mobile-bottom-quicklinks__primary-item > a:focus-visible,
  .mobile-bottom-quicklinks__toggle:focus-visible {
    outline: 0.15rem solid #062b5c;
    outline-offset: -0.2rem;
  }

  .mobile-bottom-quicklinks__primary-item > a.is-active,
  .mobile-bottom-quicklinks__primary-item.menu-item--active-trail > a,
  .mobile-bottom-quicklinks__overflow--active .mobile-bottom-quicklinks__toggle {
    color: #e9a400;
  }

  .mobile-bottom-quicklinks__primary-item > a.is-active::before,
  .mobile-bottom-quicklinks__primary-item.menu-item--active-trail > a::before,
  .mobile-bottom-quicklinks__overflow--active .mobile-bottom-quicklinks__toggle::before {
    position: absolute;
    top: 0;
    right: 20%;
    left: 20%;
    height: 0.18rem;
    border-radius: 0 0 0.18rem 0.18rem;
    background: #e9a400;
    content: '';
  }

  .mobile-bottom-quicklinks__primary-item > .menu-dropdown {
    position: absolute;
    top: 0.1rem;
    left: 50%;
    display: grid;
    width: 1.9rem;
    height: 1.9rem;
    margin: 0;
    padding: 0;
    place-items: center;
    pointer-events: none;
    transform: translateX(-50%);
  }

  .mobile-bottom-quicklinks-bar .field__label,
  .mobile-bottom-quicklinks-bar .term-title {
    display: none;
  }

  .mobile-bottom-quicklinks-bar .node-taxonomy-container:has(.field--name-field-media-image),
  .mobile-bottom-quicklinks-bar ul.taxonomy-terms,
  .mobile-bottom-quicklinks-bar li.taxonomy-term,
  .mobile-bottom-quicklinks-bar .field--name-field-menu-icon,
  .mobile-bottom-quicklinks-bar .field--name-field-menu-icon > .field__item,
  .mobile-bottom-quicklinks-bar .field--name-field-media-image,
  .mobile-bottom-quicklinks-bar .field--name-field-media-image > .field__item {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-bottom-quicklinks-bar .field--name-field-media-image img {
    display: block;
    width: 1.9rem;
    height: 1.9rem;
    object-fit: contain;
  }

  .mobile-bottom-quicklinks__toggle {
    cursor: pointer;
    font-family: inherit;
  }

  .mobile-bottom-quicklinks__label {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-quicklinks__more-icon {
    position: absolute;
    top: 0.1rem;
    left: 50%;
    color: #252525;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    line-height: 1.5rem;
    transform: translateX(-50%);
  }

  .mobile-bottom-quicklinks__dropup {
    position: absolute;
    right: 0.35rem;
    bottom: calc(100% + 0.5rem);
    width: min(18rem, calc(100vw - 1rem));
    max-height: min(60vh, 24rem);
    overflow-y: auto;
    border: 1px solid #d5dadd;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 18%);
  }

  .mobile-bottom-quicklinks__dropup[hidden] {
    display: none;
  }

  .mobile-bottom-quicklinks__dropup ul.menu {
    display: block;
  }

  .mobile-bottom-quicklinks__dropup
    .mobile-bottom-quicklinks__primary-item > .menu-dropdown {
    display: none;
  }

  .mobile-bottom-quicklinks__dropup
    .mobile-bottom-quicklinks__primary-item > a {
    display: block;
    height: auto;
    min-height: 0;
    padding: 0.8rem 1rem;
    overflow: visible;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
  }

  .mobile-bottom-quicklinks__dropup
    .mobile-bottom-quicklinks__primary-item > a::before {
    content: none;
  }

  .mobile-bottom-quicklinks__dropup .mobile-bottom-quicklinks__label {
    overflow: visible;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .mobile-bottom-quicklinks__dropup li.menu-item:not(:last-child) {
    border-bottom: 1px solid #e7e9eb;
  }

  .mobile-bottom-quicklinks__dropup li.menu-item > a {
    display: block;
    min-height: 0;
    padding: 0.8rem 1rem;
    background: #fff;
    color: #252525;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .mobile-bottom-quicklinks__dropup li.menu-item > a:hover,
  .mobile-bottom-quicklinks__dropup li.menu-item > a:focus-visible {
    background: #f4f6f8;
    color: #062b5c;
  }

  .mobile-bottom-quicklinks__dropup li.menu-item > a.is-active,
  .mobile-bottom-quicklinks__dropup li.menu-item--active-trail > a {
    color: #b47f00;
    font-weight: 700;
  }
}

@media print {
  .mobile-bottom-quicklinks-bar {
    display: none !important;
  }
}
