@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css");

html:-webkit-full-screen {
    background: black;
}

html:-ms-fullscreen {
    background: black;
    width: 100%; /* needed to center contents in IE */
}

html:fullscreen {
    background: black;
}

html {
    padding : 0;
    color : white;
    max-width: 100%;
    overflow: hidden;
}

.bi {
    padding : 4px;
}

.CodeMirror-scrollbar-filler {
    background-color: black !important;
    opacity: 0.4;
}

#resWarning,#fileUpload {
    display: none;
    position: absolute;
    background-color: rgb(141, 49, 49);
    width: 100%;
    height: 100%;
}

#resWarning > p {
    font-size : 10px;
}

@media screen and (max-width : 728px){
    #resWarning {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        z-index: 4;
    }
    .main {
        display :none;
    }
    .window {
        display : none;
    }
}

body {
    margin :0;
    background-color: rgb(63, 62, 62); /*grey; */
    font-family: 'Montserrat','Atkinson Hyperlegible','Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

#startupBackground {
    position: absolute;
    bottom:50%;
    right:50%;
    transform: translate(50%,50%) rotate(330deg);
    width : 200%;
    height : 200%;
    opacity: 0.5;
    z-index: -1;
}

svg {
    color: white;
    width : 25px;
    height : 25px;
}

#tabs {
    width : 100%;
    height: 32px;
    display: flex;
    justify-content: left;
    background-color: grey;
    border-top : 2px solid grey;
}

.tab {
    height : 32px;
    background-color : grey;
    color : white;
    padding-left : 12px;
    padding-right: 10px;
    display :flex;
    position : relative;
    justify-content: center;
    align-items: center;
    user-select: none;
    -moz-user-select: none;
    cursor:pointer;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: 0.15s;
}

.tabSeparator {
    width: 1px;
    height : 25px;
    margin-top: 4px;
    background-color: rgb(63, 62, 62);
}

#emulatorBtn {
    width : 32px;
    display : flex;
    justify-content: center;
    align-items: center;
    padding:0;
    margin-left : 2px;
}

#emulatorScreenContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
#emulatorStatus {
    display : flex;
    justify-content: center;
    align-items: center;
}

.memTable {
    border-collapse: collapse;
    border: 2px solid rgb(102, 102, 102);
    height: 100%;
}

.memTable td {
    border : 2px solid rgb(102, 102, 102);
    text-align: center;
}

@keyframes hide {
    0% {
        opacity: 1;
        height : 32px;
    }
    100% {
        opacity: 0;
        height: 0;
        display : none;
    }
}

@keyframes show {
    0% {
        opacity: 0;
        height : 0px;
        display: block;
    }
    100% {
        opacity: 1;
        height: 32px;
    }
}

@keyframes zoominout {
    0% {
        font-size : 24px;
    }
    50% {
        font-size :32px;
    }
    100% {
        font-size : 24px;
    }
}

#fullScreenBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    position : absolute;
    bottom : 4px;
    right : 4px;
    color : black;
    background-color: transparent;
    width : 32px;
    height : 0px;
    animation: hide 0.4s;
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
}

#canvasContainer:hover > #fullScreenBtn {
    animation: show 0.4s;
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
}

#fullScreenBtn > i {
    font-size: 24px;
}

#fullScreenBtn:hover > i {
    animation: zoominout 0.4s;
    animation-iteration-count: 1;
}

#canvasContainer {
    width : 90%;
    min-height : 200px;
    max-height : 65vh;
    max-width : calc(2 * 65vh);
    position: relative;
}

.canvasWrapper {
    display: flex;
    width: 100%;
    justify-content: center;
}

#canvasContainer > canvas {
    width : 100%;
    height: 100%;
}

#vmBtn > svg, #compilerBtn > svg, #assemblyBtn > svg {
    padding-right : 4px;
}

.window {
    display : none;
    padding : 10px;
    overflow: auto;
    max-height : calc(100vh - 70px);
}

#startup {
    display : block;
}

#assemblyContent, #VMContent,#CompilerContent,#emulatorContent {
    display : flex;
    justify-content: space-between;
}

#assemblyInputOutput, #VMInputOutput, #CompilerInputOutput {
    display : flex;
    width : 60%;
    justify-content: space-between;
}

#assemblyRightSide, #vmRightSide,#compilerRightSide {
    width : 36%;
}

.output {
    width : 95%;
    height : 40%;
    background :black;
    color : white;
    resize: none;
    outline: none;
    border: none;
    margin-bottom: 10px;
}

.outputHeader {
    width : 95%;
    padding : 2px;
    color : white;
    background : #262626;
    user-select: none;
}

.ressourcesBox {
    width : 95%;
    padding : 2px;
    background : black;
    color : white;
}

textarea{
    /*Check the CodeMirror documentation in order to make better textareas*/
    width : 20%;
    height : 75vh;
}

.tab.inactiveTab {
    background-color: grey;
}

.tab.inactiveTab:hover  {
    background-color: rgb(163, 163, 163) ;
}

