@font-face {
    font-family: 'LittleCharacter';
    src: url('/static/fonts/LittleCharacter-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }

:root {
  --black: rgba(1,1,1,1);
  --grey1: rgba(51,51,51,1);
  --grey2: rgba(127,127,127,1);
  --grey2Back: rgba(127,127,127,0.75);
  --grey2Back2: rgba(127,127,127,0.5);
  --grey2Back3: rgba(127,127,127,0.25);
  --grey3: rgba(204,204,204,1);
  --white: rgb(255, 255, 255, 1);
  --orange1: rgba(255,164,0,1);
  --orange2: rgba(217,93,57,1);
  --orange2Back: rgba(217,93,57,0.7);
  --blue1: rgba(51,204,255,1);
  --blue2: rgba(0,136,179,1);
  --purple: rgba(68,3,129,1);

  font-family: 'Courier New', Courier, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}



/*  =================
    Table of Contents
    =================
    
    1. Navigation bar
    2. Home nav buttons and background
    3. Sub-menu
    4. Typography
    5. Pagination and search
    6. Messages
    7. Popups
    8. Forms
    9. Loading screen
    10. Desktop media changes
    
*/



/*  =================
    1. Navigation bar
    ================= */

/*** Back button ***/
.backButton {
  position: absolute !important;
  top: 0;
  left: 0;
  margin-top: 1.25em;
  margin-right: 1.25em;
  margin-left: 1em;
}

.backButton img {
  filter: invert(95%) sepia(0%) saturate(113%) hue-rotate(144deg) brightness(87%) contrast(91%);
  height: 1em;
}


/* Nav bar based upon: https://www.youtube.com/watch?v=8QKOaTYvYUA */

.header {
  /* General variables */
  --navOptions: 7; /* Number of items in the nav bar */ 
  --navColor: var(--grey2); /* Color of the nav bar background */
  --navButtonGap: 1em; /* Spacing between buttons on the nav bar */
  --navButtonPadding: 0em; /* Padding inside the nav bar buttons */
  --navButtonTypeGap: 1; /* Gap between the navigation buttons (originally orange) and user management buttons (originally purple). Unit is integer multiples of navigation buttons (including gaps) */
  --navButtonHeight: 2.5em; /* Set the height of all nav buttons (coloured area) */

  /* Desktop variables */
  --navLeftPadding: 3em; /* gap to the left of the nav buttons in desktop */
  --navRightPadding: 7em; /* gap to the right of the nav buttons in desktop */
  
  /* Mobile variables */
  --navWidth: 75%; /* % of width of screen the mobile nav bar will take up */
  --navOpacity: 0.98; /* Opacity of the mobile nav bar */
  --navTopPadding: 6em; /* Gap above top-most nav button in mobile */
  --navBottomPadding: 4em; /* Gap below bottom-most nav button in mobile */
  --navTransitionTime: 200ms; /* Time for the nav bar to appear in mobile */
  --navHamburgerSize: 2.25em; /* Size of the hamburger menu icon (square) */
  --navHamburgerMargin: 1.25em; /* Size of the margin around the hamburger menu icon */

  height: 0; /* Needed so that the header doesnt cover the search bar */
  width: var(--navWidth);
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9000;
  opacity: var(--navOpacity);
  font-size: calc(2 * var(--vh, 1vh)); /* Variable font size below a certain screen width (as set by @media lower down) */
}


/*** Hamburger menu ***/

/* An input checkbox, with class nav.toggle, is being used to open the nav bar. (The nav-toggle-label is actually the visible thing being clicked, hence why this is being moved off-screen.) */
.nav-toggle {
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}

/* Nav toggle is moved off-screen becuase we still need it to exist so that we can focus on it (and hence the label), for users who tab through the screen */
.nav-toggle:focus ~ .nav-toggle-label {
  outline: 1px solid var(--navColor);
}

/* This combinator allows the nav-toggle checkbox to show (and hide) the navigation bar by scaling it up to full size. */
.nav-toggle:checked ~ div.nav {
  transform: scale(1,1);
}

.nav-toggle:checked ~ div.navBackground {
  transform: scale(1,1);
}

/* This combinator allows the nav-toggle checkbox to show the navigation button text by fading its opacity in. */
.nav-toggle:checked ~ div.nav a {
  opacity: 1;
  transition: opacity calc(var(--navTransitionTime) * 0.6) ease-in-out calc(var(--navTransitionTime) * 0.6);
}

/* This label is 'for' the checkbox, so can be selected in its place, and we are then using this label with a span to create the hamburger icon. */
.nav-toggle-label {
  position: absolute;
  right: 0;
  top: 0;
  height: var(--navHamburgerSize);
  margin: var(--navHamburgerMargin);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* This is where the hamburger menu is drawn */
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  position: relative;
  background: var(--grey3);
  width: var(--navHamburgerSize);
  height: calc(var(--navHamburgerSize) / 10);
  border-radius: calc(var(--navHamburgerSize) / 10);
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}

.nav-toggle-label span::before {
  bottom: calc(var(--navHamburgerSize) / 4);
}

.nav-toggle-label span::after {
  top: calc(var(--navHamburgerSize) / 4);
}

/*** Mobile navigation bar ***/

.navBackground {
  content: "";
  position: relative;
  width: 100vw;
  /* right: 33%; */
  --x: calc(75 / 100);
  right: calc((100% - var(--navWidth)) / (var(--x)));
  height: calc(var(--vh, 1vh) * 100); /* running JavaScript to calcualte --vh */
  background: var(--grey1);
  opacity: 0.5;
  transform: scale(0,1); /* Scaling the nav bar height down so that it does not display the nav until the checkbox is selected */
  transform-origin: right;
  transition: transform var(--navTransitionTime) ease-in-out;
}

.nav {
  position: absolute;
  top: 0;
  background: var(--navColor);
  width: 100%;
  transform: scale(0,1); /* Scaling the nav bar height down so that it does not display the nav until the checkbox is selected */
  transform-origin: right;
  transition: transform var(--navTransitionTime) ease-in-out;
}

.nav ul {
  margin: 0;
  padding: 0;
  padding-top: var(--navTopPadding);
  padding-bottom: var(--navBottomPadding);
  list-style: none;
  box-shadow: 0 1px 10px 0 rgba(0,0,0,0.4);
  /* Set up a grid for the navigation buttons */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: repeat(calc(var(--navOptions) + var(--navButtonTypeGap)), var(--navButtonHeight));
  gap: var(--navButtonGap); /* For both row-gap and column-gap */
}

/* Home button included, for use during testing */
.nav .hiddenButtonNav {
  position: absolute;
  bottom: 0.5em;
  left: 0.5em;
}

.nav .hiddenButtonNav .whimsyWrapper {
  --whimsyHeight: 1em;
  --color: var(--grey3);
}

/* Share button */
.nav .shareButton {
  position: absolute;
  bottom: 0.5em;
  right: 0.5em;
}

.nav .shareButton:hover {
  cursor: pointer;
}

.nav .shareButton img {
  filter: invert(81%) sepia(0%) saturate(1%) hue-rotate(226deg) brightness(97%) contrast(102%);
}

/* Privacy policy */
.nav .privacyButton, 
.nav .tAndCButton,
.nav .childAccountInfo {
  position: absolute;
  bottom: 2em;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: max-content;
  font-size: 0.5em;
}

.nav .tAndCButton {
  bottom: 0.75em;
}

.nav .childAccountInfo {
  bottom: 3.25em;
}

.nav .privacyButton a,
.nav .tAndCButton a,
.nav .childAccountInfo a {
  color: var(--grey3);
}

/* Navigation items are split into navigation buttons (move around the tool) and user buttons (managing the user). The grid is used to display them differently. */
.nav .buttonNav,
.nav .childButtonNav {
  padding: var(--navButtonPadding);
  background: var(--orange1);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
  grid-column: 2 / 6;
}

.nav .buttonAdmin {
  background: var(--orange2);
  position: relative;
}

.nav .buttonEngage {
  padding: var(--navButtonPadding);
  background: var(--grey3);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
  grid-column: 2 / 6;
  color: var(--black);
  margin: auto;
  text-align: center;
  width: 100%;
  height: 100%;
}

.nav .buttonEngageProgressBackground {
  height: 0.2em;
  background-color: var(--grey2Back);
  width: 100%;
  transform: translateY(-0.2em)
}

.nav .buttonEngageProgress {
  height: 0.2em;
  background-color: var(--orange2);
}

/* buttonNavLinked are the for where there is a button with an icon button to the right hand side e.g. "view items", with "add item" to the right */
.nav .buttonNavLinked {
  padding: var(--navButtonPadding);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  grid-column: 2 / 6;
  /* now set the grid for the items inside of it */
  display: grid;
  grid-template-columns: 1fr var(--navButtonHeight);
}

.nav .buttonNavLinked .childButtonNav {
  box-shadow: none;
  grid-column: auto;
}

.nav .buttonNavLinked .childButtonNav img {
  height: 0.75em;
}

.nav .buttonNavLinked > .childButtonNav:nth-child(2) {
  background-color: var(--blue1);
  border-left: solid 1px var(--grey1); /* line separating the two linked buttons */
}

.nav .buttonNavLinked > .childButtonNav:nth-child(2):hover {
  background-color: var(--blue2);
}

.headerNotifications,
.buttonNotifications,
.notifications {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2em;
  width: 2em;
  position: absolute;
  top: -1.1em;
  right: -1.1em;
  background-color: var(--blue2);
  border: solid var(--blue1);
  color: var(--grey3);
  font-size: 0.5em;
}

.headerNotifications {
  top: var(--navHamburgerMargin);
  right: var(--navHamburgerMargin);
}

.buttonNotifications {
  top: revert;
  transform: translate(-0.3em, -3.1em);
}

table .buttonNotifications {
  transform: translate(-0.3em, -3.1em);
}

.nav .buttonNav a,
.nav .buttonEngage a,
.nav .childButtonNav a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  color: var(--black);
  text-decoration: none;
  opacity: 0; /* To avoid scaling of the text, their opacity will go to 1 once the nav bar has transitioned in */
  transition: opacity calc(var(--navTransitionTime) * 0.4) ease-in-out; /* Transition when the nav bar disappears */
}

.nav .buttonAdmin a {
  color: var(--black);
}

.nav .buttonNav:hover,
.nav .childButtonNav:hover {
  background: var(--orange2);
}

/* Navigation items are split into navigation buttons (move around the tool) and user navigation (managing the user). The grid is used to display them differently. */
.nav .buttonUser,
.nav .buttonLogout {
  padding: var(--navButtonPadding);
  background: var(--purple);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
  grid-row: calc(var(--navOptions) + var(--navButtonTypeGap));
  grid-column: 2 / span 2;
}

.nav .buttonLogout {
  grid-column: 4 / span 2;
}

.nav .buttonUser a,
.nav .buttonLogout a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  color: var(--white);
  text-decoration: none;
  opacity: 0; /* To avoid scaling of the text, their opacity will go to 1 once the nav bar has transitioned in */
  transition: opacity calc(var(--navTransitionTime) * 0.6) ease-in-out; /* Transition when the nav bar disappears */
}

