/*  */

/* All sk header related styles */
.sk-header {
    background-color: var(--gutterColour);
    box-shadow: 0 1px 0 0.4px var(--shadowColour) inset;
    color: var(--primary);
    display: flex;
    list-style: none;
    margin: 0px;
    padding: 0px 10px 0px 0px;
    justify-content: space-between;
    height: 2em;
    line-height: 2em;
}

.sk-header-indent {
    padding-left: 1em;
}



.gutter {
    display: flex;
    flex-direction: row;
    cursor: e-resize;
    z-index:100;
}

.gutter-vertical {
  cursor: ns-resize;
}

.gutter-horizontal {
  cursor: e-resize;
}

.sk-menu {
    background-color: var(--gutterColour);
    color: var(--primary);
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: space-between;
    border-top: 1px var(--shadowColour) solid;
    min-width: 0;
}

.sk-menu li {
    display:flex;
    min-width: 0;
}

.sk-menu li *{
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* This class holds all elements of the IDE */
.sk-main-columns {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-grow: 1;
}

.sk-column {
    width: 100%;
}

/* 
    Pixel calculations:
    This comes from the width of the gutters
    There are two gutters between the thre sections of content
    They must add up to 12px
*/

#runProgram,
#collapsedRunProgram {
    color: var(--fileColour);
}

#codeViewContainer {
    /* See pixel calculations for where 6px comes from */
    width: calc(50% - 6px);
}

#fileViewContainer {
    /* See pixel calculations for where 3px comes from */
    width: calc(20% - 3px);
}

#runtimeContainer {
    /* See pixel calculations for where 3px comes from */
    width: calc(30% - 3px);
}

#tabBar {
    display: none;
}

/* Editor code */

#codeEditorContainer {
    height: auto;
}

/* New changes for scrollbar in FILES explorer section */

#fileViewContainer .sk-contents-focusable {
  overflow: auto;
}


/* Run program button icons - join the gear and play icons together */
.run-program .bi-gear-fill {
  position: absolute;
  font-size: 0.5em;
  margin-left: -0.1em;
  margin-top: 0.64em;
  opacity: 0.5;
}


.sk-hidden {
  display: none !important;
}

.sk-header-title {
  text-wrap: nowrap;
}

.sk-minified .directory-contents {
  padding-left: 15px;
}


/* Fs related styles */
.node{
    color:var(--primary);
    cursor: pointer;
}
.node-label:hover{
    background-color:var(--nodeHover);
    cursor: pointer;
}
.node-label{
    width:100%;
    display:flex;
    flex-direction: row !important;
    padding: 0px 20px 0px 0px;
}
.node-label-text{
    flex: 1;
    padding: 0px 0px 0px 3px;
}

.node-persistent::before {
    color: var(--fileColour);
}

.bi-folder2-open {
    color: var(--fileColour);
}

.node-button{
    background: none;
    border: none;
    color: var(--primary);
    padding: 0;
    margin: 0;
}
.node-button:hover{
    color: var(--iconHover);
}
.node-transient{
    opacity: 0.7;
    color: var(--errorColour);
}
.node-persistent{
    color: var(--primary);
}
.node-persistent.node-transient{
    color: var(--fileColour);
    opacity: 1.0;
}
.node-tentative-label{
	margin: 0px 6px 0px 6px;
}
.node-conflict{
	width:100%;
	display:flex;
    flex-direction: row !important;
	padding: 0px 20px 0px 0px;
	margin-left: 6px;
	color: var(--nodeConflict);
}
.node-conflict-text{
	flex: 1;
	padding: 0px 0px 0px 3px;
	text-wrap: nowrap;
}

.directory-contents{
    padding:00px 0px 0px 30px;
    transition: max-height 0.3s ease;
    overflow:hidden;
}


[class^="bi-"]::before, [class*=" bi-"]::before {
    line-height: inherit !important;
}


.in-drag{
    opacity:50%;
    cursor:grabbing !important;
    position:fixed;
}

.insertion-point-display{
    position:absolute;
    height:2px;
    background-color:var(--activeTabColour);
    opacity:100%;
    right:0px;
    left:0px;
}



/* tabs for IDE */

.sk-tabs {
    background-color: var(--gutterColour);
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: space-between;
    color:var(--disabled);
    min-width: 0;
}
.sk-tabs li:hover {
    background-color: var(--languageSelectBackground);
}
.sk-tabs li {
    display:flex;
    padding: 0px 20px;
    border-top: 1px var(--shadowColour) solid;
    border-right: 1px var(--shadowColour) solid;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 0;
}
.sk-tabs li .sk-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space:nowrap;
}

.sk-tabs-active {
    background-color: var(--editorBackgroundColour);
    box-shadow: none;
    z-index: 5;
    border-top: var(--activeTabColour) 1px solid !important;
    color: var(--primary);
}
.sk-tab-hidden {
    display: none;
}

.sk-tabs li[data-tab]::after {
    content: "\25BC";
    margin-left: 5px;
    visibility: hidden;  
    display: inline-block;   
}

.sk-tabs li[data-tab]:hover::after {
    visibility: visible;
}


#fileViewContainer, #codeViewContainer, #runtimeContainer, #menu {
    display: block;    
}

#menu {
    display: flex;
}

#skMainMenu {
    display: flex;
}

#codeViewContainer, .CodeMirror-scroll, #codeEditorContainer {
    height: 100%;
    box-sizing: border-box;
}

#codeEditorContainer {
    height: 100%;
}

/* Styling for mobile view */
@media screen and (max-width: 600px) {
    .sk-main-columns {
        display: flex;
        flex-direction: column;
        overflow: scroll;
    }

    #codeViewContainer, #fileViewContainer, #runtimeContainer {
        width: 100%;
    }


    .sk-header {
        flex-direction: column;
        justify-content: initial;
        height: fit-content;
    }

    .sk-menu {
        flex-direction: column;
        justify-content: initial;
        width: 100%;
        height: 100%;
        align-items: center;
    }

    .sk-menu li button {
        width: 100%;
    }

    #codeViewContainer {
        width: 100% ;
    }

    /* Buttons for tabs */
    #tabBar {
        display: block;
        height: 10vh;
        background-color: var(--editorBackgroundColour);
        box-shadow: 1px 4px var(--shadowColour);
        position: fixed;
        display: flex;
        justify-content: space-around;
        bottom: 0;
        right: 0;
        left: 0;

        section {
            margin-top: auto;
            display: flex;
            flex-direction: column;
            justify-content: space-around;

            .menu-icon {
                font-size: 30px;
            }
            p {
                margin-inline: auto;
                font-size: 13px;
            }
        }
    }

    #fileViewContainer, #codeViewContainer, #runtimeContainer, #menu {
        display: none;
        height: 90vh;
    }

    #codeViewContainer {
        display: block;
        height: 88vh;
    }

    .CodeMirror-scroll {
        height: 100% !important;
    }

    .sk-contents {
        height: 100%;
    }

    #menu {
        height: 50%;
    }

    /* Styling for main menu */
    #skMainMenu {
        li {
            margin-top: auto;
            margin-bottom: auto;
            width: 100%;
            button {
                font-size: 20px;
                width: 100%;
            }
            img {
                margin-inline: auto;
            }
        }

    }

    #languageSelector {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

}