/* LOADER CLASSES */

.loader {
  position: fixed;
  margin: auto;
  inset: 0;
  width: 5vw;
  height: 5vw;
  border: 8px solid #f3f3f3;
  border-radius: 50%;
  border-top: 8px solid #3498db;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
  visibility: visible;
}

.loader-background {
  position: fixed;
  margin: auto;
  inset: 0;
  width: 10em;
  height: 10em;
  background-color: white;
  /*  border: 1px, solid,lightgray;*/
}

/* Safari */

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* DEFAULT CLASSES */

:root {
  --myMainBackgroundColor: #111154;
  --myInstructionsColor: rgb(255, 255, 203);
  --myDarkerInstructionsColor: rgb(255, 255, 147);
}

body {
  font-family: roboto, arial, helvetica, verdana, sans-serif;
  padding: 0px;
  margin: 0px;
  user-select: none;
  overflow-y: scroll;
  min-width: 1298px;
}

/*
  NOTE: do not combine the :hover and :disabled pseudoclasses into the 'button-standard' class using the '&' operator.
  keep the pseudoclassas distinct. the reason is if they are combined, when using a button with 'button-standard button-stacked', 
  hovering over the button will use the 'button-standard:hover' pseudoclass when using the '&' operator, which is not what we want.
  by not using the '&', the 'button-standard:hover' is ignored, and hovering will use 'button-standard button-stacked hover-effect'
  (even though 'button-stackes DOES using the '&' operator) which is what we want.
*/

.button-standard {
  --myColor: white;
  color: var(--myColor);
  --myBackgroundColor: rgb(0, 0, 255);
  background-color: var(--myBackgroundColor);
  --myOpacity: 1;
  opacity: var(--myOpacity);
  font-weight: bold;
  padding: 14px 20px;
  margin: auto;
  margin-top: 8px;
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 8px;
  border: 1px solid black;
  cursor: pointer;
  width: 200px;
  user-select: none;
  --disabled-background-color: #ccc;
}

.button-standard:hover {
  background-color: rgb(3, 3, 202);
  color: var(--myColor);
  opacity: var(--myOpacity);
}

.button-standard:disabled {
  background-color: var(--disabled-background-color);
  color: gray;
  opacity: 0.7;
  cursor: default;
}

/* FONTS */

