@font-face {
  font-family: e1234;
  font-display: swap;
  src: url('E1234.ttf');
}

/* Body */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 15vh;
  overflow-y: visible;
}

main {
  max-width: 800px;
  max-height: 600px;
  background-color: #ddd;
  margin: auto;
  padding: 20px;
  border-radius: 20px;
}

h2 {
  color: #009540;  
}

/* Header */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #2c2c2c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 18px;
}

#Title {
  font-size: 2.5vh;
  color: #009540;
  text-align: left;
  font-weight: bold;
  margin: 0;
}

#barometric-height {
  color: green;
  font-size: 18px;
  text-align: right;
  padding-right: 40px;
}

/* Blockly Div */
#blocklyDiv {
  width: 100%;
  height: calc(100vh - 15vh);
  margin-bottom: 2vh;
  background-color: #333;
  border: 2px solid #666666;
  border-radius: 10px;
  background-image: url("Images/background.png");
}

.background-div {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #2C2C2C;
  z-index: -1;
}

/* Menu Container */
#menu-container {
  position: fixed;
  bottom: 2vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#menu-image-container {
  position: relative;
  display: inline-block;
}

#menu {
  height: 120px;
  margin: 0 10px;
  z-index: 1;
}

#StartButton,
#StopButton,
#SelectButton,
#ResetButton,
#SaveButton,
#HornetButton {
  width: 110px;
  height: 110px;
  margin: 5px 120px;
  position: absolute;
  z-index: 2;
  padding: 0;
  border: none;
  background: none;
  -webkit-user-drag: none;
}

#StartButton,
#StopButton,
#SelectButton,
#ResetButton,
#SaveButton,
#HornetButton {
  cursor: pointer;
}

#SelectButton,
#ResetButton,
#SaveButton,
#HornetButton {
  width: 50px;
  height: 50px;
}

#StartButton {
  left: -99px;
}

#StopButton {
  right: -102px;
}

#SelectButton {
  left: 11px;
}

#ResetButton {
  left: 11px;
  bottom: 5px;
}

#SaveButton {
  left: 425px;
}

#HornetButton {
  left: 425px;
  bottom: 5px;
}

#StartImage,
#StopImage,
#SelectImage,
#ResetImage,
#SaveImage,
#HornetImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
}

/* Flexbox layout for row alignment and styles for the entire Blockly tree row */

.blocklyTreeRow {
  display: flex;
  align-items: center;
  width:  30px !important;
  height: 80px;
  border-radius: 50px;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.blocklyTreeRow:hover {
  cursor: pointer;
}

/* Toolbox */

.blocklyToolboxDiv {
  width:  92px!important;
  margin-top: 100px;
  margin-left: 40px;
  height: 290px !important;
  border-radius: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none !important;

}

.blocklyTreeLabel {
  display: none;
}

/* Style the overall scrollbar container */
.blocklyScrollbarVertical.blocklyFlyoutScrollbar {
  width: 15px;
  height: calc(100% - 20px);
  position: absolute;
  right: 5px;
  top: 2.5px;
  transform: translate(0, 0);
  border-radius: 10px;
}

/* Style the background of the scrollbar */
.blocklyScrollbarVertical.blocklyFlyoutScrollbar .blocklyScrollbarBackground {
  fill: none; /* Transparent background */
}

/* Style the scrollbar handle (the draggable part) */
.blocklyScrollbarVertical.blocklyFlyoutScrollbar .blocklyScrollbarHandle {
  fill: rgb(200, 200, 200); /* Lighter color for the scrollbar handle */
  fill-opacity: 0.8; /* Slightly more opaque */
  rx: 5;
  ry: 5;
  width: 10px;
  margin-top: 20px;
}

/* Change the scrollbar handle on hover */
.blocklyScrollbarVertical.blocklyFlyoutScrollbar .blocklyScrollbarHandle:hover {
  fill: rgb(170, 170, 170); /* Slightly darker color on hover */
  fill-opacity: 1; /* Fully opaque on hover */
  cursor: pointer;
}

/* Adjust positioning within the flyout */
.blocklyFlyout {
  overflow: hidden;
  margin-top: 5px;
  margin-left: 40px;
  height: 770px !important;
  padding-top: 10px;
  border-radius: 10px;
}



.blocklyToolboxCategory {
  padding-top: 10px;
}

/* Target the specific category by its ID */
#blocklyDiv .blocklyTreeRow#droneCategory::before {
  content: url('Content/Style/Images/core/D1Normal.png');
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}

#blocklyDiv .blocklyTreeRow#remoteCategory::before {
  content: url('Content/Style/Images/core/R1Normal.png');
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}

/* Repeat for other categories */
#blocklyDiv .blocklyTreeRow#logicCategory::before {
  content: url('Content/Style/Images/core/L1Normal.png');
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}

#blocklyDiv .blocklyTreeRow#mathCategory::before {
  content: url('Content/Style/Images/core/A1Normal.png');
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}

#blocklyDiv .blocklyTreeRow#variablesCategory::before {
  content: url('Content/Style/Images/core/H1Normal.png');
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}


/* Scroll view container styles */
#scrollview-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 10px;
}

#scrollview {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-item {
  font-size: 1.5em;
  color: #000000;
  text-align: center;
}

.scroll-item.selected {
  color: #00ff00;
}

.scroll-item.connected {
  color: #0000ff;
}

#scroll-up,
#scroll-down {
  display: none; /* Hide the scroll buttons */
}

/* Core Menu */
.core-menu {
  position: fixed;
  left: 0; /* Move the menu to the left side of the page */
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
  height: 525px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  z-index: 999;
}

.background {
  position: absolute;
  width: 90px;
  height: 525px;
}

.button-container {
  position: relative;
  width: 90px;
  height: 525px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.logo {
  position: absolute;
  width: 70px;
  height: 55px;
  bottom: 450px;
  left: 10px;
}

.button {
  position: absolute;
  width: 80px;
  height: 80px;
  background-size: cover;
  cursor: pointer;
}

.L1 { bottom: 5px; left: 5px; }
.A1 { bottom: 95px; left: 5px; }
.H1 { bottom: 185px; left: 5px; }
.R1 { bottom: 275px; left: 5px; }
.D1 { bottom: 365px; left: 5px; }

/* Login */

form.login {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
}

.login input {
  font-size: 1.5em;
  border-radius: 10px;
  border-color: #333;
  text-align: center;
  margin: 5px;
}

.login .error {
  color: red;
  text-align: center;
}
 
/* Timer */
#timer {
  position: fixed;
  right: 100px;
  top: 100px;
  background-color: #4d4d4d;
  padding: 5px 20px;
  border-radius: 40px;
  font-family: e1234, sans-serif;
  font-size: 24px;
}

#timer div {
  background-color: green;
  color: #111c;
  padding: 10px 10px 6px;
  border-radius: 3px;
}

#timer div span {
  font-size: 18px;
  margin-left: 3px;
}