.nav .buttonUser:hover,
.nav .buttonLogout:hover {
  background: var(--blue2);
}


/*  =================
    2. Home nav buttons, background and header
    ================= */

/*** Home nav buttons ***/

/* On the home page, there is no navigation bar, instead the buttons are always visible */
.homeButtons {
  /* General variables */
  --navOptions: 5; /* Number of items in the nav bar */ 
  --navButtonGap: 0.5em; /* Spacing between buttons on the nav bar */
  --navButtonPadding: 0em; /* Padding inside the nav bar buttons */
  --navButtonTypeGap: 1; /* Gap between the navigation buttons (originally orange) and user management buttons (originally purple). Unit is integer multiples of navigation buttons (including gaps) */
  --navTopPadding: calc(62 * var(--vh, 1vh)); /* Gap above top-most nav button in mobile */
  --navBottomPadding: 4em; /* Gap below bottom-most nav button in mobile */
  --navButtonHeight: 2.5em; /* Set the height of all nav buttons (coloured area) */

  z-index: 9000; /* Set the z-index so these buttons appear in front of everything else (especially the icon) */
  grid-column: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  font-size: 1em;
}

.homeButtons .nav {
  transform: none;
  transition: none;
}

.homeButtons .nav ul {
  width: 100%;
  padding: 0;
  box-shadow: initial;
  padding-top: var(--navTopPadding);
  padding-bottom: var(--navBottomPadding);
  /* Set up a grid for the navigation buttons */
  display: grid;
  grid-template-columns: calc(6 * var(--vh, 1vh)) repeat(6, calc(5 * var(--vh, 1vh)));
  grid-template-rows: repeat(calc(var(--navOptions) + var(--navButtonTypeGap)), var(--navButtonHeight));
  gap: var(--navButtonGap);
}

.homeButtons .nav .shareButton {
  top: 0.75em;
  left: 0.75em;
  width: fit-content;
  height: fit-content;
}

.homeButtons .nav .shareButton:hover {
  cursor: pointer;
}

.homeButtons .nav .buttonNav a,
.homeButtons .nav .buttonEngage a,
.homeButtons .nav .buttonUser a,
.homeButtons .nav .buttonLogout a,
.homeButtons .nav .childButtonNav a {
  opacity: 1;
}

.homeButtons .buttonAdmin {
  grid-column: 6 / 8;
  grid-row: 5;
}

.homeButtons .buttonHomeSignup {
  grid-row: 2 / 4;
}

.homeButtons .buttonHomeSignup a {
  font-size: 1.2em;
}

.homeButtons .buttonHomeUser {
  grid-row: 4;
  grid-column: 2 / 6;
}

.homeButtons .forMe,
.homeButtons .forMyChild {
  grid-column: 6 / 8;
  display: none;
  z-index: 9999;
}

.homeButtons .forMe {
  grid-row: 2;
}

.homeButtons .forMyChild {
  grid-row: 3;
}

.homeButtons .forMe a,
.homeButtons .forMyChild a {
  font-size: 1em;
}

/*** Home background ***/

/* Positioning the icon for the background */
.backgroundStyle {
  position: fixed; /* Fix the position so that it shows separately to the body grid */
  width: 100vw;
  height: calc(100% - 2em);
  overflow: hidden; /* Hide the overflow so that the icon can be shifted off the page */
}

.backgroundStyleContent {
  position: absolute; /* Used to position the icon on the background */
  left: 2%;
  top: 2%;
}

.backgroundStyleWhimsy {
  position: absolute; /* Used to position the whimsy on the background */
  bottom: 2%;
}

