/* Default CMU colors etc. as CSS variables */
:root {
  --color-bg: #E0E1E2;
  --color-text-main: #000000;
  --color-primary: #C41230;
  --color-secondary: #000000;
  --color-accent: #6D6E71;
  --color-light: #E0E0E0;
  --color-canvas: #363636; 
  --color-target-go: #aad7ff;
  --color-target-stop: #fa9192;
  --color-target-success: #a1fa9f;
  --color-target-error: #f5e57e;
  --color-highscore-header: #000000;
  --image-max-width: 64px;
  --image-margin: 1rem;
  --font-family: "UntitledSans", sans-serif;
  --font-family-header: "UntitledSans", sans-serif;
  --font-family-scoreboard: "Typewriter", monospace;
  --font-family-buttons: "Typewriter", monospace;
  --font-family-toggles: "Typewriter", monospace; 
  --font-size: 14px;
}

[hidden] {
  display: none !important;
}

/* Import fonts */
@font-face {
  font-family: "UntitledSans";
  src: url("/fonts/untitled-sans/untitled-sans-light.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Typewriter";
  src: url("/fonts/cmu/cmu.typewriter-text-regular.ttf") format("ttf");
  font-weight: normal;
  font-style: monospace;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  width: 100vw;
  overflow-y: scroll;
  overflow-x: clip;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera, and Edge */
}

canvas {
  display: flex;
  background-color: var(--color-canvas);
}

image {
  max-width: var(--image-max-width);
  margin: var(--image-margin);
}

.scoreboard-row {
  border: 1px solid #dddddd;
  padding: 8px;
}

.highlighted {
  border: 4px solid #000000;
}

/* Enable text selection for specific elements */
.selectable {
  -webkit-user-select: text; /* Safari */
  -moz-user-select: text; /* Firefox */
  -ms-user-select: text; /* Internet Explorer/Edge */
  user-select: text; /* Non-prefixed version, currently supported by Chrome, Opera, and Edge */
}

/* Page structure */
.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: fixed;
  margin: 0px;
  padding: 0px;
  top: 120px;
  height: calc(100vh - 120px);
  width: 100%;
  overflow-y: visible;
  overflow-x: clip;
}

.content-debug {
  display: flex;
  flex-direction: column;
  margin-top: 150px;
  margin-left: 50px;
  justify-content: flex-start;
  padding: 10px;
}

.content-horizontal {
  display: flex;
  flex-direction: row;
  align-items: center; /* Aligns children vertically in the center */
  justify-content: center; /* Aligns children horizontally in the center */
  height: calc(100vh - 120px);
  width: calc(100vw - 20px);
}

p,
label {
  font-size: 1.25rem;
}

/* Title h1 style */
h1 {
  color: var(--color-primary);
  font-family: var(--font-family-header);
  font-style: normal;
  font-weight: bold;
  font-size: 3rem;
}

h2 {
  color: var(--color-secondary);
}

.hidden {
  display: none !important
}

.activated {
  color: #C41230;
  font-weight: bold;
}

/* Additional styles for the report table */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 0.05rem solid #dddddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: white;
  padding: 0.2rem;
  border-radius: 0.1rem;
  box-shadow: 0 0.04rem 0.06rem rgba(0, 0, 0, 0.1);
  max-width: 75vw;
  margin: auto;
}

.parameters {
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: flex-start;
  border: 0.04rem solid var(--color-accent);
  border-radius: 0.06rem;
  padding: 0.06rem;
  margin: 0.06rem;
}

.parameter-header {
  display: flex;
  flex-direction: column;
  align-self: center;
  justify-self: center;
  text-justify: center;
  font-size: 1.25rem;
  font-weight: bold;
}

.parameter-vpanel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: top;
}

.parameter-vpanel label {
  padding: 0.1rem;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-family: var(--font-family-scoreboard); 
  font-weight: bold;
  text-align: center;
}

.parameter-vpanel select {
  padding: 0.1rem;
  font-size: 1rem;
  border: 0.05rem solid var(--color-accent);
  font-family: var(--font-family-scoreboard); 
  border-radius: 2rem;
  text-align: center;
}

.parameter-vpanel input {
  padding: 0.1rem;
  font-size: 1rem;
  border-radius: 2rem;
  font-family: var(--font-family-scoreboard); 
  text-align: center;
}

.parameter-hpanel {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-family: var(--font-family-scoreboard); 
  margin: 0.3rem 0.1rem;
}

.left {
  display: block;
  justify-content: flex-start;
  justify-self: left;
  margin: 0.1rem;
}

.parameter-hpanel label {
  padding: 0.1rem;
  display: flex;
  justify-content: flex-end;   /* ✅ pushes label text to the right */
  align-items: center;         /* ✅ vertically center text within the label */
  font-size: 0.75rem;
  font-family: var(--font-family-scoreboard); 
  font-weight: bold;
  width: 45%;
  text-align: right;
}

.parameter-hpanel label.right {
  padding-left: 0.25rem;
}

.parameter-hpanel input {
  padding: 0.1rem;
  font-size: 1rem;
  font-family: var(--font-family-scoreboard); 
  border: 0.15rem solid var(--color-accent);
  border-radius: 2rem;
  text-align: center;
  width: 55%;
}

.buttonlist-vertical {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 30vw;
  font-family: var(--font-family-buttons); 
}

.buttonlist-vertical a {
  cursor: pointer;
  display: inline-block;
  padding: 0.05rem 0.1rem;
  text-decoration: none;
  font-weight: 400; 
  border-radius: 0.05rem;
  box-shadow: 0 0.04rem 0.06rem rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  width: 25vw;
}

.buttonlist-vertical a:hover {
  transform: scale(1.05);
  font-weight: 800;
}