/* Modal */
#greyout {
    display: none;
    position: absolute;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}
.siac-modal-overlay {
    position: absolute;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
  }

  .modal-content {
    background: var(--c-card-bg);
    color: var(--c-modal-foreground);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px;
    width: 80%;
    max-height: 80%;
    border: 4px outset var(--c-modal-border);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.nightMode .modal-content {
    background: #2f2f31;
}
.modal-close {
    cursor: pointer;
    user-select: none;
    font-weight: bold;
}
.modal-close:hover {
    border-color: var(--c-button-border-hover);
}


.siac-modal {
    z-index: 100;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 200px);
    max-width: 1100px;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.siac-modal-small {
    z-index: 100;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    text-align: center;
}
.siac-modal-body {
    padding: 15px;
    background: var(--c-card-bg);
    flex: 1 1 auto;
    overflow-y: auto;
}
body.nightMode .siac-modal-body {
    background: var(--c-card-bg);
    color: white;
}

.siac-modal-body fieldset {
    border: 1px solid lightgrey;
}
body.nightMode .siac-modal-body fieldset {
    border-color: #5d5d5d;
}
.siac-modal-body input {
    border-radius: 3px;
    background: transparent;
    border: 1px solid lightgrey;
}
body.nightMode .siac-modal-body input {
    border-color: #5d5d5d;
    color: white;
}
.siac-modal-body table img {
    max-height: 100px;
}

/* Markdown edit */
#siac-md-edit-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(0,0,0,0.7);
}
#siac-md-edit {
    position: absolute;
    top: 20px;
    right: 20px;
    left: 20px;
    bottom: 20px;
    display: flex; 
    flex-direction: column;
    background: var(--c-note-bg);
}