$toolbar-tools-height: 64px !default;
$toolbar-height: 64px !default;
$toolbar-medium-tall-height: 88px !default;
$toolbar-tall-height: 128px !default;
$toolbar-indent-margin: 64px !default;
$toolbar-padding: 16px !default;

$icon-button-margin-offset: rem(-0.800) !default;

md-toolbar {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;

  position: relative;
  z-index: 2;

  font-size: rem(2.0);
  min-height: $baseline-grid * 8;
  width: 100%;
  &.md-whiteframe-z1-add, &.md-whiteframe-z1-remove {
    transition: box-shadow $swift-ease-in-out-duration linear;
  }

  *,
  *:before,
  *:after {
    box-sizing: border-box;
  }

  &.md-tall {
    height: $toolbar-tall-height;
    min-height: $toolbar-tall-height;
    max-height: $toolbar-tall-height;
  }

  &.md-medium-tall {
    height: $toolbar-medium-tall-height;
    min-height: $toolbar-medium-tall-height;
    max-height: $toolbar-medium-tall-height;

    .md-toolbar-tools {
      height: 48px;
      min-height: 48px;
      max-height: 48px;
    }
  }

  .md-indent {
    margin-left: $toolbar-indent-margin;
  }

  ~ md-content {
    > md-list {
      padding: 0;

      md-list-item:last-child {
        md-divider {
          display: none;
        }
      }
    }
  }
}

.md-toolbar-tools {
  @include md-title();
  font-weight: 400;
  display: flex;
  align-items: center;
  flex-direction: row;

  width: 100%;
  height: $toolbar-tools-height;
  max-height: $toolbar-tools-height;
  padding: 0 $toolbar-padding;
  margin: 0;

  h1, h2, h3 {
    font-size: inherit;
    font-weight: inherit;
    margin: inherit;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
  .fill-height {
    display: flex;
    align-items: center;
  }
  .md-button {
    margin-top: 0;
    margin-bottom: 0;
  }
  &> .md-button:first-child {
    margin-left: $icon-button-margin-offset;
  }
  &> .md-button:last-child {
    margin-right: $icon-button-margin-offset;
  }

  &> md-menu:last-child {
    margin-right: $icon-button-margin-offset;
    & > .md-button {
      margin-right: 0;
    }
  }

  @media screen and (-ms-high-contrast: active) {
    border-bottom: 1px solid #fff;
  }
}
