* {
  font-family: 'Roboto', sans-serif;
}

/******************** TITLE HEADER **************/
header {
  text-align: center;
  background-color: #e2e2e2;
  font-family: arial;
  font-size: 1.3em;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  margin: auto;
  border-radius: 5px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

header h1{
  font-family: arial;
}

#subBanner {
  text-align: center;
  font-family: arial;
  font-size: 1.0em; 
  margin-top: 180px;
}

a {
  text-decoration: none;
  color: black;
}

/******************* COLLAPSIBLES & CONTENT *******************/

/* describes the look of the collapsible header */
.collapsible {
  display: block;
  text-align: left;
  font-family: arial; 
  font-size: 1.0em;
  background-color: #e2e2e2;
  outline: none;
  border: none;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* hor offset, ver offset, blur, spread, colour */
  border-radius: 25px 0 0 0;
  padding: 20px;
  margin: auto;
  width: 75%;
  min-width: 250px;
  transition: 0.15s;
  cursor: pointer;
}

/* describes the header on hover and when it is active/open */
.active, .collapsible:hover, input[type=submit]:hover {
  background-color: rgb(182, 179, 179, 0.7);
}

/* describes the plus sign when the collapsible is closed*/
.collapsible:after {
  content: '\002B';
  color: black;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

/* describes the negative sign when the collapsible is open */
.active:after {
  content: "\2212";
}  

/* describes the wrapper holding content inside the collapsible */
.content {
  border: none;
  border-radius: 2px 2px 25px 25px;
  display: block;
  margin: auto;
  padding: 0;
  max-height: 0;
  width: 75%;
  min-width: 250px;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: #f0f0f0;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

/* styles the form within the content wrapper */
.formContent {
  padding: 20px;
  font-family: arial;
  height: 100%;
}

/*************************** WELCOME SECTION *************************/

#welcome {
  padding: 20px;
  font-family: arial;
}

/*********************** IDENTIFICATION SECTION **********************/

/* generic table to hold labels and input elements */
.basicTable {
  border: none;
  border-collapse: collapse;
  text-align: left;
  font-family: arial;
  background-color: #f1f1f1;
}

table.basicTable tr, table.basicTable th, table.basicTable td {
  padding: 5px;
  text-align: left;
}

table.basicTable input[type=date] {
  padding: 8px;
  width: 150px;
  height: 25px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  border: none;
  outline: none;
  font-family: 'Roboto', sans-serif;
  font-size: 1.0em;
}

table.basicTable input[type=number] {
  padding: 5px;
  width: 75px;
  height: 25px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  border: none;
  outline: none;
  font-family: 'Roboto', sans-serif;
  font-size: 1.0em;
  text-align: center;
}

table.basicTable input[type=date]:focus, table.basicTable input[type=number]:focus, #week:focus {
  border: 2px solid black;
}

/* style the select inputs */
select {
  width: 100px;
  height: 40px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  border: none;
  font-size: 1.0em;
  outline: none;
  padding: 3px;
}


/********************** BILIRUBIN DATA SECTION **********************/

.formContent h4 {
  font-size: 1.1em;
}

#risk {
  padding: 5px;
  width: 150px;
  height: 35px;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 20%);
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 1.0em;
}


/* specific table that holds the bili data */
.biliTable {
  width: 95%;
  margin: auto;
  border: none;
  border-radius: 10px;
  border-collapse: collapse;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  text-align: left;
  font-family: arial;
  background-color: white;
}

table.biliTable tr, table.biliTable th, table.biliTable td {
  padding: 8px;
  text-align: center;
}

#testTimeHeader {
  min-width: 106px;
}

table.biliTable input[type=date] {
  min-width: 120px;
  height: 25px;
  padding: 5px;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 20%);
  border-radius: 5px;
  border: 0.5px solid grey;
  outline: none;
  font-size: 1.0em;
  font-family: 'Roboto', sans-serif;
}

table.biliTable input[type=number] {
  width: 30px;
  height: 25px;
  padding: 5px;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 20%);
  border-radius: 5px;
  border: 0.5px solid grey;
  outline: none;
  font-size: 1.0em;  
  font-family: 'Roboto', sans-serif;
  text-align: center;
}

table.biliTable select {
    padding: 5px;
    width: 100px;
    height: 35px;
    box-shadow: 0 2px 4px 0 rgb(0 0 0 / 20%);
    border-radius: 5px;
    border: 0.5px solid grey;
    outline: none;
    font-size: 1.0em;
}

#risk:focus, table.biliTable input:focus, table.biliTable select:focus {
  border: 2px solid black;
}

