/* Based on https://getbootstrap.com/docs/4.1/examples/sign-in/signin.css */
html,
body {
    height: 100%;
}

.caret-right {
    border-bottom: 4px solid transparent;
    border-top: 4px solid transparent;
    border-left: 4px solid;
    height: 0;
    opacity: 0.3;
    vertical-align: top;
    width: 100%;
    text-align: right;
}

body.account-page {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: #f5f5f5;
}

body.main-app {
    padding-top: 50px;
}

ul {
    margin-left: 0;
    padding-left: 1em;
}

#user-text-list {
    margin-top: 1em;
}

.center {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

#login-page form, #signup-page form {
    margin-bottom: 2em;
}

#login-page .checkbox, #signup-page .checkbox {
    font-weight: 400;
}
.form-control {
    position: relative;
    box-sizing: border-box;
    height: auto;
    padding: 10px;
    font-size: 16px;
}
.form-control:focus {
    z-index: 2;
}
input.top {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
input.middle {
    margin-bottom: -1px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
input.bottom {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

#messages, #errors {
    /* display: none; */
}

.logout {
    margin-top: 4em;
}


#response {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    min-height: 50px;
    width: 100%;
    border: 1px solid gray;
    background: #333;
    color: #eee;
}

.page {
    /* display: none; */
}

.errors h3, .messages h3 {
    font-size: 125%;
    padding: 0;
    margin-top: .25em;
    margin-bottom: .25em;
}

.errors p, .messages p {
    padding: 0;
    margin-top: .1em;
    margin-bottom: .1em;
}

li.just-uploaded {
    padding: .5em;
    background-color: lightgreen;
    border-radius: 3px;
}

li.tokenization-in-progress {
    color: tan;
}

li.tokenization-error {
    color: red;
}

li.just-uploaded.tokenization-in-progress {
    padding: .5em;
    background-color: yellow;
    border-radius: 3px;
    color: black;
}

li.just-uploaded.tokenization-error {
    padding: .5em;
    background-color: red;
    border-radius: 3px;
    color: white;
}




.error {
    color: red;
}

.note {
    color: #b3a400;
}

* {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    cursor: default;
}

#content {
    /* flex-grow: 1; */
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

#content.annotation-page {
    margin: 0;
    /* padding: 0, 1em, 0, 1em; */
    width: 100%;
    padding: 0;
}

#annotation-panels-wrapper {
    /* flex-grow: 1; */
    flex: 1;
    position: relative;
    box-sizing: border-box;
    margin: 1px 0 0 0;
    padding: 0;
    /* display: table; */
    background-color: white;
}

#annotation-panels {
    /* position: absolute; */
    display: table;
    height: 100%;
    /* top: 0;  */
    /* bottom: 0; */
    /* left: 0; */
    /* right: -1em; */
    /* max-height: 100%; */
    /* width: calc(100% + 1em); */
    width: 100%;
    /* overflow: hidden; */
}

#annotation-panels > * {
    border: 1px solid gray;
    margin: 0 0 1em 0;
    padding: 1em 2em 1em 2em;
    box-sizing: border-box;
}

#text-panel-wrapper {
    display: table-cell;
    position: relative;
    background-color: white;
}

#text-panel {
    font-family: Georgia, 'Times New Roman', Times, serif;
    white-space: pre-wrap;
    font-size: 14pt;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    top: 0;
    bottom: 1.5em;
    left: 0;
    right: 0;
    padding: 1em;
    background-color: white;


    /* height: 200px; */
    /* max-height: 200px; */
    /* width: 40vw;
    position: absolute;
    left: 30vw;
    bottom: 0px;
    top: 0px; */
}

#tieModalTextArea {
    font-family: Georgia, 'Times New Roman', Times, serif;
    white-space: pre-wrap;
    font-size: 14pt;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    padding: 1em;
    margin: 0 auto;
    margin-bottom: 20px;

    max-height: 400px;
    overflow-y: auto;

    border-style: solid;
    border-width: 2px;


    /* height: 200px; */
    /* max-height: 200px; */
    /* width: 40vw;
    position: absolute;
    left: 30vw;
    bottom: 0px;
    top: 0px; */
}

#entity-panel-wrapper{
    width: 30vw;
    display: table-cell;
    position: relative;
    /* position: absolute;
    left: 0vw;
    bottom: 0px;
    top: 0px; */
}

#entity-panel {
    padding: 1em;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: auto;
}

#entity-panel li.group {
    /* display: block; */
    padding-left: 2em ;
    text-indent: -2em ;
}

#entity-panel .pretty {
    text-indent: initial;
}

#network-panel {
    width: 30vw;
    display: table-cell;
    position: relative;
    /* position: absolute;
    left: 70vw;
    bottom: 0px;
    top: 0px; */
}

#network-svg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    /* min-height: 100%; */
}

body.fullscreen #text-panel-wrapper {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    margin: 0;
    margin-right: -1em;
    padding: 0;
}



.entity{
    background-color: green;
}

circle {
}
.node-hover circle, .node-selected circle {
    stroke: blue;
    fill-opacity: 0.5;
    stroke-width: 3;
    
}

