.window { z-index:20; }
.jtk-connector { z-index:4; }
.jtk-endpoint { z-index:5; }
.jtk-overlay { z-index:6; }


/* disabling text selection */
body {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

text {
  pointer-events:none;
}

.drag-drop {
  display: inline-block;
  position: absolute;
  top: 0px;
  width: 50px;
  height: 50px;
  border-radius: 0.75em;
  border: 0.2rem solid rgb(98, 178, 235);
  z-index: 1;
  background-size: 100%;
}

.rsflipflop {
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
  height: 150px;
  width: 100px;
  background-image: url("../images/ff_sr.svg");
  background-size: 130%;
}

.jkflipflop {
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
  height: 150px;
  width: 100px;
  background-image: url("../images/ff_jk.svg");
  background-size: 130%;
}

.dflipflop {
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
  height: 150px;
  width: 100px;
  background-image: url("../images/ff_d.svg");
  background-size: 130%;
}

.logic-gate{
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
}

.and {
  background-image: url("../images/and.svg");
}

.not {
  background-image: url("../images/not.svg");
}

.or {
  background-image: url("../images/or.svg");
}

.xor {
  background-image: url("../images/xor.svg");
}

.xnor {
  background-image: url("../images/xnor.svg");
}

.nand {
  background-image: url("../images/nand.svg");
}

.nor {
  background-image: url("../images/nor.svg");
}

.three-ip-nand {
  background-image: url("../images/nand3.svg");
  background-size: 130%;
}


.clock {
  background-image: url("../images/clock.svg");
  background-size: 80%;
}


.high {
  text-align: center;
  display: inline-block;
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.2rem solid rgb(98, 178, 235);
  z-index: 1;
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
}

.low {
  text-align: center;
  display: inline-block;
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.2rem solid rgb(236, 234, 90);
  z-index: 1;
  background-color: rgb(238, 235, 34);
  background-repeat: no-repeat;
  background-position: center;
}

.high a,
.low a {
  justify-content: center;
  align-items: center;
  display: flex;
  font-size: 1.2rem;
  text-decoration: none;
  color: black;
  height: 100%;
  width: 100%;
}

.high a:hover,
.low a:hover {
  color: black;
}

.high p,
.low p,
.output p {
  position: absolute;
  top: -30px;
  align-items: center;
  font-size: 1.3rem;
}


.output {
  display: inline-block;
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.2rem solid rgb(20, 21, 22);
  z-index: 1;
  background-color: rgb(4, 5, 5);
  background-repeat: no-repeat;
  background-position: center;
}

.components-list {
  padding: 2% 5%;
  text-align: center;
  height: 100%;
  overflow-y: auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: start;
  justify-content: center;
  padding: 10px;
}

#circuit-board {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0.2rem solid black;
}

#working-area {
  position: absolute;
  width: 95%;
  height: 95%;
  margin: 2%;
}

.connector-point {
  position: absolute;
  z-index: 1;
  display: block;
  height: 15px;
  width: 1px;
  border-radius: 50%;
  background-color: grey;
}

svg.wire path {
  stroke: #456;
  stroke-width: 3;
}

.menu {
  width: 120px;
  z-index: 1;
  box-shadow: 0 4px 5px 3px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  position: fixed;
  display: none;
  transition: 0.2s display ease-in;
}

.menu-options {
  list-style: none;
  padding: 10px 0;
  z-index: 1;
}

.menu-option {
  font-weight: 500;
  z-index: 1;
  font-size: 14px;
  padding: 10px 40px 10px 20px;
}

.menu-option:hover {
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.component-button{
  width: 80px;
  height: 80px;
  border-radius: 0.75em;
  border: 0.2rem solid rgb(98, 178, 235);
  margin: 0.5rem 0.5rem;
  font-weight: bold;
  font-size: 0.8rem;
  text-align: center;
  color: black;
  background-color: #29e;
  background-repeat: no-repeat;
  background-position: center;
}

@media screen and (max-width: 600px) {
  .component-button {
    width: 60px;
    height: 60px;
    background-size: 100%;
  }
}

.component-button::after {
  display: block;
  padding-bottom: 100%;
}

.component-button:hover {
  border: 0.2rem solid rgb(157, 210, 248);
  cursor: pointer;
}

.success-message {
  font-size: 1.2rem;
  color: rgb(31, 170, 31);
  font-weight: bold;
}

.failure-message {
  font-size: 1.2rem;
  color: rgb(228, 23, 23);
  font-weight: bold;
}


.modal {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
  transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
}

.modal-content {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 1rem 1.5rem;
  width: 24rem;
  border-radius: 0.5rem;
}

.close-button {
  z-index: 10;
  float: right;
  width: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 0.25rem;
  background-color: lightgray;
}

.close-button:hover {
  background-color: darkgray;
}

.show-modal {
  opacity: 1;
  visibility: visible;
  transform: scale(1.0);
  transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
}

/* for dropping instruction box  */

.instructions-box {
  max-height: 70px;
  overflow: hidden;
  transition: all .5s ease;
}

.instructions-box.expand {
  max-height: 400px;
}

.v-instruction-container {
  border:.2rem solid #97d23d;
  justify-content: flex-start;
}

.highlight {
  border:3px solid red;
  box-shadow: 0 0 10px #719ECE;
}

.color-green{
  
  fill:green;
  stroke:rgb(68, 68, 119);
  stroke-width:3;
  fill-opacity:1;
  stroke-opacity:1;
}

.speed-box{
  border:1px solid black;
  color:black;
  background-color:white;
  text-align:center;
  font-size:1.0rem;
  border-radius:1em;
  padding:.5em 1.0em;
  cursor:pointer;
}
.wire-demo{
  stroke-width: 3px;
  fill: none;
  stroke: black;
}

.gate-demo{
  stroke-width: 3px;
  fill: #29e;
  stroke: black;
}

.text-demo{
  font-size: 1.25em;
  fill: black;
}