/* define plus and minus buttons */
.plusButton {
  background-color: white;
  border: 0.2px solid black;
  outline: none;
  border-radius: 100px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  float: right;
  margin: auto;
  color: #CF1928;
  font-size: 0.9em;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.minusButton {
  background-color: white;
  border: 0.2px solid black;
  outline: none;
  border-radius: 100px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  float: right;
  margin: auto;
  color: #CF1928;
  font-size: 0.9em;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* define BAILI button */
#BAILI {
  background-color: white;
  border: none;
  outline: none;
  border-radius: 100px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  float: left;
  margin: auto;
  font-size: 1.3em;
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
}

/* define the BAILI container holding advise and graph */
#bailiAdvice {
  background-color: white;
  border: none;
  outline: none;
  border-radius: 50px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  clear: left;
  margin: auto;
  font-size: 1.0em;
  text-align: center;
  height: auto;
  display: none;
}

#chartContainer {
  display: block;
  margin: auto;
  height: 300px;
  width: 450px;
  max-width: 70%;
  z-index: -1;
}

/* define copy button */
#copy {
  background-color: white;
  border: none;
  outline: none;
  border-radius: 25px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  margin: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  float: right;
  font-size: 1.0em;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}

/* define copy button on hover */
#copy:hover {
  border: 1px solid black;
}

/* hide the clipboard text area */
#clipboardGhost textarea {
  width: 0;
  height: 0;
  border: none;
  outline: none;
  resize: none;
  background-color: #f0f0f0;
}

/* define print button */
#print {
  background-color: #f1f1f1;
  border: 0.5px solid black;
  outline: none;
  border-radius: 25px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  margin: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 0.9em;
  text-align: center;
  padding: 7px;
  cursor: pointer;
}

/* define look of tool tip when hovering on buttons */
.tooltip {
  position: relative;
  float: right; 
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 75%;
  margin-left: -75px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* change the tooltip text once data is copied */
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}



/************************************* FOOTER ***************************************/
footer {
  position: relative;
  bottom: 0px;
  text-align: center;
  font-family: arial;
  font-size: 0.75em;
  padding: 10px;
}

/******************************* INPUTS & FORM ELEMENTS *****************************/
/* remove arrows from input number */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


/* if the data is missing highlight it */
/* note need to be highly specific for this style to take precedence */
table.basicTable input[type=date].highlight, table.basicTable input[type=number].highlight, select.highlight, table.biliTable input[type=date].highlight, table.biliTable input[type=number].highlight {
  box-shadow: 0 0 2px 2px red;
  border: none;
  outline: none;
}


/*************************************** CSS RESPONSIVE ***************************************/
/* need to adjust css based on screen size
note: can target 5 groups but I chose 3 as a start and can adjust later if needed 
reference: https://www.w3schools.com/css/css_rwd_mediaqueries.asp*/

/* desktop and larger screens use css above */

/* for laptops */
@media screen and (max-width: 1024px) {
    .collapsible, .content {
      width: 90%;
    }
    table.biliTable th {
      font-size: 0.8em;

    }
    table.biliTable td {
      font-size: 0.8em;
    }
    #ageHeader, #rorHeader {
      width: 50px;
    }
    #totalBiliHeader{
      width: 75px;
    }
    #testDateHeader {
      min-width: 100px;
    }
    #testTimeHeader {
      min-width: 85px;
    }

    table.biliTable input[type=date]{
      width: 125px;
    }
    table.biliTable input[type=number]{
      width: 25px;
      height: 20px;
    }
    table.biliTable select {
      width: 80px;
      height: 30px;
    }
}

/* for tablets */
@media screen and (max-width: 768px) {
    .collapsible, .content {
      width: 95%;
    }
    .basicTable {
      font-size: 0.8em;
    }
    #dob {
      width: 125px;
    }
    #hob, #mob {
      width: 40px;
    }
    .formContent h4 {
      font-size: 1.0em;
    }
    #risk {
      font-size: 0.9em;
      width: 125px;
    }
    #biliTable {
      width: 95%; 
    }
    table.biliTable td {
      padding: 5px;
    }
    table.biliTable input[type=date]{
      min-width: 50px;
      width: 100px;
      font-size: 0.8em;
      height: 15px;
    }
    table.biliTable input[type=number]{
      font-size: 0.7em;
      width: 20px;
      height: 15px;
    }
    table.biliTable select {
      font-size: 0.7em;
      width: 70px;
      height: 25px;
    }

    .plusButton, .minusButton {
      font-size: 0.9em;
    }
    #copy {
    	font-size: 0.8em;
    }
    #BAILI {
      font-size: 1.0em;
    }
}

/* for very small screens */
@media screen and (max-width: 600px) {
  #biliTableDiv {
    overflow: scroll;
  }
}

@media print {
  #bailiAdvice {
    display: block;
    background-color: white;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 1;
    left: 0;
    margin: 0;
    padding: 15px;
    box-shadow: 0;
  }
  #biliContent {
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
  }
  header, #subBanner, .collapsible, #welcome, #identification, #weight, #print, footer {
    display: none;
  }
}