/*
1. FONTS
2. GENERAL
3. ANIMATIONS
4. NAVIGATION
5. INFO
6. FOOD CATEGORY
7. FOOD ITEM TITLE
8. FOOD ITEM DETAIL
*/


/* --- FONTS --- */

:root {
    --colorBlack: #222831;
    --colorWhite: #FFFFFF;
    --colorBeige: #fafafa;
    --colorGrey: #e0e0e0;
    --colorBlue: #5072A7;
    --colorMediumGrey: #b0b0b0;
    --colorDarkGrey: #808080;
    --colorLightBlack: #454545;
    --colorLightGrey: #F1F1F1;
    --colorPastelYellow: #ffee8c;
    --fontLight: 'Light', Arial, Helvetica, sans-serif;
    --fontMedium: 'Medium', Arial, Helvetica, sans-serif;
    --fontRegular: 'Regular', Arial, Helvetica, sans-serif;
    --fontMediumWeight: 500;
    --maxWidth: 510px;
  }
  
@font-face {
  font-family: Light;
  src: url("../fonts/Inter-Light.ttf") format("opentype");
}
  
@font-face {
  font-family: Medium;
  src: url("../fonts/Inter-Medium.ttf") format("opentype");
}
  
@font-face {
  font-family: Regular;
  src: url("../fonts/Inter-Regular.ttf") format("opentype");
}

.MediumFont {
  font-family: var(--fontMedium);
}
  
.RegularFont {
  font-family: var(--fontRegular);
}
  
 /* --- GENERAL --- */ 

.fixed-header {
  position: sticky;
  top: 0;
  height: 50px;
  width: 100%;
  background-color: var(--colorPastelYellow);
  z-index: 1000;
}

.fixed-footer {
  position: sticky;
  bottom: 0;
  height: 25px;
  width: 100%;
  word-spacing: 30px;
  padding-top: 10px;
  background-color: var(--colorPastelYellow);
  text-align: center;
  z-index: 1000;
}

body {
  height: 100vh;
  max-width: var(--maxWidth);
  margin: 0 auto auto auto;
  font-family: var(--fontMedium);
  font-size: 14px;
  color: var(--colorBlack);
  background-color: var(--colorPastelYellow);
}

.Logo {
  float: right;
  height: 42px;
  width: 42px;
}

article {
  clear: both;
  min-height: 100%;
  padding: 0 10px 0 10px;
  overflow-y: auto;
  z-index: 2;
}

p {
  font-family: var(--fontLight);
}
  
a {
  color: var(--colorBlack);
  text-decoration: none;
}

h1 {
  font-size: 18px;
}
  
h2 {
  margin-top: 0;
  font-size: 12px;
  font-weight: normal;
  color: var(--colorDarkGrey);
  line-height: 1.1;
}

::placeholder {
  color: var(--colorBlack);
  font-family: var(--fontLight);
  letter-spacing: 1px;
  opacity: 1;
}
  
::-ms-input-placeholder { 
  color: var(--colorBlack);
  font-family: var(--fontLight);
  letter-spacing: 1px;
}

li {
  list-style-position: inside; 
}

label {
  display: block;
  padding-top: 15px;
  padding-bottom: 5px;
  animation: SlideDown 0.7s ease forwards;
}

.submit-button {
  height: 40px;
  width: 100%;
  max-width: var(--maxWidth);
  margin-top: 15px;
  text-align: center;
  color: var(--colorBlack);
  border: none;
  animation: SlideDown 0.7s ease forwards;;
  background-color: var(--colorGrey);
}

.grey-round-border {
  border: 1px solid var(--colorMediumGrey);
  border-radius: 5px;
}

.item-search-button {
  float: left;
  height: 30px;
  width: 30px;
  padding: 10px 0 0 30px;
}

/* --- ANIMATIONS --- */

@keyframes Rise {
  0% {
    bottom: -100px;
    transform: scale(0.7);
  }
  100% {
    bottom: 300px;
      transform: scale(1);
  }
}

