:root {
  --background-body: #fff;
  --background: #efefef;
  --background-alt: #f7f7f7;
  --selection: #9e9e9e;
  --text-main: #363636;
  --text-bright: #000;
  --text-muted: #70777f;
  --links: #0076d1;
  --focus: #0096bfab;
  --border: #dbdbdb;
  --code: #000;
  --animation-duration: 0.1s;
  --button-base: #d0cfcf;
  --button-hover: #9b9b9b;
  --scrollbar-thumb: rgb(170, 170, 170);
  --scrollbar-thumb-hover: var(--button-hover);
  --form-placeholder: #949494;
  --form-text: #1d1d1d;
  --variable: #39a33c;
  --highlight: #ff0;
  --select-arrow: url("data:image/svg+xml;charset=utf-8,%3C?xml version='1.0' encoding='utf-8'?%3E %3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' height='62.5' width='116.9' fill='%23161f27'%3E %3Cpath d='M115.3,1.6 C113.7,0 111.1,0 109.5,1.6 L58.5,52.7 L7.4,1.6 C5.8,0 3.2,0 1.6,1.6 C0,3.2 0,5.8 1.6,7.4 L55.5,61.3 C56.3,62.1 57.3,62.5 58.4,62.5 C59.4,62.5 60.5,62.1 61.3,61.3 L115.2,7.4 C116.9,5.8 116.9,3.2 115.3,1.6Z'/%3E %3C/svg%3E");
}

html {
  scrollbar-color: var(--scrollbar-thumb) var(--background-body);
  scrollbar-width: thin;
}

body {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  max-width: 800px;
  margin: 20px auto;
  padding: 0 10px;
  word-wrap: break-word;
  color: var(--text-main);
  background: var(--background-body);
  text-rendering: optimizeLegibility;
}

input, button {
  transition: background-color 0.1s linear, border-color 0.1s linear,
    color 0.1s linear, box-shadow 0.1s linear, transform 0.1s ease;
  transition: background-color var(--animation-duration) linear,
    border-color var(--animation-duration) linear,
    color var(--animation-duration) linear,
    box-shadow var(--animation-duration) linear,
    transform var(--animation-duration) ease;
  color: var(--form-text);
  background-color: var(--background);
  margin-right: 6px;
  margin-bottom: 6px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  outline: none;
}

h1, h2, h3 {
  font-weight: 600;
}

button,
select,
input[type='button'],
input[type='checkbox'] {
  cursor: pointer;
}

input,
select {
  display: block;
}

[type='checkbox'] {
  display: initial;
}

select {
  color: var(--form-text);
  background-color: var(--background);
  margin-right: 6px;
  margin-bottom: 6px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  outline: none;
}

button {
  background-color: var(--button-base);
  padding-right: 30px;
  padding-left: 30px;
}

input[type='submit'], input[type='button'] {
  background-color: var(--button-base);
  padding-right: 30px;
  padding-left: 30px;
}

button:hover,
input[type='submit']:hover,
input[type='button']:hover {
  background: var(--button-hover);
}

input[type='checkbox'] {
  height: 1em;
  width: 1em;
}

input {
  vertical-align: top;
}

label {
  vertical-align: middle;
  margin-bottom: 4px;
  display: inline-block;
}

input:not([type='checkbox']):not([type='radio']),
select,
button {
  -webkit-appearance: none;
}

select {
  background: var(--background) var(--select-arrow) calc(100% - 12px) 50% / 12px
    no-repeat;
  padding-right: 35px;
}

select::-ms-expand {
  display: none;
}

select[multiple] {
  padding-right: 10px;
  background-image: none;
  overflow-y: auto;
}

input:focus,
select:focus,
button:focus {
  box-shadow: 0 0 0 2px var(--focus);
}

input[type='checkbox']:active,
input[type='submit']:active,
input[type='button']:active,
button:active {
  transform: translateY(2px);
}

input:disabled,
select:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

::-moz-placeholder,
:-ms-input-placeholder,
::-ms-input-placeholder,
::placeholder {
  color: var(--form-placeholder);
}

fieldset {
  border: 1px var(--focus) solid;
  border-radius: 6px;
  margin: 0;
  margin-bottom: 12px;
  padding: 10px;
}

