@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-VF.woff2') format('woff2-variations');
  font-weight: 100 900;
  /* Supports all weights */
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('font/FiraCode-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* COLORS */

:root {
  --black: #0F0F0F;
  --yellow: #f7b400;
  --red: #d73d32;
  --light-gray: #b5b5b5;
  --middle-gray: #868686;
  --dark-gray: #242424;
  --gray: #575757;
  --white: #ffffff;
  --focus: #b5b5b580;
  --invisible: rgba(0, 0, 0, 0);

  --primary: var(--light-gray);

  --size: 13px;
}

/* GENERAL */

html,
body {
  font-family: 'Fira Code', monospace;
  margin: 0;
  padding: 0;
  background-color: var(--black);
  color: var(--primary);
  font-size: var(--size);
}

label {
  display: flex;
  padding: 5px;
  text-align: right;
}

input {
  margin: auto auto auto 0;
  align-self: flex-end;
  flex: 1 0 auto;
}

svg {
  color: var(--yellow);
}

p {
  /* display: block;
  clear: both; */
}

/* BUTTONS */

button {
  font-family: 'Fira Code', monospace;
  /* background: linear-gradient(145deg, var(--dark-gray), var(--gray)); */
  background-color: var(--dark-gray);
  color: var(--light-gray);
  border: 1px solid var(--middle-gray);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: var(--size);
  box-shadow: inset 3px 3px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

button:focus {
  outline: none; /* Remove the default focus outline */
  border-color: var(--light-gray); /* Ensure border color stays the same on focus */
  box-shadow: 0 0 0px 2px var(--focus);
}

button:hover {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
  color: var(--yellow);
}

/* SLIDER INPUTS */

input[type="range"] {
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--yellow) 0%, var(--yellow) var(--slider-percentage, 50%), var(--gray) var(--slider-percentage, 50%), var(--gray) 100%);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  height: 10px;
  margin: auto auto auto 0;
  width: 125px;
}

/* Hide the slider handle (thumb) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
  /* Makes the thumb invisible */
  cursor: pointer;
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
  width: 0;
  height: 0;
  background: transparent;
  /* Makes the thumb invisible */
  cursor: pointer;
}

/* Track styles */
input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--yellow) 0%, var(--yellow) var(--slider-percentage, 50%), var(--gray) var(--slider-percentage, 50%), var(--gray) 100%);
  border-radius: 999px;
}

input[type="range"]::-moz-range-track {
  background: linear-gradient(to right, var(--yellow) 0%, var(--yellow) var(--slider-percentage, 50%), var(--gray) var(--slider-percentage, 50%), var(--gray) 100%);
  border-radius: 999px;
}

input[type="range"]::-ms-track {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower {
  background: var(--yellow);
  border-radius: 999px;
}

input[type="range"]::-ms-fill-upper {
  background: var(--gray);
  border-radius: 999px;
}

input[type="range"]:focus {
  box-shadow: 0 0 0px 2px var(--focus);
}


/* SELECT INPUTS */

select {
  font-family: 'Fira Code', monospace;
  background-color: var(--dark-gray);
  color: var(--light-gray);
  border: 1px solid var(--middle-gray);
  padding: 5px 40px 5px 15px; /* Adjust padding to make space for the arrow and center text vertically */
  border-radius: 999px; /* Fully rounded corners */
  font-size: var(--size);
  appearance: none; /* Remove default styling in most browsers */
  -webkit-appearance: none; /* Remove default styling in WebKit-based browsers */
  -moz-appearance: none; /* Remove default styling in Firefox */
  cursor: pointer;
  position: relative;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><polygon points="0,0 10,0 5,5" fill="%23CCCCCC"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px top 8px;
  background-size: 15px 15px;

  /* margin-left: auto;
  align-self: flex-end; */
}

select::-ms-expand {
  display: none; /* Remove default arrow in Internet Explorer and Edge */
}

select:focus {
  outline: none; /* Remove the default focus outline */
  border-color: var(--light-gray); /* Ensure border color stays the same on focus */
  box-shadow: 0 0 0px 2px var(--focus);
}

select:hover {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
  color: var(--yellow);
}

select option[disabled]:first-child { display: none; }

/* FIELD INPUTS */

input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="search"], input[type="url"], input[type="tel"] {
  background-color: var(--dark-gray);
  color: var(--light-gray);
  border: 1px solid var(--middle-gray);
  padding: 4px 8px;
  /* height: 30px; */
  border-radius: 999px; /* Fully rounded corners */
  font-size: var(--size);
  appearance: none; /* Remove default styling in most browsers */
  -webkit-appearance: none; /* Remove default styling in WebKit-based browsers */
  -moz-appearance: none; /* Remove default styling in Firefox */
  cursor: pointer; /* Change cursor to pointer on hover */
  outline: none; /* Remove default focus outline */
  box-sizing: border-box; /* Ensure padding and border are included in element's width and height */
  width: 85px;
}