g text {
    display: none;
    text-anchor: middle;
    stroke-width: 1;
    stroke: #fff;
    fill: #000;
    font-size: 20pt;
    user-select: none;
    cursor: pointer;
}
.node-hover text, .node-selected text {
    display: block;
}

button.annotated-entity {
    background: none;
    border: none;
}

span.selectedEntity {
    border-top: 3px solid #ff2d50;
    border-bottom: 3px solid #ff2d50;

    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

span.selectedEntity-start {
    border-right: none;
}
span.selectedEntity-end {
    border-left: none;
}

span.selectedEntity.start-token {
    border-left: 3px solid #ff2d50;
    margin-left: -3px;
}

span.selectedEntity.end-token {
    border-right: 3px solid #ff2d50;
    margin-right: -3px;
}

/* CONTEXT MENU */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: solid 1px #dfdfdf;
}

.task:last-child {
  border-bottom: none;
}

.context-menu, .context-menu-hover {
  display: none;
  position: absolute;
  z-index: 10;
  padding: 12px 0;
  width: 240px;
  background-color: RGBA(97, 97, 97, 0.8);
  border: solid 1px #dfdfdf;
  box-shadow: 1px 1px 2px #cfcfcf;
}

.context-menu--active {
  display: block;
}

.context-menu__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.context-menu__item {
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

.context-menu__item:last-child {
  margin-bottom: 0;
}

.context-menu__link {
  display: block;
  padding: 4px 12px;
  color: white;
  text-decoration: none;
}

.context-menu__link:hover {
  color: white;
  background-color: #0066aa;
  text-decoration: none;
  cursor: pointer;
}

.hidden-modal-button {
    background: transparent;
    border: none;
    outline: none;
    display: block;
    height: 0px;
    width: 0px;
    cursor: pointer;
    visibility: hidden;
}

#newGroupNameBox {
    width: 100%;    
}

#text-panel .entity {
    cursor: pointer;
}

.permission-username {
    width: 200px;
    display: inline-block;
}

#permission-template {
    display: none;
}

.saved-icon {
    color: green;
}

#floating-error-container {
    position: fixed;
    top: 40px;
    left: 200px;
    right: 200px;
    z-index: 10001;
    box-sizing: border-box;
}

#floating-error-template {
    display: none;
}

.floating-error {
    width: 100% !important;
}

#graph-export {
    position: relative;
    /* z-index: 1; */
}

.tie-object:hover {
    cursor: pointer;
    background-color: #0066aa;
}

.tie-text {
    text-decoration: underline;
    -webkit-text-decoration-color: DodgerBlue;
    text-decoration-color: DodgerBlue;

    text-decoration-thickness: 2px;
}

.tie-text:hover {
    cursor: alias;
}

#tieObjectTwoDropdown {
    float: right;
}

.dropdown-menu.tieObjectSelector {         
    max-height: 200px;
    overflow-y: auto;
}

.annotation-method {
    color: #999;
    font-style: italic;
}

.graph-export-option {
    margin: 0 20%;
    padding: 0;
    text-align: left;
}

.graph-export-option:hover {
    background-color: #d3d3d3;
    cursor: pointer;
}

.completed-step-form {
    display: inline-block;
}

#step-list .completed, .completion-message {
    color: green;
}

#step-list .pending {
    color: #888;
}

.completion-message {
    /* margin-top: 3em; */
    display: block;
    text-align: center;
    width: 100%;
    font-size: 140%;
}

#fullscreen-toggle-button {
    position: absolute;
    right: 15px;
    top: 0;
}

#selection-info-box {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    padding-left: 1em;
    padding-right: 1em;
    background-color: lightgray;
    border-top: 1px solid gray;
    padding-top: 3px;
}

.selection-info {
    margin: 0 auto;
    font-size: 14px;
    font-style: italic;
}

#svg-canvas {
    display: none;
}

#text-panel-wrapper .expand {
    display: inline-block;
}

body.fullscreen #text-panel-wrapper .expand {
    display: none;
}

#text-panel-wrapper .shrink {
    display: none;
}

body.fullscreen #text-panel-wrapper .shrink {
    display: inline-block;
}

.header-button {
    box-sizing: border-box;
    margin-right: .5em;
}

.navbar {
    margin-bottom: 0 !important;
}

.navbar-right {
    margin-right: .5em !important;
}


/* To prevent flickering of tooltips in Chrome. */
/* See: https://github.com/valor-software/ngx-bootstrap/issues/3075#issuecomment-363461060 */
.tooltip { pointer-events: none; }

/* Based on example from https://www.w3schools.com/howto/howto_css_loader.asp */
.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid rgb(51, 122, 183); /* BS primary */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    display: inline-block;
    margin-top: 2em;
}
  
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing { 
    font-size: 150%;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,.7);
    color: white;
    z-index: 70000;
    padding-top: 200px;
    text-align: center;
}

.suggested-entity {
    background-color: white !important;
    color: black !important;
    border-bottom-width: 2px;
    border-bottom-style: dashed;
}