/* Specific version of the icon for the homepage background */
.homeIconWrapper {
  /* Inputs */
  --iconWidth: calc(90 * var(--vh, 1vh));
  --color: rgba(255, 255, 255, 1);
  --background: rgba(255,164,0,0); /* Set alpha to 0 for transparent background */

  /* Calculated values */
  box-sizing: content-box; /* To remove the box-sizing: border-box; which will likely be applied to the root */
  background: var(--background);
  --diameterExt: calc(var(--iconWidth) * 0.32954 * 2);
  width: var(--iconWidth);
  height: calc(var(--iconWidth) * 0.86537);
  position: relative;
/*   padding: calc(var(--iconWidth) * 0.055728); */
}

/* Static icon */
.homeIcon,
.homeIcon::before {
  position: absolute;
  height: var(--diameterExt);
  width: var(--diameterExt);
  border-radius: 50%;
  box-shadow: 0px 0px 0px calc(var(--iconWidth) * 0.027257) var(--color) inset; 
  /* Box shadow used to make the entire border internal to the circle */
}

.homeIcon::before {
  content: '';
  transform: translateX(calc(0.34389 * var(--iconWidth))) translateY(calc(0.20628 * var(--iconWidth)));
}

/* Specific version of the whimsy for the homepage background */
.homeWhimsyWrapper {
  /* Inputs */
  --whimsyHeight: calc(3 * var(--vh, 1vh));
  --color: rgba(255, 255, 255, 1);
  --background: rgba(255,164,0,0); /* Set alpha to 0 for transparent background */
  
  /* Calculated values */
  box-sizing: content-box; /* To remove the box-sizing: border-box; which will likely be applied to the root */
  background: var(--background);
  width: calc(var(--whimsyHeight) * 0.80902);
  height: var(--whimsyHeight);
  position: relative;
  overflow: hidden;
  border: solid calc(var(--whimsyHeight) * 0.055728 * 2) var(--background); /* Used instead of padding so that overflow works */
}

/* Static whimsy */
.homeWhimsy,
.homeWhimsy::before,
.homeWhimsy::after {
  position: absolute;
  background-color: var(--color);
}

.homeWhimsy {
  height: var(--whimsyHeight);
  width: calc(var(--whimsyHeight) * 0.045085);
  transform: translateX(calc(-50% + (var(--whimsyHeight) * 0.80902 / 2)));
}

.homeWhimsy::before {
  content: '';
  height: calc(var(--whimsyHeight) * 0.045085);
  width: calc(var(--whimsyHeight) * 0.80902);
  transform: translateY(calc(-50% + (var(--whimsyHeight) * 0.39308))) translateX(-50%);
}

.homeWhimsy::after {
  content: '';
  width: calc(var(--whimsyHeight) * 00.44600);
  height: calc(var(--whimsyHeight) * 0.44600);
  background: rgba(0,0,0,0);
  border-bottom: solid calc(var(--whimsyHeight) * 0.045085) var(--color);
  border-left: solid calc(var(--whimsyHeight) * 0.045085) var(--color);
  transform-origin: bottom left;
  transform: translateX(calc(var(--whimsyHeight) * (0.045085 / 2))) translateY(calc(var(--whimsyHeight) * (0.39308 - 0.44600))) rotate(-45deg) skew(-14.098deg, -14.098deg);
}

/*** Home header and slogan ***/

/* Positioning the header within the background */
.homeHeader {
  position: relative;
  top: calc(-63 * var(--vh, 1vh));
  left: calc(20 * var(--vh, 1vh));
  font-size: 1.3em;
  font-weight: 400;
  color: var(--white);
}

.homeHeaderSpan {
  color: var(--blue1);
}

.homeSlogan {
  position: relative;
  top: calc(-49 * var(--vh, 1vh));
  left: calc(8 * var(--vh, 1vh));
  font-size: 0.65em;
  color: var(--blue1);
}

/*** Bag counter ***/
.bagCounter {
  --w: 0.5ch;   /* control the width for each number */
  --g: 1px;    /* control the gap between numbers */

  position: absolute;
  z-index: 9990;
  top: calc(0.25 * var(--vh, 1vh));
  right: calc(0.25 * var(--vh, 1vh));
  font-size: 0.65em;
  color: var(--orange1);
  background: var(--grey2Back2);
  letter-spacing: var(--w);
  mask: 
    repeating-linear-gradient(90deg,
        #000  0 calc(1ch + var(--w) - var(--g)), 
        #0000 0 calc(1ch + var(--w)))
    0/calc(100% - var(--w)/2) 100% no-repeat;
  padding-left: calc((var(--w) - var(--g))/2);
  margin-right: calc(var(--w)/-2);
  cursor: pointer;
}


/*  =================
    3. Sub-menu
    ================= */

/*** Create submenu in the same way that the home page nav bar is made ***/
.subMenu {
  --subMenuOptions: 7; /* Number of items in the sub menu */ 
  --subMenuButtonGap: 1em; /* Spacing between buttons on the nav bar */
  --subMenuButtonPadding: 0em; /* Padding inside the sub menu buttons */
  --subMenuButtonTypeGap: 1; /* Gap between the sub menu buttons (originally orange). Unit is integer multiples of sub menu buttons (including gaps) */
  --subMenuTopPadding: 4em; /* Gap above top-most sub menu button in mobile */
  --subMenuBottomPadding: 4em; /* Gap below bottom-most sub menu button in mobile */
  --subMenuButtonHeight: 2.5em; /* Set the height of all sub menu buttons (coloured area) */

  position: absolute;
  top: 0;
  width: 100%;
}

.subMenu ul {
  margin: 0;
  padding: 0;
  padding-top: var(--subMenuTopPadding);
  padding-bottom: var(--subMenuBottomPadding);
  list-style: none;
  /* Set up a grid for the sub menu buttons */
  display: grid;
  grid-template-columns: 0.1fr 0.15fr 5fr 0.1fr;
  grid-template-rows: repeat(calc(var(--subMenuOptions) + var(--subMenuButtonTypeGap)), var(--subMenuButtonHeight));
  gap: var(--subMenuButtonGap); /* For both row-gap and column-gap */
}

.subMenu .menuHeader {
  grid-column: 2 / 4;
  color: var(--orange2);
  margin-top: auto;
  margin-bottom: auto;
}

.subMenu .buttonRow {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 2em 1fr 1fr 1fr;
  gap: var(--subMenuButtonGap); /* For both row-gap and column-gap */
}

.subMenu .buttonRow .info {
  grid-column: 1;
  /* create a blue circle with white text */
  margin: auto;
  color: var(--white);
  background-color: var(--blue2);
  border-radius: 50%;
  height: 1.25em;
  width: 1.25em;
  /* center the text within it */
  display: flex;
  align-items: center;
  justify-content: center;
}

.subMenu .buttonRow .info a {
  color: var(--white);
  text-decoration: none;
}

.subMenu .buttonRow .buttonNav,
.subMenu .buttonRow .childButtonNav,
.subMenu .buttonRow .buttonNavGraph {
  padding: var(--subMenuButtonPadding);
  background: var(--orange1);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
  grid-column: 2 / 4;
}

/* buttonNavLinked are the for where there is a button with an icon button to the right hand side e.g. "view items", with "add item" to the right */
.subMenu .buttonRow .buttonNavLinked {
  padding: var(--subMenuButtonPadding);
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  grid-column: 2 / 4;
  /* now set the grid for the items inside of it */
  display: grid;
  grid-template-columns: 1fr 2.5em;
}

.subMenu .buttonNavLinked .childButtonNav {
  box-shadow: none;
  grid-column: auto;
}

.subMenu .buttonNavLinked .childButtonNav img {
  height: 0.75em;
}

.subMenu .buttonNavLinked > .childButtonNav:nth-child(2) {
  background-color: var(--blue1);
  border-left: solid 1px var(--grey1); /* line separating the two linked buttons */
}

.subMenu .buttonNavLinked > .childButtonNav:nth-child(2):hover {
  background-color: var(--blue2);
}

.subMenu .buttonNav a,
.subMenu .childButtonNav a,
.subMenu .buttonNavGraph a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  color: var(--black);
  text-decoration: none;
}

