:root {
	--body-font-size: 16px;
	--line-height: 1.5;
	--content-width: 480px;
	--primary-color: #657bdb;
	--primary-color--translucent: rgba(85, 106, 195, 0.3);
	--secondary-color: #ECF86E;
	--secondary-color-hover: #ecf49b;
	--secondary-color--translucent: rgba(236, 248, 110, 0.3);
	--background-color: #060913;
	--background-color-secondary: #0f1424;
	--text-color: #e4e4e7;
	--button-text-color: #060914;
	--text-color--muted: #838690;
	--line-color: #303341;
  }
  
  @media (prefers-color-scheme: dark) {
	:root {
	  --primary-color: #657bdb;
	  --primary-color--translucent: rgba(85, 106, 195, 0.3);
	  --secondary-color: #ECF86E;
	  --secondary-color-hover: #ecf49b;
	  --secondary-color--translucent: rgba(236, 248, 110, 0.3);
	  --background-color: #060913;
	  --background-color-secondary: #0f1424;
	  --text-color: #e4e4e7;
	  --button-text-color: #060914;
	  --text-color--muted: #838690;
	  --line-color: #303341;
	}
  }
  
  html {
	font-size: 100%;
	background-color: var(--background-color);
	color: var(--text-color);
  }
  
  body {
	font-family: "Geomanist", sans-serif;
	font-size: var(--body-font-size);
	line-height: var(--line-height);
	padding: 0.5em 0.5em 2em 0.5em;
	margin: 0;
  }
  
  h1 {
	text-align: center;
	font-size: 1.4em;
	margin-bottom: 1em;
  }

  .wrapper {
	max-width: var(--content-width);
	margin: calc(var(--line-height) * 0.5em) auto 0 auto;
  }

#logo-container {
	text-align: center;
	display: block;
	margin-bottom: .6em;
}
#logo {
	width: 8em;
}

  .results-container {
	margin-top: 2em;
  }

  .results {
	margin-top: 0.5em;
	text-align: center;
  }
  
  .results > div {
	margin-bottom: 0.5em;
	border: 1px solid #666;
	padding: 10px;
	background-color: #222;	
  }
  
  @media (min-width: 440px) {
	:root {
	  --body-font-size: 18px;
	  --line-height: 1.5;
	}
  
	.results {
	  margin: 2em 0 0 0;
	  display: flex;
	  justify-content: space-between;
	  column-gap: 1em;
	}
	.results > div {
	  margin-bottom: 0;
	}
  }
  
  .choose-gender {
	display: flex;
	align-items: stretch;
	margin-bottom: 2em;
  }
  
  .segmented-control {
	flex: 1;
	text-align: center;
	line-height: 2em;
	border: 1px solid var(--line-color);
  }
  
  .segmented-control:first-child {
	border-radius: 0.5em 0 0 0.5em;
  }
  
  .segmented-control:last-child {
	border-radius: 0 0.5em 0.5em 0;
  }
  
  .results {
	color: var(--text-color--muted);
  }

  .results span.label {
	font-size: 0.8em;
	color: var(--text-color--muted);
  }

  .results span.kpi {
	font-weight: bold;
	color: var(--text-color);
  }
  
  /* The crazy stuff that needs to be here for the custom input styling */
  input[type="range"] {
	-webkit-appearance: none;
	margin: 18px 0;
	width: 100%;
	transition: all 0.265ms ease-out;
  }
  
  input[type="range"]:not(:last-of-type) {
	margin-top: 0;
	margin-bottom: 2.5em;
  }
  
  input[type="range"]:focus {
	outline: none;
  }
  
  input[type="range"]::-webkit-slider-runnable-track {
	width: 100%;
	height: 6px;
	cursor: pointer;
	background: var(--line-color);
  }
  
  input[type="range"]::-webkit-slider-thumb {
	box-shadow: 0 0 8px 1px var(--secondary-color),
	  0 0 16px 4px var(--background-color);
	border: 3px solid #fff;
	height: 24px;
	width: 24px;
	border-radius: 50%;
	background: var(--secondary-color);
	cursor: pointer;
	-webkit-appearance: none;
	margin-top: -8px;
  }
  input[type="range"]:focus::-webkit-slider-runnable-track {
	background: var(--secondary-color);
  }
  
  input[type="radio"] {
	-webkit-appearance: none;
	display: none;
  }
  
  .segmented-control input[type="radio"] + label {
	border: 1px solid rgba(0, 0, 0, 0);
	width: 100%;
	height: 100%;
	display: block;
	cursor: pointer;
	color: var(--text-color--muted);
  }
  
  .segmented-control input[type="radio"]:checked + label {
	background-color: var(--line-color);
	width: 100%;
	height: 100%;
	display: block;
	color: var(--text-color);
  }
  
  .segmented-control input[type="radio"]:focus + label {
	border: 1px solid var(--secondary-color);
  }
  
  .segmented-control:first-child input[type="radio"]:checked + label {
	border-radius: 0.5em 0 0 0.5em;
  }
  
  .segmented-control:last-child input[type="radio"]:checked + label {
	border-radius: 0 0.5em 0.5em 0;
  }
  
  input[type="range"]::-moz-range-track {
	width: 100%;
	height: 100%;
	cursor: pointer;
	background: var(--line-color);
  }
  
  input[type="range"]::-moz-range-thumb {
	box-shadow: 0 0 8px 1px var(--secondary-color),
	  0 0 16px 4px var(--background-color);
	border: 3px solid #fff;
	height: 24px;
	width: 24px;
	border-radius: 50%;
	background: var(--secondary-color);
	cursor: pointer;
	-webkit-appearance: none;
	margin-top: -8px;
  }



  /* Button to BMR/TDEE Calculator */
.button-container {
    text-align: center;
    margin-bottom: 40px;
}
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.button:hover {
    background-color: var(--secondary-color-hover);
}

/* Email Submission Section */
.email-submission-container {
    background-color: var(--background-color-secondary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.email-submission-container h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-color);
}
.email-submission-container p {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color--muted);
}
form {
    text-align: center;
}
input[type="email"] {
    width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
	font-size: 1em;
}
button[type="submit"] {
    background-color: var(--secondary-color);
    color: var(--button-text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
	font-size: 0.9em;
}
button[type="submit"]:hover {
    background-color: var(--secondary-color-hover);
}
.thanks-message {
    text-align: center;
    display: none;
    color: var(--primary-color);
    margin-top: 10px;
}

.message-box {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.close-btn:hover {
    color: #d8415c;
}
