@import "./../variables";

.dv-top-toolbar {
  display: flex;
  border: $border-width solid $border-color;
  border-radius: $border-radius;
  background: #fff;
  box-sizing: border-box;

  &-button {
    cursor: pointer;
    user-select: none;
    line-height: 1;
    padding: $text-padding $content-padding;
    display: flex;
    align-items: center;
    position: relative;
    color: $title-text-color;

    &:not(:last-child) {
      &:after {
        content: '';
        display: block;
        position: absolute;
        width: 1px;
        height: 70%;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.1);
      }
    }
    &-handle {
      cursor: pointer;
      display: flex;
      align-items: center;

      .dv-top-toolbar-button-down-icon {
        transition: $transition-time;
        margin-left: $text-span;
        font-size: $font-size-mini;
        color: $content-text-color;
      }
    }
    .drop-down {
      position: absolute;
      top: 100%;
      z-index: 1000;
      padding: $content-padding 0;
      min-width: 100%;

      &-inner {
        background-color: #ffffff;
        border: $border-width solid $border-color;
        border-radius: $border-radius;
      }

      &.left {
        left: 0;
      }
      &.right {
        right: 0;
      }
    }
    &.active {
      color: $dv-primary-color;

      .dv-top-toolbar-button-down-icon {
        transform: rotateZ(-180deg);
      }
    }
    &-icon {
      width: $font-size-larger;
      height: $font-size-larger;
      margin-right: $text-span;
      cursor: pointer;
      font-size: $font-size-larger;
    }
    &-title {
      font-size: $font-size-small;
      font-weight: bold;
      cursor: pointer;
    }
  }

  &.dark {
    background-color: $dv-dark-component-background;
    border-color: $dv-dark-border-color;

    .dv-top-toolbar-button {
      color: $dv-dark-primary-text-color;

      .dv-top-toolbar-button-down-icon {
        color: $dv-dark-primary-text-color;
      }

      &.active {
        color: $top-toolbar-active-color;

        .dv-top-toolbar-button-down-icon {
          color: $top-toolbar-active-color;
        }
      }
    }
  }
}
