/**
 * Styles for the rich text formatting toolbar.
 */
@import (reference) "lib/css/fontawesome.less";
@import (reference) "rb/css/ui/colors.less";


#rb-ns-ui() {
  .formatting-toolbar() {
    @bg: #rb-ns-ui.colors[@grey-90];

    @button-color: #rb-ns-ui.colors[@black];
    @button-hover-bg: #rb-ns-ui.colors[@grey-80];
  }
}


/**
 * The rich text formatting toolbar.
 */
.rb-c-formatting-toolbar {
  @_formatting-toolbar-vars: #rb-ns-ui.formatting-toolbar();

  background:
    var(--if-light, rgba(0, 0, 0, 0.04))
    var(--if-dark, rgba(0, 0, 0, 0.1));
  bottom: 0px;
  display: flex;
  margin: 0;
  padding: 0;

  a, label {
    color: var(--ink-c-button-fg);
  }

  &__btn-group {
    display: flex;
    margin: 0.5em;
  }

  &__btn {
    background: none;
    border: 0;
    border-radius: 2px;
    box-sizing: content-box;
    font-size: 120%;
    margin: 0 0.1em;
    width: 14px;
    height: 14px;
    padding: var(--ink-c-button-padding-vert)
             var(--ink-c-button-padding-horiz);
    text-align: center;

    &::before {
      vertical-align: top;
    }

    &:hover, &:focus {
      background: var(--ink-c-button-hover-bg);
    }

    &-bold:before {
      .fa-icon();
      content: @fa-var-bold;
    }

    &-code:before {
      .fa-icon();
      content: @fa-var-code;
    }

    &-image {
      &:hover {
        cursor: pointer;
      }

      &:before {
        .fa-icon();
        content: @fa-var-image;
      }
    }

    &-italic:before {
      .fa-icon();
      content: @fa-var-italic;
    }

    &-link:before {
      .fa-icon();
      content: @fa-var-link;
    }

    &-list-ol:before {
      .fa-icon();
      content: @fa-var-list-ol;
    }

    &-list-ul:before {
      .fa-icon();
      content: @fa-var-list-ul;
    }

    &-strikethrough:before {
      .fa-icon();
      content: @fa-var-strikethrough;
    }
  }
}
