/* CSS styling that should be applied to workbench-related components no
 * matter what the exact UI style is. These stylings below should not be
 * concerned with colors, paddings and stuff, although they may provide
 * sensible defaults.
 */

.wb-icon {
  display: inline-block;
  vertical-align: middle;
}

.wb-module-tray {
  display: flex;
  flex-flow: row nowrap;
  /* This might cause problems if the tray is too narrow but scrollable, and
   * not all buttons fit in it. The user won't be able to scroll to the left
   * to see the left edge of the first button. If this is a concern, the
   * solution is to use margin: auto in the first and last items instead of
   * justify-content: center */
  justify-content: center;
}

.wb-module-tray .wb-module-drawer {
  padding: 0 2px;
}
.wb-module-tray .wb-module-drawer button {
  min-width: 32px;
  text-overflow: ellipsis;
}

.wb-module-tray.wb-module-tray-vertical {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}
.wb-module-tray.wb-module-tray-vertical .wb-module-drawer {
  display: flex;
  flex-flow: column nowrap;
  padding: 0;
}
.wb-module-tray.wb-module-tray-vertical .wb-module-drawer-anchor {
  order: 1;
}
.wb-module-tray.wb-module-tray-vertical .wb-module-drawer button {
  min-width: unset;
  order: 0;
  padding: 0.5em 1em;
  position: relative;
  text-align: left;
  width: 100%;
}
.wb-module-tray.wb-module-tray-vertical .wb-module-drawer.wb-module-drawer button::after {
  content: "\25b6";
  font-family: "Segoe UI Symbol";      /* fix arrow coloring on MS Edge */
  font-size: 80%;
  position: absolute;
  right: 1em;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}
.wb-module-tray.wb-module-tray-vertical .wb-module-drawer.wb-module-drawer-open button::after {
  transform: translateY(-50%) rotate(90deg);
}

.wb-module-drawer-anchor {
  position: relative;
}
.wb-module-drawer-contents {
  padding: 4px 0;
  user-select: none;
}
.wb-module-tray-vertical .wb-module-drawer-contents {
  margin: 0;
  padding: 0;
  user-select: none;
  text-align: left;
}
.wb-module {
  padding: 0.5em 1em;
  cursor: default;
  text-overflow: ellipsis;
}
.wb-module.wb-module-disabled .wb-icon,
.wb-module.wb-module-disabled .wb-label {
  opacity: 0.5;
}

.wb-perspective-bar {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
}
.wb-perspective-bar .wb-perspective-bar-item {
  position: relative;
  margin: 0 2px;
}
.wb-perspective-bar .wb-perspective-bar-item button {
  min-width: 32px;
}

.wb-sidebar-icon-container {
  display: inline-block;
  position: relative;
  margin-right: 0.5em;
}
