.x-toolbar {
  background-color: #F7F7F7;
  background-image: none;
  border-color: $alto;

  .xtb-text,
  .x-toolbar-cell label {
    margin: 0 5px 0 7px;
    padding: 0;
  }

  .x-item-disabled {
    opacity: .6;
    filter: alpha(opacity=60); /* for IE <= 8 */
  }

  td.x-toolbar-cell {
    &:first-of-type {
      .xtb-text {
        margin-left: 0;
      }
    }
  }
}

.x-toolbar td,
.x-toolbar span,
.x-toolbar input,
.x-toolbar div,
.x-toolbar select,
.x-toolbar label {
  font: $fontSmall;
  line-height: 0;
}

.x-toolbar .x-btn-group-header {
  line-height: 1;
}

.x-toolbar em.x-btn-split-bottom {
  background-image: url($imgPath + 'modx-theme/button/s-arrow-b-noline.gif');
}

.x-toolbar .x-btn-over em.x-btn-split-bottom,
.x-toolbar .x-btn-click em.x-btn-split-bottom,
.x-toolbar .x-btn-menu-active em.x-btn-split-bottom,
.x-toolbar .x-btn-pressed em.x-btn-split-bottom {
  background-image: url($imgPath + 'modx-theme/button/s-arrow-bo.gif');
}

.ext-ie .x-toolbar-cell .x-form-field-wrap {
  height: 30px;
}

.x-tbar-page-first {
  background-image: url($imgPath + 'modx-theme/grid/page-first.png') !important;
}

.x-tbar-loading {
  background-image: url($imgPath + 'modx-theme/grid/refresh.png') !important;
}

.x-tbar-page-last {
  background: none !important;
  position: relative;

  &:before {
    @extend %pseudo-font-x-btn;
    content: fa-content($fa-var-forward);
    top: 1px;
    left: 1px;
    right: auto;
  }
}

.x-tbar-page-next {
  background: none !important;
  position: relative;

  &:before {
    @extend %pseudo-font-x-btn;
    content: fa-content($fa-var-caret-right);
    font-size: 18px;
    line-height: 110%;
    left: 1px;
    right: auto;
  }
}

.x-tbar-page-prev {
  background: none !important;
  position: relative;

  &:before {
    @extend %pseudo-font-x-btn;
    content: fa-content($fa-var-caret-left);
    font-size: 18px;
    line-height: 110%;
    left: auto;
    right: 1px;
  }
}

.x-tbar-loading {
  background: none !important;
  position: relative;

  &:before {
    @extend %pseudo-font-x-btn;
    content: fa-content($fa-var-redo);
    top: 1px;
    bottom: auto;
  }
}

.x-tbar-page-first {
  background: none !important;
  position: relative;

  &:before {
    @extend %pseudo-font-x-btn;
    content: fa-content($fa-var-backward);
    top: 1px;
    left: auto;
    right: 1px;
  }
}

.x-paging-info {
  color: $tundora;
}

.x-toolbar-more-icon {
  background-image: url($imgPath + 'modx-theme/toolbar/more.gif') !important;
}

/* bottom toolbars like pagination */
.x-panel-bbar {
  padding-top: 10px;

  .modx-browser-rte-buttons & {
    /* style it like a window footer */
    background-color: $winFooterBg;
    border-top: 1px solid $winFooterBorderColor;
    padding: 5px;

    .x-toolbar-layout-ct {
      width: auto !important; /* override extjs calculated width */
    }
  }

  .x-toolbar {
    background-color: transparent;
    border: 0 none;
    overflow: hidden;
    padding: 2px 0; /* override extjs default theme style of 2px 2px */

    .x-form-text {
      padding: 5px 10px;

      &.x-tbar-page-number,
      &.x-tbar-page-size {
        width: 32px;
      }

      &.x-tbar-page-number {
        margin-right: 3px;
      }
    }

    .x-btn {
      margin-right: 10px;
      padding: 8px 13px;

      .modx-browser-rte & {
        margin-right: 0;
        padding: 10px 15px 10px 15px;
      }
    }

    .xtb-text {
      margin: 0 3px 0 0;
    }
  }
}

/* top toolbars */
.x-panel-tbar {
  overflow: visible; /* prevent cut off box-shadows in FF */
  padding-bottom: 4px;

  .x-toolbar {
    /*background-color: #F5F5F5;*/
    border: 0;
    padding: 5px 0;
    overflow: visible; /* prevent cut off box-shadows in FF */

    td {
      vertical-align: bottom;
    }
    
    input {
      &.filter-query {
        /* fix positioning issue with query field */
        position: relative;
        bottom: -1px;
      }
    }
  }
}

.x-panel-mc .x-panel-tbar .x-toolbar {
  background-image: none;
  border: 0;
  padding: 15px 0 7px 0;
}

.x-panel-tbar-noheader .x-toolbar {
  background-color: transparent;
  background-image: none;
  border: 0;
  padding: 5px 0;
}

.x-toolbar td,
.x-toolbar span,
.x-toolbar input,
.x-toolbar div,
.x-toolbar select,
.x-toolbar label {
  border-radius: $borderRadius;
}

.x-html-editor-tb .x-btn-text {
  background-image: url($imgPath + 'modx-theme/editor/tb-sprite.gif');
}

.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
  background-color: transparent;
  border-bottom-color: transparent;
}

.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
  border-top-color: transparent;
}
