:root {
  --sidebar-background: #0A0E14;
  --sidebar-foreground: #FAFAFA;
  --sidebar-width: 48px;
  --sidebar-icon-size: 1px;
  --sidebar-hover: #4D5566;

  --tooltip-background: var(--sidebar-background);
  --tooltip-foreground: var(--sidebar-foreground);

  --drawer-resize-bar-width: 5px;
  --drawer-background: #f9f9f9;
  --drawer-background-dimmed: #f1f1f1;
  --drawer-foreground: #575f66;
  --drawer-foreground-dimmed: #575f6655;
  --drawer-foreground-dimmed-text: #575f66cc;
  --drawer-border: #e1e1e1;
  --drawer-selected: #66aeeb55;

  --button-border: #e1e1e1;
  --button-background: #f0f0f0;

  --toolbar-background: #ffffff;
  --toolbar-foreground: #575f66;
  --toolbar-border: #8A919966;
  --toolbar-hover: #d1e4f4;

  --space-0: 4px;
  --space-1: calc(2 * var(--space-0));
  --space-2: calc(2 * var(--space-1));

  --generator-color-border: #8A919966;

  --signature-height: 32px;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'IBM Plex Sans', 'sans';
  display: flex;
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

input, textarea, button {
  font-family: 'IBM Plex Sans', 'sans';
  color: var(--drawer-foreground);
  font-size: 14px;
}

*:focus {
  outline: none;
}

.app {
  display: flex;
  flex: 1;
  position: relative;
}

button, .button {
  padding: var(--space-0);
  border: 1px solid var(--button-border);
  border-radius: 1px;
  background: var(--button-background);
  cursor: pointer;
}

/* Sidebar */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-background);
  border: var(--sidebar-border) 1px solid;
  color: var(--sidebar-foreground);
  overflow: none;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  box-sizing: border-box;
}

.sidebar__logo {
  width: var(--sidebar-width);
  padding: var(--space-1);
  box-sizing: border-box;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
}

.sidebar__tools {
  flex: 1;
  justify-content: flex-end;
  display: flex;
  flex-direction: column;
}

.sidebar__button {
  font-size: var(--sidebar-icon-size);
  user-select: none;
  cursor: pointer;
  padding: var(--space-1);
  text-align: center;
}


@media (pointer: fine) {
  .sidebar__button:hover {
    background: var(--sidebar-hover);
  }
}

/* Panzoom */

.panzoom {
  touch-action: none;
  width: 100%;
  height: 100%;
}

.panzoom__inner {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform-origin: 50% 50%;
}

/* Boundary (source/target) Preview */

.boundary__and__workspace {
  position: inherit;
  width: 100%;
  height: 100%;
}

.boundary {
  position: fixed;
  display: grid;
  grid-template-columns: 1fr 30px;
  bottom: 10px;
  margin-left: 10px;
  z-index: 4; /* just below the slice buttons */
}

.boundary__element {
  background-color: var(--toolbar-background);
  border: 1px solid var(--toolbar-border);
  border-radius: var(--space-0);
  user-select: none;
}

@media (pointer: fine) {
  .boundary__element:hover {
    background: var(--toolbar-hover);
    cursor: pointer;
  }
}

.boundary__name {
  padding: 5px;
  color: var(--toolbar-foreground);
  text-align: center;
}

.boundary__button {
  color: var(--toolbar-foreground);
  text-align: center;
  padding-top: 2px;
}

