/* Default - Dark mode */
:root {
  --body-bg-color: black;
  --text-color: whitesmoke;
  --nav-bar-bg: #3a3939;

  --tab-bg-color: #3a3939;
  --tab-border-color: black;
  --tab-text-color: white;

  --example-table-bg-color: #3a3939;

  --blockly-tree-row-bg-color: black;
  --blockly-tree-label-color: white;

  --output-bg-color: #3a3939;
  --output-text-color: whitesmoke;

  --debug-color: #8f45f6;
  --stop-color: #f30e0e;
  --table-row-color: #272727;
  --table-bg-color: var(--output-bg-color)
}

/* Light Mode*/
.light-mode {
  --body-bg-color: #36759C;
  --text-color: black;
  --nav-bar-bg: #ccc;

  --tab-bg-color: #f1f1f1;
  --tab-border-color: #ccc;
  --tab-text-color: black;

  --example-table-bg-color: #e7e5e5;

  --blockly-tree-row-bg-color: white;
  --blockly-tree-label-color: black;

  --output-bg-color: #e3e6e4;
  --output-text-color: black;

  --debug-color: rgb(79, 5, 163);
  /* --stop-color: rgb(136, 6, 43); */
  --table-row-color: #bebdbd;
  --table-bg-color: white;
  /* add a color for step in light mode */
}

/* style.css*/
html,
body {
  height: 100%;
  margin: 0;
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--body-bg-color);
  color: var(--text-color);
}

/* toggle buttons */

.toggle-container {
  margin-top: 20px;
  background-color: var(--nav-bar-bg);
  border: 1px solid var(--text-color);
  height: 40px;
  width: 40px;
}

.toggle-row {
  display: flex;
  flex-direction: row;
}


.toggle-container .item {
  height: 20px;
  width: 20px;
  background-color: white;
  cursor: pointer;
}

.tooltip {
  visibility: hidden;
  display: inline-flex;
  background-color: bisque;
  color: black;
  position: fixed;
  font-size: medium;
}

.toggle-container .item:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* header and toolbar */

h1 {
  font-family: sans-serif;
}

/*#titleRefresh {
  cursor: pointer;
}*/

#title-version {
  display: flex;
  gap: 20px;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  background-color: var(--nav-bar-bg);
}

.nav-bar img {
  height: 40px;
  width: 120px;
}

.nav-bar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.nav-bar ul li a {
  text-decoration: none;
}


/* nav-bar buttons */

.button-text {
  display: none;
}


.MainMenu-button {
  font-size: 15px;
  text-wrap: nowrap;
  margin-right: 5px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 85px;
  height: 30px;
  padding: 0;
  border-radius: 0.5em;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
  background-color: transparent;
}

/* icon goes away when hover */
/* .MainMenu-button:hover .material-symbols-rounded {
  display: none;
} */


#stepButton:hover {
  background-image: none;
  background-color: #74a25f;
}

#stepIntoButton {
  display: none;
  background-color: rgb(196, 217, 8);
  background-image: url('./images/magnify_36.png');
}

.MainMenu-button:hover .button-text {
  display: inline;
}

.MainMenu-button:hover::before {
  display: none;
}

.MainMenu-button:hover {
  background-color: rgb(91, 88, 88);
}

#runButton.MainMenu-button {
  width: 95px;
  padding: 5px;
}

#stopButton.MainMenu-button  {
  width: 100px;
}

#stepButton.MainMenu-button {
  width: 95px;
}



/* .MainMenu-button {
  font-size: medium;
  flex-wrap: nowrap;
  margin-right: 5px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 75px;
  height: 30px;
  border-radius: 0.5em;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
  background-color: transparent;
} */


#darkMode {
  background-image: url("./images/darkmodeicon.png");
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
}

#darkMode:hover {
  background-image: none;
  background-color: #333333;
}

#settings {
  display: none;
  background-image: url('./images/settings.png');
  background-color: #616161;
}

#settings:hover {
  background-image: none;
  background-color: #9e9e9e;
  /* Lighter blue color */
}

#info {
  display: none;
}

#info:hover {
  background-image: none;
  background-color: rgb(11, 161, 230);
  /* Lighter blue color */
}






/* The help menu */

#helpMenu {
  list-style-type: none;
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  display: flex;
}

.helpMenuButtons {
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 18px;
  margin: 0 5px;
  /* Added right margin of 5 pixels */
  transition: background-color 0.3s;
  font-family: 'Arial', sans-serif;
  border-radius: 15px;
}

.helpMenuButtons:hover {
  background-color: #ddd;
}

#FeaturesButton {
  background-color: #4caf50;
  color: #ffffff;
}

#ChangelogButton {
  background-color: #2196f3;
  color: #ffffff;
}

#BugButton {
  background-color: #f44336;
  color: #ffffff;
}