.subMenu .buttonNav:hover,
.subMenu .childButtonNav:hover {
  background: var(--orange2);
}

.subMenu .buttonRow .buttonNavGraph {
  grid-column: 4;
  background: var(--orange2);
  font-size: 0.75em;
}

.subMenu .buttonNavGraph:hover {
  background: var(--orange1);
}

.subMenu .buttonRow .buttonNavDisabled {
  background-color: var(--grey2);
}

.subMenu .buttonRow .buttonNavDisabled a {
  cursor: not-allowed;
}

.subMenu .buttonRow .buttonNavDisabled:hover {
  background-color: var(--grey2);
}


/*  =================
    4. Typography
    ================= */

/* Need to set the body height to be able to use it for the body too */
html {
  height: 100%;
}

/* Basing the view on a single screen, using a grid to make borders */
body {
  margin: 0px;
  background: var(--grey1);
  color: var(--grey3);
  font-weight: 400;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100); /* running JavaScript to calcualte --vh */
  height: 100%;
  display: grid;
  grid-template-rows: 2em 1fr 20fr 2em;
  grid-template-columns: 1em 1fr 1em;
  font-size: calc(2 * var(--vh, 1vh));
}

/*** Heading always goes at the top of the page in the same place ***/
h2 {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  font-size: 1.5em;
}

/*** Content goes in the middle of the page ***/
.content,
.contentLoader {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  align-items: center;
  flex-direction: column;
  font-size: 1em;
  position: relative;
}

.content .textScroll {
  height: calc(75 * var(--vh, 1vh));
  margin-top: 2em;
  padding: 0.4em;
  overflow-y: scroll;
  background-color: rgba(255, 255, 255, 0.05);
}

.content .highlight {
  color: var(--blue1);
}

a {
  color: var(--blue2);
}

.contentText {
  font-size: 1.5em;
  padding-top: 2em;
  padding-bottom: 2em;
}

.contentTextHelp {
  font-size: 1em;
  padding: 1em;
  margin-bottom: 2em;
  margin-left: 0.5em;
  margin-right: 0.5em;
  background-color: var(--grey2Back);
  position: relative;
}

.contentTextHelp::after {
  content: "?";
  position: absolute;
  background-color: var(--blue2);
  color: var(--white);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  top: -0.5em;
  left: -0.5em;
}

.contentTextMinor {
  font-size: 1.25em;
  padding-top: 2em;
  padding-bottom: 2em;
}

.contentText span,
.contentTextMinor span,
.contentTextHelp span {
  color: var(--blue1);
}

.contentTextChallengeDetail {
  font-size: 0.8em;
  text-align: center;
}

.contentTextChallengeDetail span {
  color: var(--blue1);
  font-size: 1.5em;
  font-weight: bold;
}

.contentTextChallengeDetail a {
  color: var(--blue2);
  font-size: 1.4em;
}

.contentTeamHeaderWrapper {
  margin-right: auto;
  padding-bottom: 1em;
  display: flex;
  flex-direction: column;
}

.contentTeamHeader {
  font-size: 1.25em;
  display: flex;
}

.contentTeamSubHeader {
  padding-top: 0.5em;
  color: var(--blue1);
  font-size: 0.8em;
}

.contentTeamSubHeader img {
  filter: invert(61%) sepia(74%) saturate(7409%) hue-rotate(172deg) brightness(92%) contrast(101%);
  height: 1em;
  padding-right: 1em;
}

.content .link {
  padding-top: 4em;
  padding-left: 4em;
  padding-right: 4em;
  font-size: 0.75em;
  color: var(--blue2);
  word-break: break-all;
}

.content .contentImage {
  height: calc(40 * var(--vh, 1vh));
}

/* QR code formatting */
.content .qrWrapper {
  --qrWrapperHeight: calc(35 * var(--vh, 1vh));
  max-height: var(--qrWrapperHeight);
  margin-top: 1em;
  position: relative;
}

.content .qrWrapper .qrcode {
  width: 100%;
  height: 100%;
}

.content .qrWrapper .iconWrapper {
  position: relative;
  top: -50%;
  margin-left: auto;
  margin-right: auto;
  --iconWidth: calc(var(--qrWrapperHeight) * 0.25);
  --background: var(--orange1);
  --color: var(--grey1);
  transform: translate(0, -50%);
}

.content .teamShareButton,
.content .joinButton {
  margin-top: 2em;
}

.content .teamShareButton:hover,
.content .joinButton:hover {
  cursor: pointer;
}

.content .teamShareButton img,
.content .joinButton img {
  filter: invert(81%) sepia(0%) saturate(1%) hue-rotate(226deg) brightness(97%) contrast(102%);
}

/* Graph formatting */
.content .graphPage {
  display: grid;
  height: 100%;
  grid-template-rows: auto auto 1fr auto 3fr auto 1fr;
  grid-template-columns: 1fr;
  font-size: 1.25em;
}

.content .graphPage .title {
  padding-top: 1em;
  grid-row: 1;
}

.content .graphPage .title .formTitle {
  display: flex;
  max-width: 100vw; /* Set your desired maximum width */
}

.content .graphPage .title .formTitle .formLabel {
  color: var(--grey2);
  display: flex;
  align-items: center;
  padding-left: 1em;
  margin-bottom: 0.5em;
  white-space: nowrap;
}

.content .graphPage .title .formTitle select {
  font-size: 1.25em;
  background-color: transparent;
  font-family: inherit;
  color: var(--grey3);
  padding-left: 0.5em;
  padding-right: 0.5em;
  border-color: var(--grey3);
  margin-bottom: 0.5em;
  width: 100%; /* Sets the width to the maximum available */
  overflow: hidden; /* Ensures content is cut off */
  text-overflow: ellipsis; /* Optional: Adds ellipsis if text is cut off */
  white-space: nowrap; /* Prevents text from wrapping */
}

/* change the font size for the text starting with " (date" - this doesn't work in Chrome!*/
.content .graphPage .title .formTitle option[value^=" (date"] {
  font-size: 0.8em; /* Adjust the font size as needed */
}

/* This is specifically formatting the team name */
.content .graphPage .title .formTitle:nth-child(2) {
  font-size: 0.75em;
}

/* This is specifically formatting the competition drop-down */
.content .graphPage .title .formTitle:nth-child(3) {
  font-size: 0.7em;
}

.content .graphPage .title .formTitle option {
  background-color: var(--grey1);
  /* font-size: 0.3em; */
}

.content .graphPage .graph {
  grid-row: 2;
  max-width: 100%;
  max-height: calc(50 * var(--vh, 1vh)); /* This allows the page to be responsive on tablet resolutions */
  padding-top: 1em;
}

.content .graphPage .graphTableWrapper {
  grid-row: 4;
  padding-top: 2rem;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75em;
}

.content .graphPage .graphTableWrapper .graphTable th,
.content .graphPage .graphTableWrapper .graphTable td {
  padding-left: 2rem;
  padding-right: 2rem;
}

.bad {
  background-color: var(--orange2);
  opacity: 0.75;
  color: var(--white);
}

.good {
  background-color: var(--blue2);
  opacity: 0.75;
  color: var(--white);
}