.tab.inactiveTab:hover .tabCornerLeft,.tab.inactiveTab:hover .tabCornerRight { background-color: rgb(163, 163, 163); }

.tab.inactiveTab:hover .rounder { background-color: grey; }

.tabCornerLeft {
    position : absolute;
    left : -4px;
    bottom : 0px;
    background-color: transparent;
    width : 4px;
    height : 4px;
    transition: none;
}

.tabCornerRight {
    position : absolute;
    right : -4px;
    bottom: 0px;
    background-color: transparent;
    width : 4px;
    height : 4px;
    z-index: 2;
    transition: none;
}

.tabCornerLeft > .rounder {
    border-bottom-right-radius: 4px;
    background-color: transparent;
    width : 4px;
    height : 4px;
    transition: none;
}

.tabCornerRight > .rounder {
    border-bottom-left-radius: 4px;
    background-color: transparent;
    width : 4px;
    height : 4px;
    transition: none;
}
#main {
    padding-bottom: 16px;
}

#infoIcon {
    width : 14px;
    height: 14px;
}

#footer {
    position : absolute;
    bottom :0;
    left :0;
    width : 100%;
    height : 16px;
    background-color: rgb(0, 162, 255);
    display: flex;
    font-size: 12px;
    align-items: center;
    justify-content: space-between;
}
#signature {
    position : absolute;
    left :50%;
    bottom : 0;
    transform: translateX(-50%);
    user-select: none;
    -moz-user-select: none;
}
#infoFooter {
    text-decoration: none;
    color : white;
    display:flex;
    align-items: center;
    cursor: pointer;
}

#infoFooter:hover {
    background-color: rgb(96, 178, 245);
}

/* Button Styling */

.button {
    margin-top : 4px;
    margin-left: 8px;
    border-radius: 4px;
    border: none;
    color: white;
    background-color: rgb(96, 178, 245);
    text-align: center;
    font-size: 16px;
    padding: 8px;
    transition: all 0.16s;
    cursor: pointer;
  }
  
  .button span {
    cursor: pointer;
    position: relative;
    transition: 0.5s;
  }
  
  .button span:after {
    content: '\00bb';
    position: absolute;
    opacity: 0;
    top: 0;
    right: -5px;
    transition: 0.5s;
  }
  
  .button:hover span {
    padding-right: 15px;
  }
  
  .button:hover span:after {
    opacity: 1;
    right: 0;
  }

  .button:active {
      opacity : 0.6;
  }

  /*Button end*/

  .windowHeader {
      display: flex;
      align-items: center;
  }

.linkOpener {
    font-size: 12px;
    margin-top: 15.96px;
    margin-bottom: 15.96px;
    color : rgb(96, 178, 245);
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
    transition : 0.04s;
    display: flex;
    align-items: center;
    text-decoration: none;

}
.linkOpener > svg {
    margin-right : 8px;
    color : white;
    background :grey;
    border-radius: 20%;
    padding : 2px;
}

.linkOpener > h4 {
    margin: 0;
}

.linkOpener:hover {
    text-decoration: underline;
}

.linkOpener:active {
    color : white;
}

#status {
    transition : opacity 0.2s;
    user-select: none;
    -moz-user-select: none;
}

h1, h2 {
    user-select: none;
    -moz-user-select: none;
}

#startupButtons {
    display: flex;
}

#startupButtons h2,#startupButtons h3 {
    font-weight: 20;
}

#openButtons,#otherRessources {
    margin-right : 3%;
}

.disabled {
    background : lightblue;
}

/* Sliders */
.range{
  margin-top : 8px;
  height: 40px;
  width: 160px;
  background: #fff;
  border-radius: 10px;
  padding: 0 65px 0 45px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.1);
}
.sliderValue{
  position: relative;
  width: 100%;
}
.sliderValue span{
  position: absolute;
  height: 45px;
  width: 45px;
  transform: translateX(-70%) scale(0);
  font-weight: 500;
  top: -40px;
  line-height: 55px;
  z-index: 2;
  color: #fff;
  transform-origin: bottom;
  transition: transform 0.3s ease-in-out;
}
.sliderValue span.show{
  transform: translateX(-70%) scale(1);
  display:flex;
  justify-content: center;
  align-items: center;
}
.sliderValue span:after{
  position: absolute;
  content: '';
  height: 100%;
  width: 100%;
  background: #664AFF;
  border: 3px solid #fff;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  border-bottom-left-radius: 50%;
  box-shadow: 0 0 2px 2px lightgrey;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}
.field{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}
.field .value{
  position: absolute;
  font-size: 18px;
  color: #664AFF;
  font-weight: 600;
}
.field .value.left{
  left: -40px;
}
.field .value.right{
  right: -43px;
}
.range input{
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  border: none;
  z-index: 2222;
}
.range input::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: red;
  border-radius: 50%;
  background: #664AFF;
  border: 1px solid #664AFF;
  cursor: pointer;
}
.range input::-moz-range-thumb{
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: red;
  border-radius: 50%;
  background: #664AFF;
  border: 1px solid #664AFF;
  cursor: pointer;
}
.range input::-moz-range-progress{
  background: #664AFF;
}