#GitHubButton {
  background-color: #673ab7;
  color: #ffffff;
}

#AboutButton {
  background-color: #ff5722;
  color: #ffffff;
}

/* #exampleTable {
  color: #2196f3;
  background-color: var(--example-table-bg-color);
  display: flex;
} */

/* button */
#examplesButton {
  border-radius: 5px;
  border: none;
  /* border: 1px solid var(--text-color); */
  background-color: rgb(25, 25, 25);
  color: var(--text-color);
  cursor: pointer;
  transition: 0.2s background-color;
}

#examplesButton:hover {
  background-color: #000;
}

.exampleModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  justify-content: center;
  align-items: center;
  z-index: 99;
  background-color: rgba(0, 0, 0, 0.5);
}

.exampleModalContent {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  padding: 50px;
  color: black;
  border-radius: 10px;
}

.exampleModalText h3 {
  margin-bottom: 0;
}

.exampleModalText p {
  margin-top: 5px;
}

.examplesTable {
  border-collapse: collapse;
  width: 100%;
}

.examplesTable th {
  border: 1px solid black;
  border-spacing: 5px;
  padding: 5px;
}

.examplesTable td {
  border: 1px solid black;
  padding: 5px;
}

.example_links {
  color: blue;
  background: none;
  border: none;
  padding: 0;
  margin: 10px;
  cursor: pointer;
  /* Optional: add a pointer cursor to indicate interactivity */
  text-decoration: underline;
}

/* The Modal (background) */

.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 99;
  /* Sit on top */
  padding-top: 100px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

@keyframes fadeEffect {

  /* Go from zero to full opacity */
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Secondary menu bar */

#secondary_bar {
  display: flex;
  /* background-color: #e7e5e5; */
  /* border: 1px solid #aaa; */
  margin-top: 20px;
  height: 40px;
}

/* main blockly and ace editor */

main {
  display: flex;
  flex-basis: 15%;
  flex-grow: 1;
  background-color: var(--output-bg-color);
}

#blocklyDiv {
  flex: 1;
  flex-grow: 1;
}

.resizeBarX {
  display: block;
  width: 5px;
  cursor: col-resize;
  background-color: #2B5E7D;
}

body:not(.embed) .resizeBarY {
  height: 5px;
  cursor: row-resize;
  background-color: #2B5E7D;
}

.resizeBarBott {
  width: 5px;
  cursor: col-resize;
  background-color: #2B5E7D;
}

#aceCode.ace-dracula {
  /* The Dracula theme background is a bit too dark. */
  background-color: #141414;
}

.codeEditor {
  flex: 1;
  width: 100%;
}

body:not(.embed) #bottom-part {
  display: flex;
  overflow: auto;
  /* Add this */
  flex-direction: row-reverse;
  /* Add this */
  flex-basis: 25%;
  user-select: text;
}

.output {
  flex: 1;
  box-sizing: border-box;
  position: relative;
  /* margin: 10px; */
  padding: 10px;
  /* border-radius: 10px; */
  overflow: auto;
  height: 100%;
  background-color: var(--output-bg-color);
  color: var(--output-text-color);
}

.stdout {
  margin-top: 0;
}

.stderr {
  color: red;
}

.stderr a {
    color: skyblue;
}

.stderr a:active,
.stderr a:hover {
    color: white;
}

/* not sure where any of this goes */

.menuButtons {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.menuButtons li {
  float: right;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  right: 0;
  /* Adjusted property */
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  right: 0;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.toast {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 50%;
  padding: 15px;
  background-color: #333;
  color: #fff;
  border-radius: 5px;
  transform: translateX(-50%);
  z-index: 9999;
}


.debugOptions {
  display: none;
}

.debugButton {
  display: block;
}

/* Style for the table container */
#Variable-table-container {
  /* display: none; */
  flex: 1;
  box-sizing: border-box;
  position: relative;
  /* margin: 10px; */
  padding: 10px;
  /* border-radius: 10px; */
  overflow: auto;
  background-color: var(--output-bg-color);
  /* #ffffff */
  height: 100%;
}

body.embed #Variable-table-container {
  flex-basis: 25%;
}

/* Style for the table */
#Variable-table-outer {
  width: 100%;
  border-collapse: collapse;
}

/* Style for table headers */
#Variable-table-outer th {
  background-color: var(--table-row-color);
  border: 1px solid var(--text-color);
  /* 000000 */
  color: var(--text-color);
  padding: 1ex;
  text-align: left;
}

/* Style for table cells */
#Variable-table-outer td {
  border: 1px solid var(--text-color);
  /* 000000 */
  color: var(--text-color);
  padding: 1ex;
}