.roboto-thin {
  font-family: "Roboto", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.roboto-light {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.roboto-regular {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.roboto-medium {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.roboto-bold {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.roboto-black {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.roboto-thin-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.roboto-light-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.roboto-regular-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.roboto-medium-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.roboto-bold-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.roboto-black-italic {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-style: italic;
}

/* HEADER CLASSES */

header {
  padding: 0px;
  width: 100%;
  height: auto;
  background-color: #1aa5f0;
  position: relative;
  isolation: isolate;
}

header::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: url("/images/factory_cropped_wide_2.jpg");
  background-size: cover;
  background-position: top center;
  opacity: 0.2;
}

/* the thin horizontal bar at the top of the page */
.top-bar {
  width: 100%;
  background: #0e0e4260;
  opacity: 1;
  height: 0.7em;
  color: black;
  text-align: center;
  font-weight: bold;
  font-size: 50px;
  letter-spacing: 3px;
  border: none;
}

/* the area where the top buttons will be located */
.top-bar-button-bar {
  position: absolute;
  top: 7px;
  right: 80px;
  font-size: 23%;
  padding-left: 0px;
  margin-bottom: 0px;
  border: none;
  text-align: center;
}

/* the individual top buttons */
.top-bar-button-text {
  color: white;
  font-weight: bold;
  font-family: roboto, sans-serif;
  padding: 0px;
  padding-top: 3px;
  padding-bottom: 3px;
  /* left and right padding controls the space between the buttons. */
  padding-left: 10px;
  padding-right: 10px;
  border: none;
  background-color: rgb(
    0,
    0,
    0,
    0
  ); /* the background color has zero opacity. */
  cursor: pointer;
}

.header-text {
  vertical-align: middle;
  margin: auto;
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 277%;
  letter-spacing: 3px;
}

.header-text-smaller-font {
  font-size: 225%;
}

.center-vert-and-hortiz {
  width: 100%;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* the ema logo in the header*/
.logos {
  width: 112px;
  position: absolute;
  left: 95px;
  top: 61px;
  cursor: pointer;
}

/* FOOTER CLASSES */

footer {
  margin-top: 0px;
  padding-top: 30px;
  padding-bottom: 25px;
  background-color: lightslategrey;
  line-height: 1.5;
  vertical-align: middle;
  font-size: 90%;
}

.footer-text {
  padding-left: 40px;
  user-select: text;
  color: ghostwhite;
}

/* MAIN MENU CLASSES */

/* used by various menu pages, such as login, main menu, submit questionnaire, report category, and volume reports. */

.menu_page_main_table {
  background-color: white;
  width: 1200px;
  border: 0px;
  margin: auto;
}

.menu_page_left_cell {
  padding-top: 0px;
  border: none;
}

.left_cell_large_text {
  padding-top: 0px;
  padding-left: 95px;
  padding-right: 75px;
  font-size: 16px;
  text-align: left;
  vertical-align: middle;
  font-family: verdana;
  line-height: 1.6;
  color: black;
}

.left_cell_large_text_bolded {
  padding-bottom: 10px;
  margin: auto;
  font-weight: bold;
}

.left_cell_large_text_normal {
  padding-bottom: 30px;
  margin: 0;
  font-weight: normal;
}

.menu_page_right_cell {
  margin: auto;
  height: 300px;
  padding: 0px;
  vertical-align: middle;
  padding-left: 0px;
  padding-top: 10px;
  padding-bottom: 10px;
  border: none;
}

.menus-buttons-box {
  border: 1px solid lightgray;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-80%, -50%);
  transform: translate(-80%, -50%);
  padding: 15px;
  padding-left: 33px;
  padding-right: 33px;
  /* first param:  horizontal offset. positives pushes shadow to the right, negative pulls shadow to the left. */
  /* second param: vertical offset. positives pushes shadow down, negative pulls shadow up.
  /* third param: blur radius. surrounds element with a blur. the larger the value, the bigger the blur, so the shadow becomes bigger and lighter.
  /* fourth param: spread radius. surrounds element with a shadow (not blurred). positive values will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink. */
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2),
    0px 0px 5px 0px rgba(0, 0, 0, 0.18);
}

.button-stacked {
  --myStackedBackgroundColor: #d76622;
  --myStackedColor: white;
  --myStackedOpacity: 1;
  background-color: var(--myStackedBackgroundColor);
  color: var(--myStackedColor);
  opacity: var(--myStackedOpacity);
  line-height: 1.33;
  border: none;
  line-height: 1.33;
  margin-left: 0px;
  margin-right: 0px;
  cursor: pointer;

  &.hover-effect {
    background-color: rgb(155, 76, 27);
  }

  &.disabled-effect-original-colors {
    background-color: var(--myStackedBackgroundColor);
    color: var(--myStackedColor);
    opacity: var(--myStackedOpacity);
    cursor: default;
  }

  &.disabled-effect-greyed-out {
    background-color: grey;
    color: lightgrey;
    opacity: 0.5;
    cursor: default;
  }
}

/* may be obsolete. */
.button-stacked-tall {
  height: 63.44px;
}

/* TOP BOX CLASSES */

.top-box {
  width: 1300px;
  margin: auto;
  padding-top: 0px;
  padding-bottom: 0px;
  background-color: white;
  border-top: 24px solid var(--myMainBackgroundColor);
  border-bottom: 0x solid var(--myMainBackgroundColor);
}

.top-box-row {
  padding-top: 30px;
  padding-bottom: 25px;
  padding-left: 30px;
  font-size: 15px;
  border-bottom: 4px solid var(--myMainBackgroundColor);
}

/* INPUT (QUESTIONNAIRE) CLASSES */

/* used for the contact name and contact email inputs */
.float-container {
  border: none;
  padding: 0px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* used for the contact name and contact email inputs */
.float-child {
  width: 35%;
  float: left;
  padding: 0px;
  border: 1px solid white;
}

/* used by the input reports to display the instructions and input fields */
table {
  background-color: white;
  width: 1300px;
  border: 0px;
  font-size: 14px;
  margin: auto;
  padding-right: 25px;
  border-bottom: 0px;
  border-collapse: collapse;
}

th,
td {
  font-size: 14px;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: left;
  border-left: 0px;
  border-right: 0px;
  border-top: 0px;
  border-bottom: 4px solid var(--myMainBackgroundColor);
  height: 20px;
  vertical-align: middle;
}

input {
  width: 90px;
  padding-left: 6px;
  user-select: text;
}

.instructions {
  text-align: left;
  padding: 10px;
  padding-left: 32px;
  /*background: rgb(253, 253, 155);*/
  /*background: rgb(255, 255, 190);*/
  background: var(--myInstructionsColor);
  vertical-align: middle;
  line-height: 1.4;
}

.prompts {
  text-align: left;
  padding-left: 20px;
}

/* used to display a row with a single cell within the questionnaire tables. */
.one-row {
  text-align: left;
  background: white;
  vertical-align: middle;
  line-height: 1.4;
  width: 100%;
  border-top: 15px solid var(--myMainBackgroundColor);
  border-bottom: 15px solid var(--myMainBackgroundColor);
  padding: 25px;
  padding-top: 25px;
  padding-bottom: 25px;
  /*background: rgb(253, 253, 155);*/
  background: var(--myInstructionsColor);
}

.one-row-darker {
  background: var(--myDarkerInstructionsColor);
}

/* cancel button on questionnaires (at the bottom and the 'lose all changes' modal. */
.button-cancel {
  color: black;
  background-color: white;

  /* cancel button on questionnaires (at the bottom and the 'lose all changes' modal. */
  &.button-cancel:hover {
    background-color: rgb(233, 232, 232);
  }
}

/* ok button on questionnaires after a successful submission. */
.button-ok {
  background-color: green;
  color: white;
  margin: auto;
  margin-top: 8px;
  padding: 14px 20px;
  border: none;
  cursor: pointer;
  width: 100px;

  &.button-ok:hover {
    background-color: darkgreen;
  }
}

/* classes for the error box. */

.errMsg {
  color: red;
  padding-left: 5px;
  font-size: 14px;
}

.errorBox {
  text-align: center;
  margin: auto;
  /* 
 padding: 0px;
  width: 500px;
*/
  width: fit-content;
  min-width: 442px;
  padding-left: 10px;
  padding-right: 10px;
  height: 40px;
  box-sizing: border-box;
  background-color: #f5d2d8;
  border: 1px solid #ce1d3b;
  border-radius: 4px;
  /*display: don't set display here. do it in the html.*/
}

.errorLabel {
  line-height: 40px;
  color: black;
  font-family: arial, helvetica, verdana, sans-serif;
  font-size: 14px;
  text-align: center;
  font-weight: bold;
  display: block;
  padding-left: 0px;
  padding-right: 0px;
  box-sizing: border-box;
  text-align: center;
  margin: auto;
}

/* MODAL CLASSES */

/* modal css suggested by https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal */

/* The Modal (background) */
.modal-possible-enhancement {
  display: flex; /* Makes the body a flex container */
  justify-content: center; /* Centers items horizontally along the main axis */
  align-items: center; /* Centers items vertically along the cross axis */
  min-height: 100vh; /* Ensures the body takes up the full viewport height */
  margin: 0;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.66);
}

.modal {
  display: none;
  position: fixed;
  padding-top: 150px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.66);
}

.modal-content {
  background-color: rgb(236, 236, 236);
  margin: auto;
  padding: 20px;
  border: 2px solid black;
  border-radius: 8px;
  width: 60%;
  font-size: 125%;
}

/* the 'Lose All Changes' button area. */
.lose-all-changes {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  user-select: none;
}

/* the Close Button. */
.closeModal {
  color: black;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.closeModal:hover,
.closeModal:focus {
  color: gray;
  text-decoration: none;
  cursor: pointer;
}

.modal_prompt {
  margin: auto;
  margin-top: 60px;
  margin-bottom: 40px;
  text-align: center;
  color: black;
}

/* REPORT CLASSES */

.main-background {
  padding-bottom: 10px;
  background-color: var(--myMainBackgroundColor);
}

/* for the area that displays the bottom buttons on the report menus */

.bottom-buttons-box {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: bold;
  margin: auto;
  padding: 0px;
  width: 650px;
  height: 60px;
  box-sizing: border-box;
  background: none;
  border: none;
  display: block;
  user-select: none;
}

.bottom-buttons-box-ouput {
  box-sizing: border-box;
  background: none;
  border: none;
  display: block;
  user-select: none;
  text-align: center;
}

.bottom-buttons-box-ouput-buttons {
  text-align: center;
  margin: auto;
  padding-bottom: 10px;
}

/*
 .button-horizontal {
  --myBackgroundColor: #d76622;
  background-color: var(--myBackgroundColor);
  --disabled-background-color: #ccc;
  border: none;
  line-height: 1.33;
  margin-left: 20px;
  margin-right: 20px;
  cursor:pointer;

  &:disabled {
    background-color: #ccc;
    color: #666;
    opacity: 0.7;
    cursor: default;
  }
}
 */

.button-horizontal {
  --myHorizontalBackgroundColor: #d76622;
  --myHorizontalColor: white;
  --myHorizontalOpacity: 1;
  background-color: var(--myHorizontalBackgroundColor);
  color: var(--myHorizontalColor);
  opacity: var(--myHorizontalOpacity);
  line-height: 1.33;
  margin-left: 20px;
  margin-right: 20px;
  cursor: pointer;

  &.hover-effect {
    background-color: rgb(155, 76, 27);
  }

  &.disabled-effect-original-colors {
    background-color: var(--myHorizontalBackgroundColor);
    color: var(--myHorizontalColor);
    opacity: var(--myHorizontalOpacity);
    cursor: default;
  }

  &.disabled-effect-greyed-out {
    background-color: grey;
    color: lightgrey;
    opacity: 0.5;
    cursor: default;
  }
}
