.modal {
  position: relative;
  width: 0;
  height: 0;
}
.modal-box-orientation {
  position: fixed;
  left: 50vw;
  top: 50vh;
  z-index: 10;
}
.modal-box-orientation.modal-box-orientation-max {
  left: 0;
  top: 0;
}
.modal-box {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 100vw;
  max-height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  box-shadow: 0.25em 0.25em 1em var(--grey);
}
.modal-box-orientation-max .modal-box {
  width: 100vw;
  height: 100vh;
  transform: none;
}
.modal-title {
  display: flex;
  flex-direction: row;
  background-color: var(--grey);
}
.modal-title-text {
  flex-grow: 1;
  flex-shrink: 1;
  font-size: 1.4em;
  padding: 0.25em 0.5em;
  color: var(--primary-dark);
  cursor: move;
  white-space: nowrap;
}
.modal-title-hide,
.modal-title-maximize,
.modal-title-close {
  flex-shrink: 0;
  padding: 0.25em 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.modal-title-hide:hover,
.modal-title-maximize:hover,
.modal-title-close:hover {
  background-color: var(--grey-dark);
}

.modal-title-hide img,
.modal-title-maximize img,
.modal-title-close img {
  width: 1em;
  height: 1em;
}
.modal-body {
  flex-grow: 1;
  flex-shrink: 1;
  overflow: auto;
}
.modal-taskbar:empty {
  display: none;
}
.modal-taskbar {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  padding: 0.25em;
  box-shadow: 0 0 0.5em var(--grey);
  flex-grow: 0;
  flex-shrink: 0;
  max-height: 5em;
  overflow: auto;
  z-index: 1;
}
.modal-taskbar-entry {
  margin: 0.25em;
  cursor: pointer;
  background-color: var(--contrast-blue-light-40);
  max-width: 15em;
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.modal-taskbar-entry div:hover {
  background-color: var(--contrast-blue-light-80);
}
.modal-taskbar-title {
  padding: 0.25em 0.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  flex-shrink: 1;
}
.modal-taskbar-close {
  flex-grow: 0;
  flex-shrink: 0;
  padding: 0.25em;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-taskbar-close img {
  height: 1em;
}