.main {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
}

.editorContainer {
    position: relative;
    width: auto;
    height: 100%;
    z-index: 0;
    background-color: #0a0a0a;
    color: #c0c0c0;
    flex-grow: 1;
}

.dummyText {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: -100px;
    left: -100px;
}

.instructionGroup {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

.instructionGroup.editMode {
    pointer-events: all;
    user-select: auto;
}

/* .instructionElm.active {
    pointer-events: all;
} */

.instructionGroup .editable .cursor {
    display: inline;
    background-color: #3665ffa2;
}

.instructionGroup .editable .cursor.hidden {
    background-color: #6b6b6ba2;
}

.instructionGroup .editable .cursor {
    margin-right: -2px;
    border-width: 0px;
    border-color: #6086f0;
    border-style: solid;
    border-right-width: 2px;
}

.instructionGroup .editable .cursor.backwards {
    margin-left: -2px;
    margin-right: 0;
    border-left-width: 2px;
    border-right-width: 0;
}

.instructionGroup .editable .cursor.hidden {
    margin-left: 0;
    margin-right: 0;
    border-left-width: 0;
    border-right-width: 0;
}

.instructionGroup .inputCapture {
    position: absolute;
    width: 100%;
    height: 1px;
    opacity: 0;
    font: inherit;
    transform: scaleY(0.001);
    left: -2ch;
    margin: 0;
    border: 0;
    padding: 0;
    resize: none;
    pointer-events: none;

    /** Prevent wrapping */
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: scroll;
}

/** Debug */

/* .instructionGroup .inputCapture {
    height: 64px;
    opacity: 0.4;
    transform: translateX(500px);
} */

.instructionLine:first-of-type {
    padding-top: 8px;
}

.instructionLine:last-of-type {
    padding-bottom: 8px;
}

.instructionLine {
    color: #ffffff7a;
    padding-left: 12px;
    padding-right: 12px;
    white-space: pre-wrap;
    line-height: 1.55;
    min-height: 1.55em;
}

.instructionLine .editable {
    color: #ffffffb5;
    display: inline;
    height: 1em;
}

.instructionLine.jump {
    color: #e6647ac9;
    background-color: #ff000017;
}

.instructionLine.jump .editable {
    color: #e6647a;
}

.instructionLine.jump.hanging {
    color: #cfa3a96c;
    background-color: #a773732c;
}

.instructionLine.jump.hanging .editable {
    color: #cfa3a9;
}

.instructionLine.control {
    color: #598cebc9;
    background-color: #2019e623;
}

.instructionLine.control .editable {
    color: #598ceb;
}

.instructionLine.secondary {
    color: #35b39e9c;
}

.instructionLine.secondary .editable {
    color: #35b39e;
}

.instructionLine.newInstructionLine {
    font-style: italic;
}

.instructionLine.newInstructionLine .placeholder {
    color: #c0c0c08c;
}

.instructionLine.newInstructionLine .placeholder.hidden {
    display: none;
}

.instructionLine .branchConnect {
    cursor: pointer;
    pointer-events: all;
    /* override allow clicks outside edit mode */
    position: absolute;
    right: 8px;
}

.instructionLine .hanging .branchConnect {
    color: #cfa3a9;
}

.instructionLine .branchConnect::before {
    color: #e6647a;
    content: "[>]";
}

.instructionLine .branchConnect.active::before {
    content: "[click target...]";
    font-weight: bold;
}

.instructionLine [contenteditable] {
    outline: none;
}

.autocomplete {
    font-family: monospace;
    font-size: 14px;
    background: #181818;
    box-shadow: 0px 2px 8px #000000ad;
    position: absolute;
    padding-top: 4px;
    padding-bottom: 4px;
    width: auto;
    z-index: 1;
    white-space: pre;
}

.autocomplete:empty {
    display: none;
}

.autocomplete .suggestion {
    padding-left: 4px;
    padding-right: 4px;
    max-width: 460px;
}

.autocomplete .suggestion .headingLine {
    display: flex;
    align-items: center;
    column-gap: 16px;
}

.autocomplete .suggestion .headingLine .title {
    flex-grow: 1;
}

.autocomplete .suggestion .headingLine .subtitle {
    font-size: 0.85em;
    line-height: 14px;
    opacity: 0.8;
}

.autocomplete .suggestion .headingLine .subtitle:empty {
    display: none;
}

.autocomplete .suggestion .description {
    height: 0;
    font-size: 0.85em;
    opacity: 0;
    overflow: hidden;
    white-space: pre-wrap;
}

.autocomplete .suggestion.selected {
    background-color: #333333;
}

.autocomplete .suggestion.selected .description {
    height: auto;
    display: block;
    opacity: 0.8;
}

.rightPanel {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: #222222;
    color: #cfcfcf;
    box-shadow: 0px 0px 32px #0000008a;
    width: 33%;
}


.rightPanel.collapsed .rightBottomPanel {
    display: none;
}

.rightPanel .resizeHandle {
    position: absolute;
    background-color: transparent;
    transition: 0.1s ease background-color;
}

.rightPanel .resizeHandle:hover {
    background-color: #3862d8;
    z-index: 1;
}

.rightPanel .horizontalResizeHandle {
    top: 0;
    left: -3px;
    height: 100%;
    width: 6px;
    cursor: col-resize;
}

.rightPanel.collapsed .horizontalResizeHandle {
    top: 0;
    left: 0px;
    height: 100%;
    /* 8px to match collapsed width */
    width: 8px;
    cursor: col-resize;
}

.rightPanel .verticalResizeHandle {
    left: 0;
    top: -3px;
    width: 100%;
    height: 6px;
    cursor: row-resize;
}

.rightPanel .collapsed .verticalResizeHandle {
    left: 0;
    top: 0px;
    width: 100%;
    /* 8px to match collapsed height */
    height: 8px;
    cursor: row-resize;
}

.collapsed .executerContainer .fileOperationsBar {
    position: absolute;
    right: 0;
    width: auto;
    white-space: pre;
    z-index: 2;
}

.executerContainer .fileOperationsBar {
    text-align: right;
}

.executerContainer .fileOperationsBar button.deleteAndReload {
    color: #ffecec;
    background-color: #8b4646;
}

.executerContainer .fileOperationsBar button.deleteAndReload:hover {
    background-color: #942a2a;
}

.modalContainer {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    color: #c0c0c0;
}

.modalContainer:empty {
    display: none;
}

.textOpDialogue {
    padding: 8px;
    margin: 86px auto;
    width: 100vw;
    height: 100vh;
    max-height: 560px;
    max-width: 420px;
    background-color: #333333;
    pointer-events: all;
    user-select: auto;
    box-shadow: 0px 2px 8px #000000ad;
}

.textOpDialogue textarea {
    user-select: all;
    resize: none;
    box-sizing: border-box;
    width: 100%;
    height: 50%;
    background-color: transparent;
    color: inherit;
}

.rightPanel .rightBottomPanel {
    position: relative;
    border-top: 2px solid #3a3a3a;
    background-color: #181818;
    height: 33%;
}

.rightPanel .rightBottomPanel.collapsed .projectFilesDisplay {
    display: none;
}

.rightPanel .projectFilesDisplay {
    width: 100%;
    height: 100%;
}

.projectFilesDisplay.nullProject {
    cursor: pointer;
}

.projectFilesDisplay.nullProject .nullProjectNotice {
    padding: 8px;
    position: absolute;
    color: #888;
    font-style: italic;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    top: 50%;
    transform: translateY(-50%);
}

.projectFilesDisplay .directoryTabs {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.projectFilesDisplay .directoryTabs .tabs {
    line-height: 1em;
    background-color: #222222;
    color: #c9c9c9;
}

.projectFilesDisplay .directoryTabs .tabs button {
    background-color: transparent;
}

.projectFilesDisplay .directoryTabs .tabs button:hover {
    background-color: #303030;
}

.projectFilesDisplay .directoryTabs .tabs button.active {
    background-color: #181818;
}

.projectFilesDisplay .directoryTabs .tabContent {
    flex-grow: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

.projectFilesDisplay .directoryTabs .items {
    padding-left: 8px;
    padding-right: 8px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.projectFilesDisplay .directoryTabs .items .item,
.projectFilesDisplay .directoryTabs .items .addFileItem {
    font-size: 0.8em;
    cursor: pointer;
    line-height: 1.8em;
}

.projectFilesDisplay .directoryTabs .items .item {
    display: flex;
    flex-direction: row;
    border-bottom: #202020 2px solid;
}

.projectFilesDisplay .directoryTabs .items .addFileItem {
    font-style: italic;
    color: #9e9e9e;
}

.projectFilesDisplay .directoryTabs .items .item:hover,
.projectFilesDisplay .directoryTabs .items .addFileItem:hover {
    background-color: #202020;
}

.projectFilesDisplay .directoryTabs .items .item .filename {
    flex-grow: 1;
}

.projectFilesDisplay .directoryTabs .items .item .fileOps {
    white-space: pre;
    width: 48px;
    opacity: 0;
}

.projectFilesDisplay .directoryTabs .items .item:hover .fileOps {
    opacity: 1;
}

.projectFilesDisplay .directoryTabs .items .item .fileOps button {
    background-color: transparent;
    color: inherit;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    height: 1.8em;
}

.projectFilesDisplay .directoryTabs .items .item .fileOps button.delete {
    color: #ffecec;
    background-color: #683333;
}

.projectFilesDisplay .directoryTabs .items .item .fileOps button:hover {
    background-color: #3b3b3b88;
}

.projectFilesDisplay .directoryTabs .items .item .fileOps button.delete:hover {
    background-color: #682222;
}