legend {
  font-size: 0.9rem;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: var(--links);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

::-moz-selection,
::selection {
  background-color: var(--selection);
  color: var(--text-bright);
}

header {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

label, input, select, button, span {
  font-size: 1.05rem;
}

h3 {
  margin-bottom: 0;
}

ul {
  font-size: 1rem;
  margin-top: 5px;
}

/* table {
  border-collapse: collapse;
  margin-bottom: 10px;
  width: 100%;
  table-layout: fixed;
}

td,
th {
  padding: 6px;
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
}

thead {
  border-bottom: 1px solid var(--border);
}

tfoot {
  border-top: 1px solid var(--border);
}

tbody tr:nth-child(even) {
  background-color: var(--background);
}

tbody tr:nth-child(even) button {
  background-color: var(--background-alt);
}

tbody tr:nth-child(even) button:hover {
  background-color: var(--background-body);
} */

.error_message {
  color: red;
  display: none;
}

#form_year_range_div,
#form_year_single_div {
  margin-bottom: 15px;
}

table {
  font-size: 1rem;
}

table caption {
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 5px;
}

#table_lab_results tbody td:not(:first-child),
#table_all_div table tbody td:not(:first-child),
#table_lab tbody td:not(:first-child),
#table_query_mobile tbody td:not(:first-child) {
  text-align: center;
}

.printText {
  font-style: italic;
  margin: 0;
}
.printMessage {
  margin-bottom: 15px;
}

#table_query tbody {
  text-align: center;
}

form > div {
  margin-bottom: 20px;
}

#table_query {
  display: table;
}
#table_query_mobile {
  display: none;
}

#table_lab_div {
  display: flex;
  gap: 10px;
}

#table_lab_div table,
#table_query_div table {
  width: 100%;
}

.plot_container {
  page-break-inside: avoid;
  display: flex;
  align-items: center;
}

.gradient_box_container {
  display: flex;
  gap: 5px;
}

.gradient_box {
  color: white;
  width: 100px;
  height: 240px;
  border: 1px solid black;
  position: relative;
}

#gradient_pungency .gradient_box {
  background-image: linear-gradient(to top, darkgreen, lightgreen, yellow, red);
}

#gradient_lf .gradient_box {
  background-image: linear-gradient(to top, darkgreen, lightgreen, yellow, tomato, red);
}

#gradient_methyl .gradient_box {
  background-image: linear-gradient(to top, darkgreen, green, lightgreen, yellow, tomato, red);
}

.gradient_box_left_text {
  display: flex;
  flex-direction: column;
  position: relative;
}

.gradient_box_sample_char {
  font-size: 20px;
  position: absolute;
  transform: translateY(-48%) translateX(-70%);
}

.gradient_box_topText {
  text-align: center;
  position: absolute;
  top: 0;
}

.gradient_box_bottomText {
  text-align: center;
  position: absolute;
  bottom: 0;
}

.gradient_box_line {
  width: 100%;
  height: 1px;
  position: relative;
  top: 0;
}

.gradient_box_ref_line {
  height: 2px;
  background-color: black;
}

.gradient_box_sample_line {
  height: 0px;
  border-top: 1px dashed black;
}

.gradient_box_limits {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.gradient_box_maxText {
  transform: translateY(-50%);
}

.gradient_box_minText {
  transform: translateY(50%);
}

.gradient_box_refText {
  position: absolute;
  transform: translateY(-50%);
  color: black;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.2rem;
  }

  label, input, select, button, span {
    font-size: 1rem;
  }

  #table_query {
    display: none;
  }
  #table_query_mobile {
    display: table;
  }

  #table_lab_div {
    flex-direction: column;
  }

  .plot_container {
    margin-left: -30px;
  }
}

@media (max-width: 300px) {
  header {
    font-size: 1rem;
  }
}


@media print {
  @page {
    size: portrait;
    margin: 0.3in;
  }

  * {
    font-size: 16px;
  }

  #table_query {
    display: table;
  }
  #table_query_mobile {
    display: none;
  }
  #table_lab_div {
    flex-direction: row;
  }

  .printMessage {
    display: none;
  }

  body {
    padding-right: 0;
    padding-left: 0;
  }

  a {
    text-decoration: underline;
  }

  header {
    margin: 0 10px;
    flex-direction: row;
    justify-content: space-between;
    font-size: 14px;
  }

  button {
    display: none;
  }
}