/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  height: 100%;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

#root, #__next {
  isolation: isolate;
}


iframe {
    border: 0;
}

h3 {
    font-weight:400;
}


/* SplashKit Online */
button {
    margin: 0px 3px;
    border-radius: 3px;
    border: 0;
    background-color: transparent;
    color: inherit;
    cursor: pointer;
    transition: color 0.4s, background-color 0.1s;
    line-height: 1em;
}
button:disabled {
    color: #AAA !important;
    cursor: wait;
}

button:hover:enabled {
    background-color: #404040;
}

select {
    -webkit-appearance: button;
    -moz-appearance: button;

    margin: 0px 3px;
    border-radius: 3px;
    border: 0px black solid;
    background-color: transparent;
    color: inherit;
    cursor: pointer;
    outline:none;
    line-height: 1em;
}

select:disabled {
    color: #AAA;
}

select:hover {
    background-color: #303030;
}

input {
    margin: 0px 3px;
    border-radius: 3px;
    border: 0;
    background-color: transparent;
    color: inherit;
    outline:none;
    line-height: 1em;
}

a:visited {
    color: #0A0;
}

.sk-body {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0px;
    color: white;
    background-color: #1f1f1f;

    display:flex;
    flex-direction: column;

    font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.sk-header {
    background-color: #1f1f1f;
    box-shadow: 0 1px 0 0.4px #404040 inset;
    color: white;
    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;
}

.sk-menu {
    background-color: #1f1f1f;
    color: white;
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: space-between;
    border-top: 1px #404040 solid;
    min-width: 0;
}

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

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

.sk-tabs {
    background-color: #1f1f1f;
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: space-between;
    color:#AAA;
    min-width: 0;
}
.sk-tabs li:hover {
    background-color: #222328;
}
.sk-tabs li {
    display:flex;
    padding: 0px 20px;
    border-top: 1px #404040 solid;
    border-right: 1px #404040 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: #24262d;
    box-shadow: none;
    z-index: 5;
    border-top: #3AF 1px solid !important;
    color: white;
}
.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;
}

.sk-contents {
    background-color: #1f1f1f;
    box-shadow: 0 0 0 1px #404040;
    /*border: 1px #404040 solid;*/

    display:flex;
    flex-direction: column;
    flex-grow:1;
    color: white;
    min-height: 0;
}

.sk-contents-darker {
    background-color: #1B1B1B;
}
.sk-contents-focusable:focus-within {
    box-shadow: 0 0 0 1px #19F;
    z-index:10;
}
textarea {
    outline: none;
}



.fade-on-create {
    animation: fadein .2s;
}
@keyframes fadein {
    from {
        opacity:0;
    }
    to {
        opacity:1;
    }
}

.sk-demo-window-container{
    width:100%;
    position:fixed;
    height:100%;
    z-index:1000;
    padding: 10% 20%;
    /*backdrop-filter: blur(1px) brightness(80%);*/
    background-color: #0005;
}

.sk-demo-window{
    position:relative;
    height: 100%;
    margin:auto;
    pointer-events:initial;
}

.sk-demo-window-loading-text{
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    text-align:center;
    z-index:100;
}

.sk-demo-thumbnail-grid-container{
    overflow: auto;
}

.sk-demo-thumbnail-grid{
    display: grid;
    gap: 20px;
    flex-direction: row;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    flex-grow: 0;
    margin-top:1em;
    margin-bottom:1em;
}

.sk-demo-tags{
    position:absolute;
    top:0px;
    left:0px;
    right:0px;
    background:none;
    justify-content: end;
    box-shadow: none;
}

.sk-demo-tag{
    background-color: #303724;
    border-radius: 5px;
    color: #68ff00;
    line-height: 1.5em;
    margin-top: 0.25em;
    padding: 0px 10px;
}

.sk-demo-title{
    position:absolute;
    bottom:0px;
    left:0px;
    right:0px;
    background-color:#111D;
    justify-content: center;
}

.sk-demo-thumbnail{
    overflow: hidden;
    box-shadow: rgba(0,0,0,0.2) 4px 4px 10px 0px;
    position:relative;
    transition: filter 0.1s;
    cursor:pointer;
}
.sk-demo-thumbnail:hover{
    filter:brightness(125%);
}

.sk-demo-thumbnail-img{
  aspect-ratio: 16/9;
  object-fit: contain;
  width: 100%;
}



.sk-main-columns {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-grow: 1;
}

