:root {
  --background-color: #fff;

  /* Login Stuff */
  --login-label-text: black;
  --login-input-text: black;
  --login-dotted-line: silver;
  --login-solid-line: black;
  --login-button: black;
  --login-button-background: white;
  --login-button-border: black;
  --login-button-hover: blue;

  /* Table Stuff */
  --table-sep: #ddd;
  --table-back-even: #fff;
  --table-back-odd: #fff;
  --table-active-background: #fff;
  --thead-background: #fff;
  --thead-text: black;

  --button-color: #fff;
  --button-highlight: #fff;

  --border-color: gray;
  --select-border: gray;
  --select-focus: blue;
  --select-arrow: gray;
  
}


/* GENRAL STYLING */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Helvetica, Arial;
  /* font-size: 14px; */
}
*:disabled { cursor: not-allowed; }

html { background: var(--background-color); }
body { padding: 5rem; padding-bottom: 20rem; }

.invis { display: none !important; }

input[type=checkbox] { cursor: pointer; }
button { cursor: pointer; }

.tooltip {
  display: flex;
  gap: 1rem;
}
/*  */


/* LOGIN-VIEW */

#login-view {
/*   background: red; */
}
#login-view h1 { text-align: center; }

.login-item {
  width: 100%;
  position: relative;
  border-bottom: 2px dashed var(--login-dotted-line);
  margin: 4rem auto 1rem;
}


/* Bar under login input */
.login-item::after {
  content: '';
  position: relative;
  display: block;
  height: 4px;
  width: 100%;
  top: 2px;
  background: var(--login-solid-line);

  transform: scaleX(0);
  transform-origin: 0%;
  transition: transform 500ms ease;
}

/* Animation for bottom bar */
.login-item:focus-within::after { transform: scaleX(1); }

.login-item label {
  color: var(--login-label-text);
  font-size: 1.2rem;

  z-index: -1;
  position: absolute;
  left: 0%;

  transform-origin: 0%;
  transition: transform 400ms;
}

/* Animate Label when placeholder disappears */
.login-item:focus-within label, .login-item input:not(:placeholder-shown) + label { transform: scale(0.8) translateY(-3rem); }

.login-item input {
  background: none;
  border: none;
  width: 100%;
  padding: 0.25rem 0;
  font-weight: bold;
  font-size: 1.5rem;
}

#login-view button {
  color: var(--login-button);
  background-color: var(--login-button-background);

  border: 1px solid var(--login-button-border);
  border-radius: 0.25rem;
  outline: none;
  padding: 16px;
  width: 100%;
  font-weight: bold;
}

#login-view button:hover {
  background-color: var(--login-button-hover);
  transition: all 0.5s 0s ease;
}
/*  */


.header {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.header button { padding: 5px; }


/* DEVICE-OVERVIEW */
#devices-overview-container { margin-top: 1.5rem; }

.device-overview { margin-top: 1.5rem; }
.device-overview .title {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0px 1rem;
}

/* Color changes with CRC */
.device-overview .title div {
  min-height: 25px;
  min-width: 25px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border-radius: 3px;
}

.device-overview .content {
  transition: all 0.8s linear;
  transition-delay: 0.2s;
  max-height: 0;
  overflow: hidden;
}
.device-overview .content.trans { max-height: 2000px; }

.device-overview .content h2 {
  margin-bottom: 0.5rem;
  text-align: center;
}
.device-overview .content table {
  margin-bottom: 2rem;
}
/**/


/* DEVICES / COMMANDS */
.devices-and-commands {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
}


/* COMMAND CENTER */
#command-center-container {
  border: 1px solid black;
  border-radius: 5px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

#command-center-container h1 { text-align: center; }

#command-center-container button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 5px;
  background-color: var(--button-color);
  transition: all 0.5s 0s ease-in-out;
}
#command-center-container button:hover {
  transform: scale(1.02, 1);
  background-color: var(--button-highlight);
}

.config-item {
  padding: 5px 0px;
  display: flex;
  gap: 1rem;
}
.config-item p {
  min-width: 100px;
  font-size: 1.2rem;
}

.config-item input,
select {
  appearance: none;
  background-color: transparent;
  border: none;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}

.config-item input,
.select-container {
  width: 100%;
  min-width: 15rem;
  max-width: 25rem;
  border: 1px solid var(--select-border);
  border-radius: 0.25em;
  padding: 0.25em 0.5em;
  font-size: 1.2rem;
}

.select-container {
  cursor: pointer;
  line-height: 1.1;
  display: grid;
  grid-template-areas: 'select';
  align-items: center;
}

.select-container::after {
  content: "";
  width: 0.8em;
  height: 0.5em;
  background-color: var(--select-arrow);
  clip-path: polygon(100% 0%, 0 0%, 50% 100%);
  justify-self: end;
}
select,
.select-container:after { grid-area: select; }


/* COMMAND-CENTER PEG-ENABLE */

#peg-config-container div {
  display: flex;
  gap: 1rem;
  margin: 3px;
}

/*  */



/* CHANGE LOG */
#command-log-container { margin-top: 1.5rem; }
#command-log-container .title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1rem;
  padding-bottom: 1rem;
}

#command-log-container button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  background-color: var(--button-color);
  border-radius: 5px;
  transition: all 0.5s 0s ease-in-out;
}
#command-log-container button:hover {
  transform: scale(1.04, 1);
  background-color: var(--button-highlight);
}
/*  */



/* TABLE STYLING */
.table-content {
  border-collapse: collapse;
  font-size: 0.9rem;

  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
}

.table-content thead tr {
  background-color: var(--thead-background);
  color: var(--thead-text);
  text-align: left;
  font-weight: bold;
}

.table-content tbody tr {
  border-bottom: 1px solid var(--table-sep);
  background-color: var(--table-back-odd);
}

.table-content tbody tr:nth-of-type(even) { background-color: var(--table-back-even); }
.table-content tbody tr:last-of-type { border-bottom: 2px solid var(--thead-background); }

.table-content th, .table-content td { padding: 1rem clamp(0.6rem, 1rem, 1.2rem); }


.table-content tbody tr.active-row {
  font-weight: bold;
  color: var(--thead-background);
  background-color: var(--table-active-background)
}

/* ///////////// */


/* MEDIA STYLING */
.mobile-only { visibility: hidden; }
.desktop-only { visibility: visible; }

@media only screen and (max-width: 800px) {
  .mobile-only { visibility: visible; }
  .desktop-only { visibility: hidden; }
}