@keyframes SlideIn {
  0% {
    transform: translateY(0) translateX(100px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

@keyframes SlideUp {
  0% {
    transform: translateY(30px) translateX(0);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

@keyframes SlideDown {
  0% {
    transform: translateY(-30px) translateX(0);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

@keyframes Rotate {
  0% {
    transform: rotate(-90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* --- NAVIGATION --- */

#icon-menu {
  float: right;
  height: 30px;
  width: 30px;
  padding: 10px;
  cursor: pointer;
}

nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 300px;
  width: 300px;
  border: 2px solid var(--colorWhite);
  border-radius: 50%;
  display: none; /* Replace with flex when showing */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #5DADE2;
  filter: none !important;
  z-index: 1000;
}

nav a {
  display: block;
  font-size: 28px;
  color: white;
  padding: 20px;
}

/* --- INFO --- */

#info-container {
  padding: 10px;
}

.info-box {
  margin-top: 20px;
  background-color: var(--colorBeige);
  border: 1px solid var(--colorMediumGrey);
  border-radius: 10px;
  animation: SlideUp 0.7s ease forwards;
}

.info-title {
  font-family: 'Medium';
  font-size: 16px;
  line-height: 1.1;
  margin-bottom: -10px;
  padding: 10px 10px 0 10px;
  animation: SlideDown 0.7s ease forwards;
}

.info-text {
  font-size: 14px;
  padding: 3px 20px 3px 20px;
} 

.info-icon {
  float: right;
  height: 28px;
  width: 28px;
  padding: 12px 10px 10px 10px;
}

/* --- FOOD CATEGORY --- */

.category-container {
  height: 100%;
  width: calc(100% - 40px);
  padding: 20px 20px 20px 20px;
}

.category-parent-title {
  font-family: 'Medium';
  font-size: 16px;
  padding-top: 20px;
  cursor: pointer;
  animation: SlideIn 0.7s ease forwards;
}

.category-parent-title:first-of-type {
  padding-top: 0;
}

.category-title {
  display: inline-block;
  height: 30px;
  width: auto;
  margin: 10px 7px 0 0;
  padding: 10px 20px 0px 20px;
  font-family: 'Regular';
  font-size: 14px;
  background-color: var(--colorBeige);
  border: 1px solid var(--colorMediumGrey);
  border-radius: 5px;
  animation: Rise 0.7s ease-in-out forwards;
}

/* --- FOOD ITEM TITLE --- */

.input-search-food {
  float: left;
  height: 30px;
  width: calc(100% - 120px);
  margin: 7px 0px 0px 10px;
  border: 1px solid var(--colorGrey);
  background-image: url('https://carbs.ch/public/icons/search.svg');
  background-position: 10px center; 
  background-repeat: no-repeat; 
  background-size: 16px 16px;
  padding-left: 35px;
}

.input-search-food:focus {
  outline: none;
}

.item-back-button {
  float: left;
  height: 30px;
  width: 30px;
  padding: 10px 0 0 15px;
  transform: rotate(0deg);
  animation: Rotate 0.7s ease-in-out forwards;
}

.item-category-title {
  font-family: 'Medium';
  font-size: 16px;
  line-height: 1.1;
  padding: 10px 0 0 0;
  animation: SlideDown 0.7s ease forwards;
}

#item-titles-container {
  height: calc(100% - 50px - 40px - 80px);
  width: 100%;
  margin-top: 20px;
  font-family: var(--fontLight);
  background-color: var(--colorBeige);
  animation: Rise 0.7s ease-in-out forwards;
}

.item-selection {
  height: 16px;
  border-bottom: 0.5px solid var(--colorGrey);
  padding: 10px;
  cursor: pointer;
}

.item-icon {
  float: left;
  height: 18px;
  width: 18px;
  padding-right: 6px;
}

.item-name {
  float: left;
  width: calc(100 - 30px);
}
    
.item-count-servings {
  float: right;
  height: 16px;
  width: 16px;
  text-align: center;
  padding: 1px 1px 3px 1px;
  border-radius: 50%;
  background-color: var(--colorLightGrey);
}

#item-container {
  display: none;
}

#item-container-top {
  display: flex;
  height: 110px;
  width: 100%;
  background-color: var(--colorLightGrey);
  padding-bottom: 15px;
}

/* --- FOOD ITEM DETAIL --- */
    
#item-container-bottom {
  height: 190px;
  width: 100%;
  background-color: var(--colorLightGrey);
}
    
#item-box-first {
  flex-grow: 0;
  width: 110px;
  padding-left: 20px;
  padding-right: 5px;
}
    
#item-box-second {
  flex-grow: 0;
  width: 75px;
  text-align: right;
  padding-top: 21px;
}
    
#item-box-third {
  flex-grow: 1;
  text-align: left;
  padding-left: 30px;
}
    
#item-box-first p,
#item-box-second p,
#item-box-third p {
  line-height: 0.5;
}
    
.ServingLink {
  color: var(--colorBlue);
  cursor: pointer;  
}
    
.ServingSelected {
  color: var(--colorBlack);
}

.slider-container-left {
  float: left;
  height: 60px;
  width: 50px;
  margin: 0;
  line-height: 0.7;
  padding-left: 20px;
}
    
.slider-container-right {
  float: right;
  height: 36px;
  width: calc(100% - 70px - 20px);
  padding-top: 24px;
  padding-right: 20px;
}
    
.slider {
  -webkit-appearance: none;
  height: 8px;
  width: 100%;
  background: #ddd;
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
}

.NutritionalValuesTitle {
  padding-top: 5px;
}

.NutritionalValuesTitle,
.slider-title {
  font-size: 12px;
  color: var(--colorDarkGrey);
}
    
.slider-value {
   margin-top: 0px;
}
    
.slider::-webkit-slider-thumb {
   -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--colorBlue);
  cursor: pointer;
}
    
.slider::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--colorBlue);
  cursor: pointer;
}
    
.ItemSliderValueContainer,
.ItemSliderFactorContainer,
.ItemSliderBolusContainer {
  text-align: center;
}

/* --- NAVIGATION --- */

.contact-input {
  height: 15px;
  width: calc(100% - 20px);
  padding: 10px;
  animation: SlideUp 0.7s ease forwards;
}

.contact-textarea {
  line-height: 1.5;
  width: calc(100% - 20px);
  padding: 10px;
  animation: SlideUp 0.7s ease forwards;
}