.material-symbols-rounded {
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 2em;
  line-height: 0;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

/* runButton */
.material-symbols-rounded.run {
  color: green;
  font-size: 30px;
}

/* debugButton */
.material-symbols-rounded.bug {
  color: var(--debug-color);
  font-size: 25px;
  transform: rotate(-45deg);
}

/* Share */
.material-symbols-rounded.share {
  color: #4985c5;
  font-size: 25px;
}

/* Manual */
.material-symbols-rounded.manual {
  color: #c91827;
  font-size: 25px;
}

/* Reference */
.material-symbols-rounded.extra {
  color: lightskyblue;
  background-color: white;
  border-radius: 50%;
  font-size: 36px;
}

/* stepButton */
.material-symbols-rounded.step {
  color: rgb(10, 239, 147);
  font-size: 30px;
}

/* stopButton */
.material-symbols-rounded.stop {
  color: var(--stop-color);
  font-size: 30px;
}

/* resetButton */
.material-symbols-rounded.reset {
  color: darkgray;
  font-size: 30px;
}

/* toolbox.css*/

/* Makes our label white. */
.blocklyTreeLabel {
  color: var(--blockly-tree-label-color);
}

/* Adds padding around the group of categories and separators. */
.blocklyToolboxContents {
  padding: 0.5em;
}

/* Adds space between the categories, rounds the corners and adds space around the label. */
.blocklyTreeRow {
  padding: 10px;
  margin-bottom: 0.5em;
  border-radius: 4px;
  background-color: var(--blockly-tree-row-bg-color);
}

/* .customIcon {
    color: rgb(255, 21, 21);
  } */

/* Stacks the icon on top of the label. */
.blocklyTreeRowContentContainer {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.blocklyTreeRow {
  height: initial;
}

.blocklyTreeIcon {
  visibility: visible;
}

/* Embed Mode */

body.embed {
  flex-direction: row;
}

body.embed .material-symbols-rounded.run {
  font-size: 30px;
}

body.embed .material-symbols-rounded.bug {
  font-size: 25px;
}

body.embed .material-symbols-rounded.step {
  font-size: 30px;
}

body.embed .material-symbols-rounded.stop {
  font-size: 30px;
}

body.embed .material-symbols-rounded.reset {
  font-size: 25px;
}

body.embed .material-symbols-rounded.open {
  font-size: 19px;
}


.side-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  flex-grow: 1;
}

.resize-side-view {
  height: 5px;
  background-color: #2B5E7D;
  cursor: row-resize;
}

#embed-toolbar {
  display: flex;
  flex-direction: row;
  gap: 2px;
  justify-content: space-between;
  top: 10px;
  right: 10px;
  z-index: 999;
  background-color: #36759C;
  padding: 5px;
}


body:not(.embed)>#embed-toolbar {
  display: none;
}

.embed-button {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-evenly;
  width: 60px;
  /* 6em */
  height: 30px;
  /* 4em */
  /* line-height: 0; */
  position: relative;
  border: none;
  border-radius: 0.5rem;
  margin-right: 5px;
}

#debugButton.embed-button {
  width: 70px;
}

#stepButton.embed-button {
  width: 70px;
}

#resetButton.embed-button {
  width: 65px;
}

#embed-toolbar button:hover {
  background-color: lightgray;
}

#blocker {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  opacity: 0.2;
  background-color: black;
  z-index: 5000;
}

.prompt {
  position: relative;
  z-index: 6000;
}

.prompt.attract {
  animation: attract 200ms linear 3;
}

@keyframes attract {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-3deg);
  }

  75% {
    transform: rotate(3deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.resetModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  justify-content: center;
  align-items: center;
  z-index: 99;
  background-color: rgba(0, 0, 0, 0.5);
}

.resetModal-content {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 80%;
  padding: 50px;
  color: black;
  border-radius: 1em;
}

.answerOptions {
  display: flex;
  justify-content: flex-start;
  gap: 30px;
}

#yes {
  background-color: lightgreen;
  border: 1px solid lightgreen;
  border-radius: 0.5em;
  padding: 5px;
  width: 10%;
  font-weight: bold;
}

#no {
  background-color: rgb(209, 78, 78);
  border: 1px solid rgb(209, 78, 78);
  border-radius: 0.5em;
  padding: 5px;
  width: 10%;
  font-weight: bold;
}

.error-marker {
  position: absolute;
  z-index: 1;
  background-color: rgba(255, 0, 0, 0.2);
  border-bottom: 2px solid red;
}

.step-marker {
  position: absolute;
  /* The active line highlight has a z-index of 2. This marker must appear
   * above that. */
  z-index: 3;
  background-color: rgba(0, 255, 0, 0.2);
}

.return-step {
  position: absolute;
  /* The active line highlight has a z-index of 2. This marker must appear
   * above that. */
  z-index: 3;
  background-color: rgba(255, 255, 255, 0.5);
}