input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="url"]:hover, input[type="tel"]:hover {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
  color: var(--yellow);
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="url"]:focus, input[type="tel"]:focus {
  box-shadow: 0 0 0px 2px var(--focus);
}

input[type="text"]:disabled, input[type="password"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="url"]:disabled, input[type="tel"]:disabled {
  background-color: var(--black);
}


input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  /* -webkit-appearance: none;
  margin: 0; */
  width: 25px;
  height: 25px;
}

/* COLOR PICKERS */

input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
  height: 25px;
  width: 85px;
  border-radius: 999px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  appearance: none;
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
  height: 25px;
  width: 85px;
}

input[type="color"]::-webkit-color-swatch {
  background-color: var(--dark-gray);
  color: var(--light-gray);
  border: 1px solid var(--middle-gray);
  padding: 0px;
  margin: 0;
  height: 25px;
  width: 85px;
  border-radius: 999px;
  box-sizing: border-box;
}

input[type="color"]::-moz-color-swatch {
  background-color: var(--dark-gray);
  color: var(--light-gray);
  border: 1px solid var(--middle-gray);
  padding: 0px;
  margin: 0;
  height: 25px;
  width: 85px;
  border-radius: 999px;
  box-sizing: border-box;
}

input[type="color"]::-webkit-color-swatch:hover {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
  color: var(--yellow);
}

input[type="color"]::-moz-color-swatch {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
  color: var(--yellow);
}

input[type="color"]:-webkit-color-swatch:focus {
  box-shadow: 0 0 0px 2px var(--focus);
}

input[type="color"]:-moz-color-swatch {
  box-shadow: 0 0 0px 2px var(--focus);
}

/* CHECKBOXES */

input[type="checkbox"] {
  /* Remove the default checkbox appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;

  /* Custom size */
  width: 24px;
  height: 24px;

  /* Custom background and border */
  background-color: var(--dark-gray);
  border: 2px solid var(--middle-gray);
  border-radius: 4px; /* Optional: add a slight rounding for a softer look */

  /* Maintain layout */
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: var(--yellow);
  /* clip-path: polygon(14% 44%, 0 28%, 50% 100%, 100% 20%, 85% 10%, 40% 85%); */
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked::before {
  transform: translate(-50%, -50%) scale(1); /* Show the checkmark */
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0px 2px var(--focus);
}

input[type="checkbox"]:hover {
  background-color: var(--dark-gray);
  border-color: var(--light-gray);
}

/* CLASSES */

.title {
  color: var(--yellow);
  font-size: 20px;
  text-align: center;
  margin: 10px;
}

.main-div {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  width: 100vw;
  height: 100vh;
}

.canvas-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;

}

.menu {
  display: flex;
  flex-direction: column;
  /* align-self: flex-end; */
  flex-basis: 100%;
  flex: 0 1 auto;
  width: 400px;
  margin-left: auto;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-color: var(--gray) var(--dark-gray);
}


.canvas {
  display: flex;
  /* border: 5px solid var(--dark-gray); */
  width: 100%;
  height: 100%;
}

.row {
  display: flex;
  flex-grow: 1;
  flex-direction: row;
  flex-wrap: wrap;
  /* width: 100%; */
}


.menu-section {
  display: flex;
  flex-direction: column;
  flex-grow: 1px;
  width: 100%;
  /* flex-direction: column;
  flex-basis: 100%;
  flex: 0 1 auto;
  width: 200px;
  overflow: none; */
}

.menu-section-title {
  display: flex;
  cursor: pointer;
  margin: 10px;
  border-bottom: 1px var(--gray) solid;
  font-size: 15px;
}

.menu-section-title:hover {
  color: var(--yellow);
}

.menu-container {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
  width: 100%;
}

.config-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: auto;
  flex: 1 1 auto;
  padding: 2px 10px 2px 5px;
}

.padder {
  min-height: 30px;
  display: flex;
  align-items: center;
  margin: auto auto auto 0;
  padding: 0 0 0 10px;
}

.error-box {
  padding: 15px;
  border: 2px dashed var(--light-gray);
  flex-direction: column;
  background-color: var(--dark-gray);
  max-width: 800px;
}