.boundary__preview {
  overflow: auto;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Workspace */

.workspace {
  flex: 1;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  /*position: fixed;*/
  overflow: hidden;
}

.workspace__overlay-top {
  position: absolute;
  display: flex;
  z-index: 10;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: flex-start;
}

.workspace__empty-diagram {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  z-index: 0;
}

.workspace__empty-diagram-content {
  display: table-cell;
  vertical-align: middle;
}

.workspace__empty-logo {
  width: 100%;
  box-sizing: border-box;
  filter: brightness(80%);
}

.workspace__empty-header {
	color: grey;
}

.workspace__empty-keydesc {
	text-align: right;
	color: grey;
}

.workspace__empty-keyicon {
	text-align: left;
	color: grey;
}

.tex__wrapper.workspace__project-title {
  flex: 0 1 auto;
  font-size: 28px;
  color: #2224;
  padding: 6px;
  user-select: text;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tex__wrapper.workspace__project-title span {
  white-space: nowrap;
}

.workspace__toolbar {
  flex: 0 0 auto;
  margin: var(--space-0);
  display: flex;
}

.workspace__toolbar__segment,
.workspace__slice-buttons {
  background: var(--toolbar-background);
  border: 1px solid var(--toolbar-border);
  color: var(--toolbar-foreground);
  border-radius: var(--space-0);
  align-items: stretch;
  display: flex;
}

.workspace__toolbar__segment {
  width: 100%;
}

.workspace__path-segment {
  width: 24px;
  justify-content: center;
  align-items: center;
}

.workspace__toolbar__button {
  padding: var(--space-1);
  align-items: center;
  display: flex;
  cursor: pointer;
  user-select: none;
}

@media (pointer: fine) {
  .workspace__toolbar__button:hover,
  .workspace__slice-button:hover {
    background: var(--toolbar-hover);
  }
}

.workspace__scrub {
  position: absolute;
  z-index: 10;
  bottom: 0;
  left: 50%;
  width: 50%;
  transform: translateX(-50%);
  display: flex;
  margin: var(--space-0);
}

.workspace__scrub input[type="range"] {
  width: 100%;
}

.workspace__scrub__speed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
}

.workspace__slice-buttons {
  position: absolute;
  right: 0;
  top: 50%;
  box-sizing: border-box;
  z-index: 5;
  user-select: none;
  transform-origin: 0px 50%;
  flex-direction: column;
}

.workspace__slice-button {
  user-select: none;
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  flex: 1;
}

/* Tooltips */

.tooltip {
  position: relative;
}

.tooltip::after {
  background: var(--tooltip-background);
  border-radius: 10px;
  color: var(--tooltip-foreground);
  display: none;
  padding: 10px 15px;
  position: absolute;
  text-align: center;
  z-index: 1001;
  content: attr(data-tooltip);
  font-size: 12px;
  white-space: nowrap;
  top: 50%;
}

.tooltip--right::after {
  right: 0;
  transform: translate(calc(100% + 10px), -50%);
}

.tooltip--left::after {
  left: 0;
  transform: translate(calc(-100% - 10px), -50%);
}

.tooltip::before {
  background: var(--tooltip-background);
  content: ' ';
  display: none;
  position: absolute;
  width: 15px;
  height: 15px;
  z-index: 1001;
  top: 50%;
}

.tooltip--right::before {
  right: 0;
  transform: translate(calc(100% + 5px), -50%) rotate(45deg);
}

.tooltip--left::before {
  left: 0;
  transform: translate(calc(-100% - 5px), -50%) rotate(45deg);
}

@media (pointer: fine) {
  .tooltip:hover::after {
    display: block;
  }

  .tooltip:hover::before {
    display: block;
  }
}

/* Drawer */

.drawer {
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid var(--drawer-border);
  background: var(--drawer-background);
  color: var(--drawer-foreground);
  box-sizing: border-box;
  touch-action: none;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.drawer__resize-bar {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--drawer-foreground-dimmed);
  width: var(--drawer-resize-bar-width);
  height: 100%;
  opacity: 0.1;
  z-index: -1;
  cursor: col-resize;
}

.drawer__inner {
  position: absolute;
  width: 100%;
  max-width: calc(100% - var(--drawer-resize-bar-width));
  height: 100%;
  overflow: none;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.drawer__header {
  height: var(--sidebar-width);
  min-height: var(--sidebar-width);
  padding: var(--space-0);
  border-bottom: 1px solid var(--drawer-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.drawer__title {
  width: 100%;
  font-size: 1.2em;
  padding: var(--space-0);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.drawer__content {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--drawer-border) var(--drawer-background);
  touch-action: pan-y;
  width: 100%;
  height: 100%;
  padding: var(--space-1);
  box-sizing: border-box;
}

.drawer__content .material-icons.md-light {
  color: var(--drawer-background);
}

.drawer__content .material-icons.md-dark {
  color: var(--drawer-foreground);
}

.drawer__content .material-icons.md-dark.md-inactive {
  color: var(--drawer-foreground-dimmed);
}

.drawer__icon {
  cursor: pointer;
  padding: var(--space-1);
}

.drawer input[type=text]:focus-within {
  text-decoration: underline;
}

/* Metadata */

.metadata__details {
  box-sizing: border-box;
  margin-top: var(--space-1);
}

.metadata__details textarea {
  resize: vertical;
  width: 100%;
  border-radius: var(--space-0);
  background: transparent;
  box-sizing: border-box;
  border: none;
  user-select: text;
}

.metadata__details .tex__span {
  padding: var(--space-0);
}

.metadata__title {
  min-height: 65px;
  font-size: 1.3em;
}

.metadata__author {
  min-height: 45px;
  font-weight: bold;
}

.metadata__abstract {
  min-height: 200px;
  font-weight: light;
}

.katex {
  font-size: 1em;
}

.tex__wrapper {
  padding: 0;
  box-sizing: border-box;
}

.tex__wrapper.tex__editable:hover {
  cursor: pointer;
  background-color: #9991;
}

.tex__span {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.tex__span.tex__span-placeholder {
  color: var(--drawer-foreground-dimmed-text);
}

/* Signature */

.signature__item {
  border-radius: var(--space-0);
  box-sizing: border-box;
  display: flex;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
  transition: height 100ms;
}

.signature__item-contents {
  width: 100%;
}

.signature__generator .signature__item-contents {
}

.signature__item.signature__generator-editing {
}

.signature__item.signature__generator-editing.signature__generator-0d {
}

.drawer-expanded .signature__item {
  height: calc(2 * var(--signature-height));
}

.drawer-expanded .signature__item.signature__generator-editing.signature__generator-0d {
}

.drawer-expanded .signature__item.signature__generator-editing {
  height: auto;
}

.signature__item.signature__folder-editing {
  height: 32px;
}

.drawer-expanded .signature__item.signature__folder-editing {
  height: calc(2 * var(--signature-height));
}

.signature__item-info {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: var(--signature-height);
  transition: background-color 100ms;
  padding-right: 4px;
  box-sizing: border-box;
}

@media (pointer: fine) {
  .signature__item-info:hover {
    background: var(--drawer-selected);
  }
}

.signature__item.signature__generator-editing.signature__item-info {
  height: var(--signature-height);
}

.drawer-expanded .signature__item-info {
  height: calc(2 * var(--signature-height));
}

.signature__branch {
  width: 100%;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.signature__branch .signature__branch {
  border-left: solid 2px var(--toolbar-border);
  margin-top: var(--space-0);
  padding-left: var(--space-1);
}

.signature__dropzone {
  height: var(--space-1);
  width: 100%;
  transition: height 100ms;
}

.signature__branch-empty .signature__dropzone {
  height: var(--signature-height);
  color: var(--drawer-border);
  content: "(Empty)";
}

.signature__branch-empty .signature__dropzone::after {
  content: "(Empty)";
  display: flex;
  align-items: center;
  margin-left: var(--space-0);
  height: 100%;
}

.signature__dropzone.drag-over {
  height: var(--signature-height);
}

.signature__item-child {
  padding: var(--space-0);
  display: flex;
  align-items: center;
}

.signature__item-name, .signature__item-fill {
  flex: 1 1 auto;
  white-space: nowrap;
  box-sizing: border-box;
}

.signature__item-fill {
  cursor: pointer;
  height: 100%;
}

div.signature__item-name-wrapper {
  height: var(--signature-height);
  padding: var(--space-0) 0;
  border-left: var(--space-1) solid transparent;
  border-right: var(--space-1) solid transparent;
  overflow: hidden;
  display: flex;
}

span.signature__item-name,
input.signature__item-name {
  height: 75%;
  align-self: center;
  text-overflow: ellipsis;
  overflow-y: show;
  transition: font-size 100ms;
  position; relative;
  top: -5px;
}

.drawer-expanded span.signature__item-name,
.drawer-expanded input.signature__item-name {
  height: 100%;
  align-self: flex-start;
  font-size: 20px;
}

input.signature__item-name {
  padding: 0;
  border: none;
  background: transparent;
  user-select: text;
}

.signature__folder-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: right;
  wrap: nowrap;
  overflow: hidden;
  width: 0;
  transition: width 100ms;
}

.signature__folder-right.signature__folder-right-hover,
  .signature__folder-right.signature__folder-right-editing {
  width: 64px;
}

.signature__generator-color {
  position: relative;
  wrap: nowrap;
  overflow: hidden;
  color: var(--drawer-background);
  height: var(--signature-height);
  width: 26px;
  flex: 0 0 auto;
  transition: width 50ms;
  border-radius: 0 var(--space-0) var(--space-0) 0;
}

.signature__generator-color.signature__generator-color-hover,
.signature__generator-color.signature__generator-color-edit {
  display: flex;
  flex-direction: row;
}

.signature__generator-color.signature__generator-color-edit {
  width: 64px;
}

.signature__generator-settings-btn {
  position: absolute;
  right: 0;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 100ms;
}

.signature__generator-color-hover .signature__generator-settings-btn {
  opacity: 1;
}

.signature__item-editing .signature__generator-settings-btn {
  position: static;
}

.signature__generator-color-sliver {
  flex: 0 0 auto;
  width: 6px;
  box-sizing: border-box;
}

.signature__generator-color-sliver-light {
  box-shadow: inset 2px 0 0 #575f6655;
}

.signature__generator-dimension {
  position: absolute;
  width: calc(100% + 6px);
  right: 0;
  display: block;
  text-align: center;
  color: var(--drawer-foreground);
  font-weight: bold;
  font-size: 17px;
  opacity: 1;
  transition: opacity 100ms;
  box-sizing: border-box;
}

.signature__generator-dimension.signature__generator-dimension-light {
  color: var(--drawer-background);
}

.signature__generator-color-hover .signature__generator-dimension {
  opacity: 0;
}

.signature__generator-indicators-wrapper {
  display: flex;
  flex-direction: row;
  align-items: right;
  padding: var(--space-0) 0;
  margin-right: 2px;
}

.drawer-expanded .signature__generator-indicators-wrapper {
  position: absolute;
  bottom: 0;
  left: var(--space-0);
}

.signature__generator-indicator {
  border-radius: var(--space-0);
  width: 18px;
  color: var(--drawer-background);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  font-weight: bold;
  box-sizing: border-box;
}

.signature__generator-indicator-invertible {
  background-color: #2980b9;
}

.signature__generator-indicator-oriented {
  background-color: #27ae60;
}

.drawer-expanded .signature__generator-indicator {
  width: auto;
  height: 24px;
  padding: var(--space-0);
}

.signature__generator-previews-wrapper {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.signature__generator-previews-wrapper svg {
  width: 42px;
  height: 30px;
}

.signature__generator-previews-wrapper svg {
  width: 42px;
  height: 30px;
}

.drawer-expanded .signature__generator-previews-wrapper svg {
  width: 84px;
  height: 60px;
}

.signature__generator-preview-spacer {
  box-sizing: border-box;
  width: 5px;
  height: 18px;
}

.signature__generator-picker {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  padding: var(--space-1) var(--space-1) 0 var(--space-1);
  gap: var(--space-0);
  box-sizing: border-box;
}

.signature__generator-picker-color {
  justify-content: space-between;
}

.signature__generator-picker-shape {
  justify-content: flex-start;
}

.signature__generator-picker-preset {
  flex: 1 1 21%;
  height: 24px;
  border-radius: var(--space-0);
}

.signature__generator-picker-shape > .signature__generator-picker-preset {
  flex: 0;
  transition: color 100ms;
}

.signature__generator-picker-custom-wrapper {
  width: 100%;
  height: calc(24px + calc(2 * var(--space-0)));
  border-radius: var(--space-0);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  border: solid var(--drawer-foreground) 1px;
}

.signature__generator-picker-custom-flex {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.signature__generator-picker-custom {
  height: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  outline: none;
  cursor: pointer;
  transition: background-color 100ms;
}

.signature__generator-picker-custom-hex {
  width: 80px;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  color: var(--drawer-foreground);
  cursor: text;
  outline: none;
  text-align: center;
}

.signature__generator-picker-custom-hex-input {
  width: 100%;
  height: 100%;
  padding: calc(var(--space-0) + 2px);
  box-sizing: border-box;
  overflow: hidden;
  border: none;
  outline: none;
  text-align: center;
  color: var(--drawer-foreground);
  font-family: monospace;
  transition: background-color 100ms;
}

.signature__generator-picker-custom-hex-input:hover {
  background-color: var(--drawer-selected);
}

.signature__generator-picker-custom-inner {
  position: relative;
  padding: var(--space-0);
  width: 100%;
  height: 100%;
  bottom: calc(24px + calc(2 * var(--space-0)));
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  pointer-events: none;
}

.signature__generator-preferences-wrapper {
  width: 100%;
  padding: var(--space-0) var(--space-1) 0 var(--space-1);
  box-sizing: border-box;
}

.signature__generator-preference {
  position: relative;
  width: auto;
  height: 26px;
  padding: var(--space-0);
  margin-top: var(--space-0);
  border-radius: var(--space-0);
  transition: background-color 100ms;
  cursor: pointer;
  box-sizing: border-box;
}

.signature__generator-preference:hover {
  background-color: var(--drawer-selected);
}

.signature__generator-preference-options-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.signature__generator-preference-option {
  white-space: nowrap;
  pointer-events: none;
  transition: color 250ms;
}

.signature__generator-preference-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  transition: transform 100ms;
  pointer-events: none;
  z-index: -1;
}

.signature__generator-preference input[type=checkbox] {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Stash */

.stash__element {
  background-color: var(--toolbar-background);
  border: 1px solid var(--toolbar-border);
  border-radius: var(--space-0);
  user-select: none;
}

.stash__diagram {
  overflow: auto;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Diagram SVG */

.diagram-svg__attach-highlight {
  stroke-width: 1px;
  stroke-dasharray: 4;
  stroke: black;
  fill: #ffff0033;
}

.diagram-svg__slice-highlight {
  fill: #ffffff33;
}

svg {
  display: block;
}

/* Attachment Options */

.attach__options {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.attach__option {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  cursor: pointer;
}

.attach__option-name {
  padding: var(--space-1);
  flex: 1;
  display: flex;
  align-items: center;
}

.attach__option-color {
  padding-left: var(--space-1);
}

@media (pointer: fine) {
  .attach__option:hover {
    background: var(--drawer-selected);
  }
}

/* Settings */

.settings h3 {
  margin 0;
  margin-bottom: var(--space-2);
}

.settings__segment {
  border-bottom: 1px solid var(--drawer-border);
  padding: var(--space-1) 0;
  box-sizing: border-box;
}

.settings__segment h4 {
  margin: 0;
  margin-bottom: var(--space-1);
}

.settings__toggle-setting {
  display: flex;
  align-items: left;
  padding-bottom: var(--space-1);
}

.settings__toggle-setting input {
  margin-right: var(--space-1);
  cursor: pointer;
}

.settings__slider-setting {
  padding: var(--space-0) var(--space-0) var(--space-0) 0;
}

.settings__slider-setting input {
  width: 100%;
  cursor: pointer;
}

.version {
  position: absolute;
  bottom: 4px;
  right: 4px;
  color: red;
  pointer-events: none;
}

/* Account */

.account__user-details {
  display: flex;
  margin-bottom: var(--space-1);
}

.account__user-photo {
    border-radius: 100%;
    margin-right: var(--space-1);
}

.account__user-name {
  font-size: 1.3em;
  font-weight: bold;
  margin: auto var(--space-0);
}

.account__save-status {
  text-align: center;
}

.account__save-status-failed {
  color: red;
}

.account__projects-view-toggles-wrapper {
  display: flex;
}

.account__projects-view-toggle {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-1);
  border-radius: var(--space-0);
  text-align: center;
  transition: background-color 100ms;
}

.account__projects-view-toggle-active {
  background-color: #9991;
  border: 2px solid var(--button-border);
  border-bottom: none;
}

.account__projects-view-toggle-inactive {
  cursor: pointer;
}

.account__projects-view-toggle-inactive:hover {
  background-color: var(--drawer-selected);
}

.account__no-projects-msg {
  text-align: center;
  margin-top: var(--space-1);
}

.account__project-list {
  width: 100%;
  list-style-type: none;
  padding: 0;
}

.account__project-list-item {
  width: 100%;
  height: calc(4 * var(--signature-height));
  transition: background-color 100ms;
  box-sizing: border-box;
  padding: 0 4px;
  border-radius: var(--space-0);
  font-weight: bold;
  cursor: pointer;
}

.account__project-list-item.account__project-list-item-current {
  background-color: #9991;
  border: 2px solid var(--button-border);
}

.account__project-list-item:hover {
  background-color: var(--drawer-selected);
}

.account__project-list-item-author {
  color: var(--drawer-foreground-dimmed-text);
}

.account__project-list-item-delete, .account__project-list-item-versions, .account__project-list-item-lm, .account__project-list-item-id {
  text-align: right;
  font-size: 12px;
  font-weight: normal;
}

.account__project-list-item-visibility {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  font-size: 12px;
  font-weight: normal;
}

/* Toaster */

.toaster {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: var(--space-2);
  width: 300px;
}

.toaster__toast {
  position: relative;
  width: 300px;
  min-height: 30px;
  z-index: 1005;
  margin: var(--space-1);
}

.toaster__toast__inner {
  position: relative;
  display: block;
  width: 100%;
  animation: toast__inner 2500ms ease-in-out 0s 1 forwards;
  padding: var(--space-1);
  box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

.toaster__toast--error .toaster__toast__inner {
  background: #c0392b;
  color: white;
}

.toaster__toast--warning .toaster__toast__inner {
  background: #f39c12;
  color: white;
}

.toaster__toast--success .toaster__toast__inner {
  background: #27ae60;
  color: white;
}

@keyframes toast__inner {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% {
    opacity: 1;
    left: 0;
  }
  100% {
    opacity: 0;
    left: calc(300px + var(--space-2));
  }
}

/* Spinner */

@keyframes spin {
	from {transform:rotate(0deg);}
	to {transform:rotate(360deg);}
}

@keyframes fadeIn {
  from {opacity:0;}
  to {opacity:1;}
}

.cover-spin {
    display:block;
    position:fixed;
    width:100%;
    left:0;right:0;top:0;bottom:0;
    background-color: rgba(255,255,255,0.7);
    opacity: 0;
    z-index:9999;
    animation-name: fadeIn;
    animation-duration: .6s;
    animation-timing-function: ease;
    animation-iteration-count: 1;
    animation-delay: .8s;
    animation-fill-mode: forwards;
}

.cover-spin::after {
    content:'';
    display:block;
    position:absolute;
    left:50%;top:50%;
    width:40px;height:40px;
    border-style:solid;
    border-color:black;
    border-top-color:transparent;
    border-width: 4px;
    border-radius:50%;
    animation-name: spin;
    animation-duration: .8s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Modal */

/* The modal's background */
.modal {
  display: none;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1003; /* it should be the top layer (except toaster) */
}

/* Display the modal when targeted */
.modal:target {
  display: table;
  position: absolute;
}

/* The modal box */
.modal-dialog {
  display: table-cell;
  vertical-align: middle;
}

/* The modal's content */
.modal-dialog .modal-content {
  margin: auto;
  background-color: #f3f3f3;
  border: 1px #777 solid;
  width: 680px;
  height: 760px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  z-index: 1003;
  position: relative;
}

.modal-content > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  color: var(--sidebar-foreground);
  background-color: var(--sidebar-background);
}

.modal-button {
  text-decoration: none;
  color: var(--sidebar-foreground);
}

.modal-close {
  z-index: 1002;
  display: block;
  position: fixed;
  width: 100%;
  height: 100%;
}

.help {
  text-align: center;
}

.help table {
  margin: auto;
}

.help-action {
	text-align: right;
}

.help-description {
	text-align: left;
}

/* https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications#using_a_label_element_to_trigger_a_hidden_file_input_element */

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* Separate rule for compatibility, :focus-within is required on modern Firefox and Chrome */
input.visually-hidden:focus + label {
  outline: thin dotted;
}
input.visually-hidden:focus-within + label {
  outline: thin dotted;
}

input[type="text"] { width:100%; }

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
}

.selectable {
  -webkit-user-select: text; /* Safari */
  -ms-user-select: text; /* IE 10 and IE 11 */
  user-select: text; /* Standard syntax */
}