.content .graphPage .graphButtonWrapper {
  grid-row: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Formatting for chart.js graphs */
.content .graphPage canvas {
  max-width: 100%;
  display: block;
  margin: 20px auto;
}

.content .graphPage .legendContainer {
  max-width: 800px;
  margin: 0 auto;
  padding: 0.25em;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  font-size: 0.75em;
  background-color: var(--grey2Back3);
  border-radius: 0.25em;
}

.content .graphPage .legendItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2em;
  padding-left: 0.25em;
  padding-right: 0.25em;
  border: 1px solid var(--grey2Back2);
  cursor: pointer;
  background-color: var(--grey2Back3);
  user-select: none; /* Prevents the text from being selected when clicking on it */
}

.content .graphPage .legendItem.active {
  background-color: var(--grey1);
}

.content .graphPage .legendItem.hovered {
  background-color: var(--grey1);
}

.content .graphPage .legendLabel {
  display: flex;
  align-items: center;
  padding-right: 2em;
}

.content .graphPage .legendColorBox {
  width: 1rem;
  height: 2px;
  outline: 1px solid var(--grey);
  margin-right: 0.5em;
}

.content .graphPage .legendButtonExclude,
.content .graphPage .legendButtonInclude {
  padding: 0.25em;
  font-size: 0.75em;
  background: var(--orange2);
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--black);
  text-decoration: none;
  display: inline-block;
}

.content .graphPage .legendButtonExclude:hover {
  background: var(--orange1);
}

.content .graphPage .legendButtonInclude {
  background: var(--blue2);
}

.content .graphPage .legendButtonInclude:hover {
  background: var(--blue1);
}

/* Basic table formatting */
.tableWrapper {
  width: 100%;
}

table {
  width: 100%;
  overflow-x: scroll;
  border-collapse: collapse;
  text-align: center;
  vertical-align: middle;
  margin-top: 1.5em;
}

.tableDescription {
  text-align: left;
  padding-bottom: 0.5em;
  color: var(--blue1);
  font-weight: bolder;
}

th,
td {
  border: 1px solid;
  border-color: var(--grey3);
  padding: 0.2em;
}

.minor {
  font-size: 0.8em;
}

.outOfTarget {
  color: var(--grey2);
}

.leaderboardUser {
  color: var(--orange1);
}

.teamMemberCount {
  background-color: var(--purple);
  width: fit-content;
  height: fit-content;
  display: flex;
  margin-left: 1em;
}

.teamMemberCount img {
  filter: invert(91%) sepia(1%) saturate(0%) hue-rotate(15deg) brightness(90%) contrast(92%);
  height: 1em;
}

.teamMemberCount .count {
  font-size: 0.75em;
  color: var(--grey3);
}

th {
  height: 2em;
  color: var(--blue2);
}

tr {
  height: 1.75em;
}

table .hiddenCell {
  border: none;
}

/* Tooltips within tables */
.tableTooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tableTooltip .tableTooltipText {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 75%;
  padding: 0.25em;
  background-color: var(--grey2);
  color: var(--white);
  font-size: 0.7em;
  width: 100%;
  max-width: 50vw;
}

.tableTooltip:hover .tableTooltipText {
  visibility: visible;
  opacity: 1;
}

/* If buttons are going to be in a column, apply this format to remove borders etc */
.columnButton {
  border: 0px;
  width: 1px; /* Just set very small so that it is only as large as the button within it */
  position: relative;
}

.buttonContent {
  font-family : inherit;
  text-decoration: none;
  color: var(--black);
  font-size: 0.75em;
  padding: 0.25em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  margin-left: 0.75em; /* Gap between table and buttons */
  background: var(--orange1);
  box-shadow: 0 1px 1px 0 rgba(0,0,0,0.4);
  border: none;
  cursor: pointer; /* Mouse pointer on hover */
  display: flex;
  align-items: center;
}

.buttonContent:hover {
  background: var(--orange2);
}

.deleteButtonContent {
  color: var(--grey1);
  background: var(--orange2);
}

.deleteButtonContent:hover {
  background: var(--orange1);
}

.userButtonContent {
  color: var(--grey3);
  background: var(--purple);
}

.userButtonContent:hover {
  color: var(--grey3);
  background: var(--blue2);
}

.exportButtonContent,
.deleteAccountButtonContent {
  color: var(--black);
  background: var(--grey2);
  margin: 0;
}

.deleteAccountButtonContent {
  background: var(--orange2);
}

.exportButtonContent:hover,
.deleteAccountButtonContent:hover {
  background: var(--orange1);
}


/* Prize table formatting */
.tablePrize {
  text-align: left;
  border-left: var(--blue1);
  padding-bottom: 1em;
}

.prizeDecoration {
  border: none;
  border-right: solid 2px var(--blue1);
}

.prizeName {
  font-size: 1.25em;
  padding-left: 3vw;
}

.prizeMinor {
  font-size: 0.8em;
  color: var(--grey2);
  padding-left: 3vw;
}

.prizeValue {
  text-align: right;
  color: var(--orange1);
}

.tableTeams tr {
  height: 3em;
}

.tooltipPrizeDouble {
  position: relative;
  background-color: var(--orange2);
  color: var(--black);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.25em;
  float: right;
}

.tooltipPrizeDouble::after {
  content: "x2";
  font-size: 0.75em;
}

.tooltipPrizeDouble:hover > .formHelp {
  visibility: visible;
  height: auto;
}

.tooltipPrizeDouble .formHelp {
  border-color: var(--orange2);
  color: var(--orange1);
  width: 20em;
  left: initial;
  right: 0;
  transform: translateX(0.75em);
}


/*** Login status always goes at the bottom of the page ***/
.userInfo {
  grid-column: 2;
  grid-row: 4;
  display: flex;
  align-items: center;
  justify-content: right;
  font-size: 0.6em;
}


/*  =================
  5. Pagination and search
    ================= */

/*** Djangos built in pagination is formatted here ***/
.pagination {
  position: absolute;
  bottom: 0;
  padding-top: 2em;
  padding-bottom: 1em;
}

.pagination .step-links {
  font-size: 0.8em;
}

.pagination .step-links a {
  color: var(--blue2);
}

.search {
  left: 0;
  width: 100%;
  display: inline-flex;
}

.search input,
.search button {
  font-family: inherit;
  font-size: 0.8em;
}

.search input,
.search input::placeholder {
  background-color: var(--grey2);
  color: var(--grey3);
}

.search button {
  margin-left: 0.5em;
  background-color: var(--orange2Back);
  border: none;
}

.search .showAll {
  margin-left: auto;
  background-color: var(--orange2Back);
  font-size: 0.5em;
}


/*  =================
    6. Messages
    ================= */

/*** Djangos built in messages are formatted here, as toasts. Box fades in and out again, with progress bar ***/
.messagesWrapper,
.messagesWrapperHome {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 1em;
  animation: hideMe 5s forwards; /* Keyframes defined below */
  animation-timing-function: linear;
}
@keyframes hideMe{
  0%{
      opacity: 0.5; /* Fade in */
      top: 0;
  }
  10%{
      opacity: 1;
      top: 0;
}
  90%{
      opacity: 1;
      top: 0;
  }
  99%{
      opacity: 0; /* Fade out */
      top: 0;
  }
  100%{
    opacity: 0;
    top: -9999px; /* Move the wrapper off the page so that it doesn't cover anything else up, even when faded out */
}
}

.messagesWrapper .messages {
  position: relative;
}

/* Here is where the textbox is generically formatted. Message type colour schemes added below */
.messagesWrapper .alert {
  position: relative; /* Set to relative so the progress bar can be positioned */
  padding: 0.4em;
  font-size: 0.75em;
}