.sk-column {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

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

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

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

.sk-notification-area {
    position: absolute;
    right: 3em;
    left: 3em;
    bottom: 3em;
    z-index: 10;
    pointer-events: none;
}

.sk-notification-body {
    margin: 0px 5em 0px 1.5em;
    flex-grow: 1;
}

.sk-notification {
    box-shadow: rgba(0,0,0,0.7) 4px 4px 10px 0px;
    padding: 1em;
    display: flex;
    flex-direction: row;
    width: 30em;
    max-width: 100%;
    margin-top: 1em;
    transition: opacity 0.4s;
    opacity: 1;
    margin-left: auto;
    pointer-events: all;
}

.sk-notification.sk-contents-focusable:focus-within {
    box-shadow: 0 0 0 1px #19F, rgba(0,0,0,0.7) 4px 4px 10px 0px;
    z-index:10;
}

.sk-terminal {
    overflow-y: scroll;
    flex-basis: 0;
    border:0;
    padding-left:1em;
    resize: none;
    font-family: monospace, serif;
    white-space: pre-wrap;
    background-color: #161616;
}

.sk-code-view-message {
    position:absolute;
    padding: 3em;
    transition: all 0.5s ease;
    opacity: 0;
    width:100%;
    height:100%;
    overflow: hidden;
}

.sk-terminal > :nth-child(2) {
    margin-top: auto !important;
}

#runProgram,
#collapsedRunProgram {
    color: #9fff69;
}

.sk-terminal-input-wrapper {
    padding: 0 1em;
    overflow: hidden;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3) inset;
    display: flex;
    font-family: monospace, serif;
    white-space: pre-wrap;
}
.sk-terminal-input-wrapper input {
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

.node{
    color:#f8f8f2;
    cursor: pointer;
}
.node-label:hover{
    background-color:#242732;
    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-button{
    background: none;
    border: none;
    color: white;
    padding: 0;
    margin: 0;
}
.node-button:hover{
    color: lime;
}
.node-transient{
    opacity: 0.7;
    color: #f8f8f2;
}
.node-persistent{
    color: #f8f8f2;
}
.node-persistent.node-transient{
    color: #9fff69;
    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: lightcoral;
}
.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;
}
.closed-directory{}
.open-directory{}


[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:#26A;
    opacity:100%;
    right:0px;
    left:0px;
}
.error-line{
    text-decoration-color: #d94747 !important;
    text-decoration: underline wavy;
    background-color: #6c514f;
}

/* make the CodeMirror theme match the rest of the UI a little more */
.cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters {
    background-color: #24262d !important;
}


.CodeMirror-scrollbar-filler {
    background-color: #282a36 !important;
}
.CodeMirror-activeline-background {
    opacity: 0;
}
.CodeMirror-focused .CodeMirror-activeline-background {
    opacity: 0.5;
}

.CodeMirror-hints{
    position: absolute;
    z-index: 10;
    overflow: hidden;
    list-style: none;

    margin: 0;
    padding: 2px;

    -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
    -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
    box-shadow: 2px 3px 5px rgba(0,0,0,.2);
    border-radius: 3px;
    border: 1px solid silver;

    background-color: #282a36 !important;
    color: #f8f8f2 !important;
    font-size: 90%;
    font-family: monospace;

    max-height: 20em;
    overflow-y: auto;
    box-sizing: border-box;
    opacity:0.9;
}

.CodeMirror-hint{
    margin: 0;
    padding: 0 4px;
    border-radius: 2px;
    white-space: pre;
    color: #f8f8f2 !important;
    cursor: pointer;
}

li.CodeMirror-hint-active {
    background: #08f;
    color: white;
}


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

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

/* Leftover stuff from bootstrap */

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
}
.btn-close:hover {
  color: #000;
  text-decoration: none;
  opacity: 0.75;
}
.btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  opacity: 1;
}
.btn-close:disabled, .btn-close.disabled {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  opacity: 0.25;
}

