@import '../scss/init.scss';

.actionBar {
  display: flex;
  align-items: center;
  padding-left: $s_gutter / 2;
  padding-right: $s_gutter;
  min-height: $s_touchable;

  &_navButton {
    margin-right: $s_unit * 3;

    &:empty {
      margin-right: 0;
    }
  }

  &_title {
    @include clipText;
    flex: 1;
    font-size: $s_font_title;

    &_primary {
      font-size: $s_font_subheading;
    }

    &_secondary {
      font-size: $s_font_caption;
    }
  }

  &_actions {
    display: flex;
    justify-content: flex-end;
    max-width: 50%;

    &_item {
      margin-right: $s_gutter;

      &:last-child {
        margin-right: 0;
      }
    }
  }
}

.appBar {
  height: $s_appBarHeight;
  background: $c_appBar_bg;
  color: $c_appBar_text;
  position: relative;

  > .actionBar {
    height: 100%;
  }

  .iconButton[disabled],
  .linkButton[disabled],
  .rwdFlatButton[disabled] {
    color: $c_text_secondary;
  }

  &--shadow {
    @include depth(4);
  }
}

.globalAppBar {
  .actionBar_title {
    display: flex;
    align-items: center;
  }

  .actionBar {
    max-width: $s_page_lg;
    margin: 0 auto;
  }

  @include respondTo_page(lg) {
    .actionBar_title {
      display: flex;

      .actionBar_title_primary {
        font-size: $s_font_title;
        display: inline;
      }

      .actionBar_title_secondary {
        display: inline;
        font-size: $s_font_title;
        position: relative;
        color: white;

        &::before {
          content: '';
          width: 1px;
          height: 75%;
          left: -1px;
          top: 50%;
          transform: translateY(-50%);
          background-color: currentColor;
          position: absolute;
          opacity: 0.5;
        }

        margin-left: $s_gutter;
        padding-left: $s_gutter;
      }
    }
  };
}
