#toolbar {
  width: var(--toolbar-width);
  height: var(--toolbar-height);
  display: flex;
  position: absolute;
  top: 5px;
  left: calc(50% - calc(var(--toolbar-width) / 2));
  background-color: rgba(230, 230, 230, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(50, 50, 50, 0.95);
  overflow: hidden;

  button {
    background: none;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;

    svg {
      pointer-events: none;
    }

    &:focus {
      outline: none;
    }
  }

  .toolbar__buttons {
    button {
      padding: 2px;
      width: 20px;
      height: 20px;
    }
  }

  .toolbar__draglines {
    display: flex;
    padding: 0 10px;
    align-items: center;
    cursor: move;

    .draglines {
      display: grid;
      grid-template-columns: repeat(2, min-content);
      row-gap: 2px;
      column-gap: 4px;

      div {
        border-radius: 50%;
        width: 3px;
        height: 3px;
        background-image: radial-gradient(circle at 50% 0, #C6C6C6, #666666);
      }
    }
  }

  .toolbar__container {
    display: flex;
    position: relative;
    width: 100%;
    justify-content: center;

    .toolbar__body,
    .side-view-body {
      position: absolute;
      display: flex;
      width: 100%;
      height: 100%;
      transition: .3s;
      justify-content: center;
      align-items: center;
    }

    .toolbar__body {
      top: 0;
      left: 0;
    }

    .side-view-body {
      top: 70px;
    }

    .toolbar__items {
      display: flex;
      margin: 0;
      padding: 0;
      align-items: center;
      flex-direction: row;

      li {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 26px;
        height: 26px;
        margin: 0 4px;
        border: 1px solid transparent;

        button {
          padding: 0;

          svg {
            width: 20px;
            height: 20px;
            pointer-events: none;
          }
        }

        &.active {
          background-color: #C6C6C6;
          border: 1px solid #666666;
          border-radius: 5px;
          overflow: auto;

          &.more_figures {
            position: relative;

            &::after {
              content: "";
              position: absolute;
              bottom: 2px;
              right: 2px;
              width: 5px;
              height: 5px;
              background-color: #000;
              clip-path: polygon(100% 0, 0% 100%, 100% 100%);
            }
          }
        }

        &.cross-line {
          border: none;
          background-color: #4c4c4c;
          height: 20px;
          width: 2px;
          margin: 0 4px;
        }
      }

      .toolbar__width-button {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid #000;

        div {
          height: 15px;
          background-color: #000;
          transform: rotate(45deg);

          &.light {
            width: 2px;
          }
          &.medium {
            width: 4px;
          }
          &.bold {
            width: 6px;
          }
        }
      }

      .toolbar__color-picker {
        position: relative;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: none;

        &::before {
          position: absolute;
          content: "";
          top: 50%;
          left: 50%;
          width: 16px;
          height: 16px;
          background: inherit;
          border-radius: 50%;
          border: 2px solid #fff;
          transform: translate(-50%, -50%);
        }

        &.color_rainbow { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); }
        &.color_blue { background-color: var(--color-picker-blue); }
        &.color_red { background-color: var(--color-picker-red); }
        &.color_green { background-color: var(--color-picker-green); }
        &.color_orange { background-color: var(--color-picker-orange); }
        &.color_black { background-color: var(--color-picker-black); }
        &.color_tool_laser { background-image: radial-gradient(circle, white 0%, red 100%); }
        &.color_tool_eraser { background-image: radial-gradient(circle, white 0%, dimgray 100%); }
      }
    }
  }
}

#toolbar.tool-slide .toolbar__body,
#toolbar.color-slide .toolbar__body,
#toolbar.width-slide .toolbar__body {
  top: -70px;
}

#toolbar.tool-slide .tool-group,
#toolbar.color-slide .color-group,
#toolbar.width-slide .width-group {
  top: 0;
}
