#offcanvas_menu_dialog {
  border: none;
  padding: 0;
}

.header__offcanvas-menu {
  height: auto;
  width: calc(100vw - (100vw - 100%));
  max-height: 100vh;
  position: fixed;
  right: 0;
  top: auto;
  z-index: 1000;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 300ms ease, box-shadow 300ms ease;
  transform: translate3d(100%, 0, 0);

  .offcanvas-open & {
    transform: translate3d(0, 0, 0);
    //background: $color-bg-light;
    //box-shadow: 0 .5rem 1.5rem -.5rem $color-text;
  }

  &--grid {
    @include grid();
    margin: 0 auto 2rem;
    background: $color-bg-light;
    box-shadow: 0 .5rem 1.5rem -.5rem $color-text;
  }

  &--heading {
    grid-row: 1;
    grid-column: 2 / 16;
    display: flex;
    justify-content: space-between;
    margin-top: 3.1rem;

    .block-system-branding-block {
      .site-name {
        display: none;
      }

      img {
        height: 2.5rem;
        width: auto;

        @include breakpoint(m) {
          height: 3.5rem;
        }
      }
    }
  }

  &--content {
    @include content-grid-default;
    grid-row: 2;
    margin: $grid-gutter 0 (2*$grid-gutter) 0;

    .block {
      border-top: 1px solid $color-divider-dark;
      padding: $grid-gutter 0;

      &:first-child {
        border-top: none;
      }
    }

    ul.menu {
      margin: 0;
      padding: 0;

      > li > ul {
        margin-left: $grid-gutter;
        column-count: 1;
      }

      @include breakpoint(l) {
        column-count: 2;

        .menu-item a {
          border-width: 0;
        }
        .menu-item a.is-active {
          border-bottom-color: $color-link;
          border-bottom-width: 1px;
        }
      }

    }

    li.menu-item {
      list-style: none;
      position: relative;
      padding: 0;
    }

    form {
      background: transparent;
      padding: 0;

      &:before {
        content: none;
      }
      .form--inline {
        margin-left: 0;
        margin-right: 0;
      }
    }

    .block-views-exposed-filter-blocksearch-search-input {
      label {
        display: inline-block;
        max-width: 9rem;
        width: 30%;
        align-self: center;
      }

      .form--inline {
        display: flex;
      }

      .form-item {
        margin-right: -2px;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0;

        @include breakpoint(m) {
          width: 70%;
        }

        input.form-text {
          width: 100%;
          max-width: unset;
          line-height: 2;
        }
      }

      .form-actions {
        display: inline-block;
        margin: 0;

        button[type="submit"] {
          @include icon(search) {
            font-size: $font-size-icon;
          };
          border-color: $color-divider-dark;
          border-left: 0;
          background: transparent;
          color: $color-interaction;
          height: 100%;
          padding: 0 .75rem;

          &:before {
            line-height: 2;
          }

          &:hover {
            background: $color-interaction;
            color: $color-text-inverted;
            border-color: $color-interaction;
          }

          span {
            @include visually-hidden;
          }
        }
      }
    }

    .block-social-media-links .social-links--wrapper {
      width: 100%;
      margin-bottom: 0;

      .platform-name {
        display: inline;
      }

      .platform-url {
        display: none;
      }
    }
  }

  a {
    color: $color-text;
  }

}

.header__burger--buttons {
  @include icon(bars);
  background: $color-link;
  border-color: $color-link;
  padding: 0;
  border-radius: $button-border-radius;
  color: $color-text-inverted;
  display: block;
  font-size: $font-size-icon;
  height: 1.5em;
  overflow: hidden;
  text-decoration: none;
  width: 1.5em;
  outline-offset: 3px;
  outline-width: 2px;

  @include breakpoint(m) {
    font-size: 1.75rem;
  }

  &:before,
  &:after {
    color: inherit;
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    position: relative;
    text-align: center;
    top: 0;
    transition: top 300ms ease;
    width: inherit;
  }

  &:after {
    @extend %fa-icon;
    @extend .fa-solid;
    content: "\f00d"; // $fa-var-xmark
  }

  .offcanvas-open & {
    &:before,
    &:after {
      top: -100%;
    }
  }

}

/* Adjust position when Gin vertical toolbar is present */
body.gin--vertical-toolbar.offcanvas-open .header__offcanvas-menu--grid  {
  left: calc(var(--gin-toolbar-x-offset) / 2 + .5rem);
}