.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal {
  --bs-modal-zindex: 1055;
  --bs-modal-width: 500px;
  --bs-modal-padding: 1rem;
  --bs-modal-margin: 0.5rem;
  --bs-modal-color: ;
  --bs-modal-bg: #fff;
  --bs-modal-border-color: var(--bs-border-color-translucent);
  --bs-modal-border-width: 1px;
  --bs-modal-border-radius: 0.5rem;
  --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --bs-modal-inner-border-radius: calc(0.5rem - 1px);
  --bs-modal-header-padding-x: 1rem;
  --bs-modal-header-padding-y: 1rem;
  --bs-modal-header-padding: 1rem 1rem;
  --bs-modal-header-border-color: var(--bs-border-color);
  --bs-modal-header-border-width: 1px;
  --bs-modal-title-line-height: 1.5;
  --bs-modal-footer-gap: 0.5rem;
  --bs-modal-footer-bg: ;
  --bs-modal-footer-border-color: var(--bs-border-color);
  --bs-modal-footer-border-width: 1px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--bs-modal-zindex);
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal-dialog {
  position: relative;
  width: 30%;
  margin: var(--bs-modal-margin);

  margin-right: auto;
  margin-left: auto;
}
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}
@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog {
    transition: none;
  }
}
.modal.show .modal-dialog {
  transform: none;
}
.modal.modal-static .modal-dialog {
  transform: scale(1.02);
}

.modal-dialog-scrollable {
  height: calc(100% - var(--bs-modal-margin) * 2);
}
.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: hidden;
}
.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - var(--bs-modal-margin) * 2);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: var(--bs-modal-color);
  pointer-events: auto;
  background-color: var(--bs-modal-bg);
  background-clip: padding-box;
  border: var(--bs-modal-border-width) solid var(--bs-modal-border-color);
  border-radius: var(--bs-modal-border-radius);
  outline: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}
.modal-backdrop.fade {
  opacity: 0;
}
.modal-backdrop.show {
  opacity: 0.5;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: var(--bs-modal-header-padding);
  border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);
  border-top-left-radius: var(--bs-modal-inner-border-radius);
  border-top-right-radius: var(--bs-modal-inner-border-radius);
}
.modal-header .btn-close {
  padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5);
  margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto;
}

.modal-title {
  margin-bottom: 0;
  line-height: var(--bs-modal-title-line-height);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: var(--bs-modal-padding);
}

#output > div:first-child {
    display: none;
}

.loading-container {
  display: flex;
  opacity: 0; /* hide by default */
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  flex-direction: column;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.loading-bar {
  width: 50%;
  background-color: #444;
  border-radius: 25px;
  overflow: hidden;
}

.loading-progress {
  width: 0;
  height: 1.4em;
  background-color: #24262d;
}

.loading-text {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  color: white;
}

/* Modal UI changes */

.modal .sk-header {
  padding: 1.5em 1em; 
  display: flex; 
  align-items: center; 
}

.modal .sk-modal-footer {
  padding: 1.3em 1em; 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
}

.btn {
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.2);
  line-height: 1em;
  padding: 0.5em;
}

.btn:last-child {
  margin-right: 0;
}


.btn-secondary {
  color: white; 
}

.btn-success {
  color: #54ff3b;
}

.btn-success:hover, .btn-success:focus {
  background-color: #2d332f;
}

.flex-column {
    display: flex;
}

/* Canvas scaling fix */

#canvas {
  max-height: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

.sk-term-fmt-code1 {font-weight: bold;}
.sk-term-fmt-code3 {font-style: italic;}
.sk-term-fmt-code4 {text-decoration: underline;}
.sk-term-fmt-code9 {text-decoration: line-through;}
.sk-term-fmt-code21, .sk-term-fmt-code22 {font-weight: normal;}
.sk-term-fmt-code23 {font-style: normal;}
.sk-term-fmt-code24, .sk-term-fmt-code29 {text-decoration: none;}

.sk-term-fmt-code30, .sk-term-fmt-code90 {color: black;}
.sk-term-fmt-code31, .sk-term-fmt-code91 {color: red;}
.sk-term-fmt-code32, .sk-term-fmt-code92 {color: lime;}
.sk-term-fmt-code33, .sk-term-fmt-code93 {color: yellow;}
.sk-term-fmt-code34, .sk-term-fmt-code94 {color: blue;}
.sk-term-fmt-code35, .sk-term-fmt-code95 {color: magenta;}
.sk-term-fmt-code36, .sk-term-fmt-code96 {color: cyan;}
.sk-term-fmt-code37, .sk-term-fmt-code97 {color: white;}

.sk-collapsed-column {
  box-shadow: 0 1px 0 0.4px #404040 inset;
  display: flex;
  flex-direction: column;
}

.sk-collapsed-column button {
  font-size: 1.1em;
  padding: 0.5em;
}

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

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

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

/* 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;
}
