@use "./mixins" as *;

// adduse

.dx-toolbar {
  width: 100%;

  &.dx-toolbar-multiline {
    .dx-toolbar-items-container {
      display: flex;
      flex: 0 1 auto;
      flex-wrap: wrap;
      height: 100%;

      .dx-toolbar-before {
        position: relative;
      }
    }

    .dx-toolbar-item {
      display: flex;
      align-items: center;
      flex: 0 1 auto;
    }
  }

  &.dx-state-disabled {
    opacity: 1;
  }
}

.dx-toolbar .dx-button .dx-icon {
  box-sizing: content-box;
}

.dx-toolbar-items-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

@mixin dx-toolbar-item() {
  display: table-cell;
  vertical-align: middle;
  box-sizing: content-box;

  img {
    display: block;
  }
}

.dx-toolbar-item {
  padding: 0 5px;

  @include dx-toolbar-item();
}

.dx-toolbar-menu-container {
  @include dx-toolbar-item();
}

.dx-toolbar-group {
  float: left;
  margin: 0 10px;
}

.dx-toolbar-before,
.dx-toolbar-after {
  position: absolute;
}

.dx-toolbar-center:empty {
  display: none;
}

.dx-toolbar-before {
  left: 0;
}

.dx-toolbar-after {
  right: 0;
}

.dx-toolbar-label {
  white-space: nowrap;
  -webkit-user-drag: none;

  .dx-toolbar-item-content > div {
    @include dx-overflow();
  }
}

.dx-toolbar-label > div {
  @include dx-overflow();

  // NOTE: Prevent croping of italic text in label (T126187)
  margin: 0 -5px;
  padding: 0 5px;
}

.dx-toolbar-center {
  margin: 0 auto;
  height: 100%;
  text-align: center;
}

// B232272
.dx-toolbar-center,
.dx-toolbar-before,
.dx-toolbar-after {
  top: 0;
  display: table;
  height: 100%;
}

.dx-rtl {
  .dx-toolbar-before {
    right: 0;
    left: auto;
  }

  .dx-toolbar-after {
    right: auto;
    left: 0;
  }
}

.dx-toolbar-menu-section:empty {
  display: none;
}

.dx-dropdownmenu-popup-wrapper .dx-toolbar-menu-custom > .dx-list-item-content {
  padding: 0;
}

.dx-toolbar-menu-section {
  .dx-toolbar-hidden-button,
  .dx-toolbar-hidden-button-group {
    .dx-toolbar-item-content,
    .dx-toolbar-item-auto-hide,
    .dx-list-item-content {
      padding: 0;

      > .dx-button,
      &.dx-button,
      > .dx-buttongroup,
      &.dx-buttongroup {
        .dx-button-content {
          justify-content: flex-start;
        }
      }
    }
  }

  &.dx-toolbar-menu-last-section {
    border-bottom: none;
  }

  .dx-list-item-content {
    &::before {
      content: none;
    }
  }

  .dx-toolbar-item-auto-hide,
  .dx-toolbar-item-content,
  .dx-list-item-content {
    padding: 0;

    > .dx-list,
    &.dx-list {
      padding: 0;
    }

    > .dx-button,
    &.dx-button {
      width: 100%;
    }
  }

  .dx-toolbar-hidden-button {
    .dx-button {
      width: 100%;
      border: none;
      margin: 0;
      box-shadow: none;
    }
  }

  .dx-toolbar-hidden-button-group {
    .dx-buttongroup {
      width: 100%;

      .dx-buttongroup-wrapper {
        flex-direction: column;
      }
    }

    .dx-button {
      border: none;
      box-shadow: none;
    }
  }
}

.dx-toolbar-text-auto-hide .dx-button .dx-button-text {
  display: none;
}

.dx-list-item-content,
.dx-toolbar-item-content {
  > .dx-texteditor,
  &.dx-texteditor {
    width: 150px;
  }
}

.dx-toolbar-item-invisible {
  display: none;
}