/* After element is for the progress bar. Message type colour schemes also added below */
.alert::after {
  display: block;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 10%;
  width:100%;
  background-color: var(--blue2);
  animation: progressMe 4.5s forwards;
  animation-timing-function: linear;
}
@keyframes progressMe{
  0%{
      width: 0;
  }
  100%{
      width: 100%;
  }
}

.messagesWrapper .alert-success {
  background-color: var(--blue1);
  color: var(--grey1);
}

.messagesWrapper .alert-success::after {
  background-color: var(--blue2); /* Progress bar colour */
}

.messagesWrapper .alert-error,
.messagesWrapper .alert-danger {
  background-color: var(--orange2);
  color: var(--grey1);
}

.messagesWrapper .alert-error::after,
.messagesWrapper .alert-danger::after {
  background-color: var(--grey1); /* Progress bar colour */
}


/*  =================
    7. Popups
    ================= */
.popupBackground {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--grey2Back);
  content: "";
  display: none;
  z-index: 9995;
}

.popup {
  position: absolute;
  background-color: var(--grey1);
  width: 80%;
  max-width: 750px;
  height: max-content;
  max-height: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  box-shadow: 2px 2px 5px var(--grey1);
  padding: 1em;
  display: none;
  z-index: 9999;
}
.popupNotification {
  top: 35%;
}

.popupCloseButtonWrapper {
  margin-left: auto;
  width: fit-content;
}

.popupCloseButtonContent {
  font-size: 1em;
  color: var(--black);
  background: var(--orange2);
  margin-bottom: 1em;
}

.popupCloseButtonContent img {
  height: 0.75em;
  filter: initial;
}

.popupTitle,
.popupText {
  font-size: 1em;
  margin-bottom: 1em;
  height: max-content;
}

.popupTitle span,
.popupText span {
  color: var(--blue1);
}

.popupTextScroll {
  margin-top: 0.5em;
  padding: 0.4em;
  background-color: rgba(255, 255, 255, 0.05);
  overflow-y: scroll;
  font-size: 0.9em;
}

.popupTextScrollSmooth {
  scroll-behavior: smooth;
}

.popupTextScrollSmooth li {
  padding-top: 1.5em;
}

.popupTextScroll ul {
  padding-left: 1em;
}

.textScroll span,
.popupTextScroll span {
  color: var(--grey2);
}

.textScroll .link,
.popupTextScroll .link {
  color: var(--blue1);
}

/* For popup used in dsr for data validation */
.popup .popupContent {
  height: auto;
}

.popup img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-height: 50vh;
}

.popup .buttonWrapper {
  padding-top: 3em;
}

.popup .buttonWrapper .formButton {
  padding: 0.5em;
  min-width: 10em;
  width: fit-content;
  font-size: 1.25em;
  font-family: inherit;
  background-color: var(--purple);
  color: var(--grey3);
  border-width: 0;
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
}


/*  =================
    8. Forms
    ================= */

/*** General form formatting ***/

/* This general form section is for .form, however other form types may be included for simplicity */

.form {
  /* General variables */
  grid-column: 2;
  grid-row: 3;
  display: grid;
  /* The overall form is created using a set number of rows in a grid. Later, all form items will be added to a single row, using flexbox */
  grid-template-rows: 0.5fr minmax(3em, auto) 1fr minmax(3em, auto) 1.5fr minmax(3em, auto) 1fr;
  /* There are grid columns in the margin to set the max width of the fields */
  grid-template-columns: 1fr 50fr 50fr 1fr;
  font-size: 1em;
  position: relative;
}

.largeForm {
  grid-template-rows: 0.25fr minmax(3em, auto) 0.5fr minmax(3em, auto) 1fr;
  font-size: 0.9em;
}

.form .contentWrapper {
  grid-row: 2;
  grid-column: 2 / 4;
  display: flex;
  flex-direction: column;
}

.form .contentWrapper .formInfo {
  font-size: 1.25em;
}

.form .contentWrapper .formTable {
  padding-bottom: 2em;
}

.form .formText {
  padding-bottom: 2em;
}

.form .formTextHelp {
  font-size: 1em;
  padding: 1em;
  margin-bottom: 2em;
  margin-left: 0.5em;
  margin-right: 0.5em;
  background-color: var(--grey2Back);
  position: relative;
}

.formTextHelp::after {
  content: "?";
  position: absolute;
  background-color: var(--blue2);
  color: var(--white);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  top: -0.5em;
  left: -0.5em;
}

.form .formText span,
.form .formTextHelp span {
  color: var(--blue1);
}

.form .formText a {
  color: var(--blue1);
}

.formExtraInfo {
  grid-row: 2;
  grid-column: 2 / 4;
  padding-bottom: 2em;
}

.form .formContext {
  grid-row: 2;
  grid-column: 2 / 4;
  display: flex;
  flex-direction: column;
}

.form .formContext .text {
  font-size: 1.25em;
  padding-top: 2em;
  padding-bottom: 2em;
}

.form .formItems {
  display: grid;
  grid-template-columns: 1fr 1.5em 1fr;
  grid-auto-rows: auto;
  grid-auto-flow: row;
}

/* Field groups can be used to contain formItems */
.form .fieldGroups {
  grid-column: 1 / 4;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  margin-bottom: 1em;
}

.form .fieldGroups .fieldGroupName {
  grid-column: 1 / 4;
  margin-bottom: 1em;
  color: var(--orange2);
  justify-self: center;
}

/* We can separate the field groups with a line */
.form .fieldGroups .fieldGroupSeparator {
  grid-column: 1 / 4;
  width: 60%;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-bottom: solid 0px var(--orange2);
}

/* And need ot remove the last line so there isn't extra space at the bottom */
.fieldGroupSeparator:nth-last-child(1 of .fieldGroupSeparator) {
  display: none;
}

.form .fieldGroups .fieldGroup1,
.form .fieldGroups .fieldGroup2,
.form .fieldGroups .fieldGroup3,
.form .fieldGroups .fieldGroup4 {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.5em 1fr;
  grid-auto-rows: auto;
  grid-auto-flow: row;
  display: relative;
}

.form .formItem {
  grid-column: 1 / 4;
  padding-bottom: 2em;
}

.form .fieldGroups .formItem {
  padding-bottom: 1em;
}

.form .formItemLeft {
  grid-column: 1;
}

.form .formItemRight {
  grid-column: 3;
}

.form .formItem .formError {
  padding-left: 2em;
  font-size: 0.8em;
  color: var(--orange2);
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.form .formItem .formError ul {
  list-style-type: none;
  padding-left: 0.1em;
}

.form .formItem label {
  font-size: 1.25em;
}

.form .formItemRight label,
.form .formItemLeft label {
  font-size: 1em;
}

.form .formItemTarget label {
  color: var(--grey2);
}

/* Fields will show as white background when autofilled - fought with webikit-autofill for a while, but it doesn't appear to be overwritable */
.form .formItem input,
.form .formItem select,
.form .formItem .formattedInput {
  margin-top: 0.25em;
  /* The following font sizes are being used to set the font size so that mobile browsers don't zoom in when you click on a field */
  font-size: 16px; /* Browsers that do not support "MIN () - MAX ()" and "Clamp ()" functions will take this value.*/
  font-size: max(1em, 16px); /* Browsers that do not support the "clamp ()" function will take this value. */
  font-size: clamp(16px, 1em, 1em);
  font-family: inherit;
  padding: 0.5em;
  background-color: var(--orange1);
  width: 100%;
}

.form .formItem input:disabled, 
.form .formItem select:disabled {
  background-color: var(--grey2Back2);
  color: var(--grey3);
}

.form .formItem input:disabled:hover,
.form .formItem select:disabled:hover {
  cursor: not-allowed;
}

.form .formItem .formPhotoInput {
  margin-top: 0em;
  margin-bottom: 1em;
}

.form .formItem .formPhotoInput input {
  background-color: initial;
}

.form .formItem .formPhotoInput span{
  padding-left: 10em;
}

.form .formItem input[type='file' i] {
  font-size: 0.9em;
  background-color: var(--grey1);
  border: var(--orange1) 1px solid;
}

.form .formItem input[type='file' i]::file-selector-button {
  font-family: inherit;
  margin-right: 1em;
}

/* Styling for drag and drop file upload */
.drop-zone {
  border: 1px dashed var(--grey3);
  border-radius: 2px;
  padding: 0.5em;
  text-align: center;
  font-size: 0.75em;
  color: var(--grey2);
  cursor: pointer;
  margin-bottom: 10px;
  transition: background-color 0.3s, color 0.3s;
}

.drop-zone.dragover {
  background-color: var(--grey2);
  color: var(--grey3);
}

/* Styles for my custom file upload buttons and preview */
.imageInputButtons {
  display: grid;
  grid-template-columns: min-content min-content 1fr;
  grid-template-rows: min-content min-content;
  margin-top: 0.25em;
}

.imageInputButtons .bagPhotoPreview {
  grid-row: 3;
  grid-column: 1 / 4;
  justify-self: center;
  margin-top: 0.5em;
  padding-left: 1.25em; /* Accounting for the close button, centering the image on the page */
  display: flex;
}

.imageInputButtons .bagPhotoPreview img {
  height: 150px;
  max-width: 80vw;
}

.imageInputButtons .bagPhotoPreview button {
  width: 1.25em;
  height: max-content;
  background-color: var(--orange2Back);
  margin-left: 0.25em;
  padding-left: 0.25em;
  padding-right: 0.25em;
}

.form .formItemTarget input {
  /* The following font sizes are being used to set the font size so that mobile browsers don't zoom in when you click on a field */
  font-size: 16px; /* Browsers that do not support "MIN () - MAX ()" and "Clamp ()" functions will take this value.*/
  font-size: max(0.8em, 16px); /* Browsers that do not support the "clamp ()" function will take this value. */
  font-size: clamp(16px, 0.8em, 0.8em);
  background-color: var(--orange1);
}

/* Fomatting the date of birth dropdown lists onto a single line */
.form .formDOBcontainer {
  display: flex;
  gap: 0.25em;
}

/* Fomatting the checkbox for Privacy policy / T&Cs */
.form .formItemTandC {
  width: 95%;
}

.form .formItemTandC .formInputTandC {
  display: flex;
  flex-direction: row;
}

.form .formInputTandC input[type=checkbox] {
  width: 2em;
}

.form .formItemTandC .formInputTandC .formHelpTandC {
  font-size: 0.7em;
}

.form .formItemTandC .formInputTandC .formHelpTandC a {
  color: var(--blue2);
}

.form input[type=checkbox] {
  height: 1em;
  margin: 0.75em;
  accent-color: var(--orange1);
  background-color: var(--orange1);
}

/* Formatting the parent div, if the input type is checkbox */
.formInput:has(input[type=checkbox]) {
  display: flex;
  height: 100%;
  align-items: center;
  flex-direction: column;
}

.form .fieldGroups .formItem:has(input[type=checkbox]) {
  padding-bottom: 0em;
}

.form .formItem option {
  background-color: var(--orange1);
  /* font-size: 0.4em; */
}

.form .formItem .formLabel {
  white-space: nowrap;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: min-content auto;
  display: flex;
  align-items: center;
}

.tooltip,
.tooltipCompetition,
.tooltipGeneric {
  position: relative;
  background-color: var(--blue2);
  color: var(--white);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 1em;
}

.tooltipGeneric {
  background-color: var(--grey2);
  font-size: 0.75em;
  align-self: center;
}

.tooltip img,
.tooltipCompetition img,
.tooltipGeneric img {
  height: 0.65em;
  filter: invert(98%) sepia(2%) saturate(0%) hue-rotate(231deg) brightness(103%) contrast(103%);
}

.tooltip::after {
  content: "i";
}

.tooltipCompetition::after,
.tooltipGeneric::after {
  content: "";
}

.tooltip:hover > .formHelp,
.tooltipCompetition:hover > .formHelp,
.tooltipGeneric:hover > .formHelp {
  visibility: visible;
  height: auto;
}

.formHelp {
  white-space: initial;
  z-index: 9999;
  position: absolute;
  width: 15em;
  font-size: 0.8em;
  color: var(--blue1);
  background-color: var(--grey1);
  padding: 1em;
  border: solid 1px var(--blue1);
  bottom: 1.25em;
  visibility: hidden;
  height: 0;
  left: initial;
  right: 0;
  transform: translateX(6.5em);
}

.formItemLeft .formHelp {
  right: initial;
  left: 0;
  transform: translateX(-1.5em);
}

.formItemRight .formHelp {
  left: initial;
  right: 0;
  transform: translateX(1.5em);
}

.formHelp ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.formHelp span {
  color: var(--orange1);
}

.topButtons,
.bottomButtons {
  display: flex;
  flex-direction: column;
  padding: 2em;
}

.buttonWrapper,
.buttonWrapperLinked {
  grid-row: 4;
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.buttonWrapperLinked {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.buttonWrapperLinked .buttonWrapper {
  grid-row: initial;
  grid-column: initial;
}

.nav .buttonWrapperLinked .childButtonNav {
  box-shadow: none;
  grid-column: auto;
}

.buttonWrapperLinked .buttonWrapper img {
  height: 0.75em;
}

.buttonWrapperLinked > .buttonWrapper:nth-child(2) .button {
  background-color: var(--blue1);
  border-left: solid 1px var(--grey1); /* line separating the two linked buttons */
}

.buttonWrapperLinked > .buttonWrapper:nth-child(2) .button:hover {
  background-color: var(--blue2);
}

.buttonWrapper .button {
  padding: 0.5em;
  min-width: 10em;
  width: fit-content;
  font-size: 1em;
  font-family: inherit;
  background-color: var(--orange1);
  color: var(--grey1);
  border-width: 0;
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  text-decoration: none;
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
  margin-bottom: 1em;
}

.buttonWrapper .memberButton {
  background-color: var(--purple);
  color: var(--grey3);
}

.form .formButton {
  padding: 0.5em;
  min-width: 10em;
  width: fit-content;
  font-size: 1.25em;
  font-family: inherit;
  background-color: var(--purple);
  color: var(--grey3);
  border-width: 0;
  box-shadow: 0 1px 5px 0 rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* Without this, any wrapped text will not align */
  cursor: pointer; /* Sets the cursor to be a pointer for the entire button, not just the text */
}

.form .formButton:hover {
  background-color: var(--blue2);
}

.editBagDeleteButtonWrapper {
  grid-row: 5;
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exportButtonWrapper {
  position: absolute;
  bottom: 0em;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: left;
}

.form .fieldGroups .burnChartButtonWrapper {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  margin-top: auto;
  justify-content: center;
}

.form .fieldGroups .burnRateChartButtonWrapper {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  margin-top: auto;
  margin-bottom: auto;
  justify-content: center;
}


.form .photoWrapper {
  grid-column: 1 / 4;
  display: flex;
  justify-content: center;
  color: var(--grey2);
}

/* Login specific form information */
.form .loginHelp {
  grid-row: 6;
  grid-column: 2 / 4;
}

.form .loginHelp a {
  color: var(--blue1);
  font-size: 1em;
}

/* Sign up specific form information */
.form .formItemSignup {
  padding-bottom: 1.5em;
}

.form .formItemSignup:nth-child(4) {
  margin-top: 1.5em;
  padding-bottom: 1em;
}

.form .childSignupInfo {
  grid-row: 6;
  grid-column: 2 / 4;
  padding-top: 1em;
  font-size: 0.8em;
}


/*  =================
    9. Loading screen
    ================= */

/* Loading icon */

.iconLoadingWrapper {
  /* Inputs */
  --iconWidth: calc(20 * var(--vh, 1vh));
  --color: var(--white);
  --background: rgba(255,164,0,0); /* Set alpha to 0 for transparent background */

  /* Calculated values */
  box-sizing: content-box; /* To remove the box-sizing: border-box; which will likely be applied to the root */
  background: var(--background);
  --diameterInt: calc(var(--iconWidth) * 0.30228 * 2);
  width: var(--iconWidth);
  height: calc(var(--iconWidth) * 0.86537);
  position: relative;
  padding: calc(var(--iconWidth) * 0.055728);
  padding-top: 10em;
}

.iconLoadingWrapperPopup {
  padding-top: 4em;
  padding-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
}

.iconLoading,
.iconLoading::after {    
    position: absolute;
    height: var(--diameterInt);
    width: var(--diameterInt);
    border-radius: 50%;
    border: calc(var(--iconWidth) * 0.027257) solid var(--color);
    /* box-shadow: 0px 0px 0px calc(var(--iconWidth) * 0.027257) var(--color) inset; */
    /* Box shadow used to make the entire border internal to the circle */
}

.iconLoading::after {
    content: '';
    border: rgba(0,0,0,0) calc(var(--iconWidth) * 0.027257) solid;
    border-left: var(--color) calc(var(--iconWidth) * 0.027257) solid;
    animation: loading 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes loading {
    0% { transform: translateX(calc(0.34389 * var(--iconWidth) - var(--iconWidth) * 0.027257)) translateY(calc(0.20628 * var(--iconWidth) - var(--iconWidth) * 0.027257)) rotate(31deg); }
    100% { transform: translateX(calc(0.34389 * var(--iconWidth) - var(--iconWidth) * 0.027257)) translateY(calc(0.20628 * var(--iconWidth) - var(--iconWidth) * 0.027257)) rotate(391deg); }
  }

.iconLoadingHidden {
  opacity: 0;
  visibility: hidden;
}


/*  =================
    10. Desktop media changes
    ================= */

@media screen and (min-width: 1000px) {

/*** 1. Desktop nav bar changes ***/

  body {
    grid-template-rows: 4em 1fr 20fr 2em; /* This sets the body grid so that the top row matches the nav bar height (4em) */
  }

  .backButton {
    display: none;
  }

  .nav-toggle-label {
    display: none;
  }

  .header {
    width: 100%;
    opacity: 1;
    font-size: 16px; /* Consistent font size above a certain screen width */
  }

  .header .navBackground {
    display: none;
  }

  .header .nav {
    height: 4em;
    transform: none;
    transition: none;
    display: flex;
    align-items: center;
  }

  .header .nav ul {
    width: 100%;
    padding: 0;
    box-shadow: initial;
    padding-left: var(--navLeftPadding);
    padding-right: var(--navRightPadding);
    /* Set up a grid for the navigation buttons */
    display: grid;
    grid-template-rows: 2.5em;
    grid-template-columns: repeat(calc(var(--navOptions) + var(--navButtonTypeGap)), minmax(0, 1fr));
  }

  .nav .buttonNav a,
  .nav .buttonEngage a,
  .nav .buttonNavLinked a {
    opacity: 1; /* This is to stop an issue with switching between desktop and mobile, and the button labels being opacity 0 if you get it at the wrong time! */
  }

  /* Reposition hidden home button, for use during testing, to the top */
  .header .nav .hiddenButtonNav {
    top: 0.5em;
  }

  /* Hide the share button in desktop, they can copy the url easily! */
  .header .nav .shareButton {
    display: none;
  }

  /* Reposition the information links */
  .header .nav .privacyButton,
  .header .nav .tAndCButton,
  .header .nav .childAccountInfo {
    position: absolute;
    top: 1em;
    left: initial;
    right: 1.5em;
    margin-left: initial;
    margin-right: initial;
    width: initial;
    font-size: 0.5em;
  }

  .header .nav .tAndCButton {
    top: 2.75em;
  }

  .header .nav .childAccountInfo {
    top: 4.5em;
  }

  /* Navigation items are split into navigation buttons (move around the tool) and user buttons (managing the user). The grid is used to display them differently. */
  .header .nav .buttonNav,
  .header .nav .buttonEngage,
  .header .nav .buttonNavLinked {
    grid-column: initial; 
    grid-row: 1;
  }S

  .header .nav .buttonNav a {
    opacity: 1;
  }

  /* Navigation items are split into navigation buttons (move around the tool) and user navigation (managing the user). The grid is used to display them differently. */
  .header .nav .buttonUser,
  .header .nav .buttonLogout {
    border-top: initial;
    grid-column: calc(var(--navOptions) + var(--navButtonTypeGap) - 1);
    grid-row: 1;
  }

  .header .nav .buttonLogout {
    grid-column: calc(var(--navOptions) + var(--navButtonTypeGap));
  }

  .header .nav .buttonUser a,
  .header .nav .buttonLogout a {
    opacity: 1;
  }

/*** 2. Desktop homepage changes ***/

  .backgroundStyle .backgroundStyleContent {
    left: 50%;
    transform: translate(-50%, 0); /* Change the properties to bump the home background icon to the center of the screen */
  }

  .homeButtons .nav ul {
    grid-template-columns: 1fr repeat(6, calc(5 * var(--vh, 1vh))) 380px 1fr; /* Change first and last columns to centre, then add a penultimate column to bump the buttons to the right spot on the screen */
  }

  /* Reposition the total bag counter on the index page now that it doesn't interfere with the logo */
  .bagCounter {
    --g: 2px;    /* control the gap between numbers */

    top: 0.75em;
    right: 0.75em;
    font-size: 0.8em;
  }


/*** 3. Desktop typography changes ***/

  body {
    font-size: 16px; /* Consistent font size above a certain screen width */
  }

  .content table,
  .content .graphPage,
  .content .contentTextHelp,
  .content .subMenu {
    width: 500px; /* Table width stops increasing */
  }

  .content .tableWrapper {
    width: auto; /* Has to use width 100% on the mobile version, so that it filled the width of the screen. Means we need ot set it back to auto for desktop. */
  }

  .contentTeamHeaderWrapper {
    margin-left: auto;
  }

  .content .textScroll {
    height: calc(75 * var(--vh, 1vh));
    width: 750px;
    background-color: rgba(255, 255, 255, 0.05);
  }


/*** 4. Desktop form changes ***/

  .form {
    grid-template-columns: 1fr 250px 250px 1fr; /* Consistent form field width above a certain screen width */
  }

  .form .formItem input {
    font-size: 1em
  }

  .form .formItemTarget input {
    font-size: 0.8em
  }


/*** 5. Desktop messages changes ***/

  .messagesWrapper {
    left: initial;
    right: 0;
    transform: translate(0, 4em);
  }

  .messagesWrapperHome {
    top: 0;
  }

}