/* Define theme variables before importing any MDC Web component styles */
:root {
  --mdc-theme-primary: #ba2649;
  --mdc-theme-secondary: #1a6b54;
  --mdc-theme-background-light: #e2e2e2;
  --mdc-protected-button-container-shape: 4px;
  --pageMax: 1100px;
  --articleMax: 800px;
  --mdc-typography-headline1-font-size: 2rem;
  --mdc-typography-headline1-line-height: 2.2rem;

  --mdc-typography-headline2-font-size: 1.8rem;
  --mdc-typography-headline2-line-height: 2rem;

  --mdc-typography-headline3-font-size: 1.6rem;
  --mdc-typography-headline3-line-height: 1.8rem;

  --mdc-typography-headline4-font-size: 1.4rem;
  --mdc-typography-headline4-line-height: 1.6rem;

  --mdc-typography-headline5-font-size: 1.2rem;
  --mdc-typography-headline5-line-height: 1.4rem;

  --mdc-typography-headline6-font-size: 1rem;
  --mdc-typography-headline6-line-height: 1.2rem;

}

/* CSS Reset */

/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
  box-sizing: border-box;
}

/*
  2. Remove default margin
*/
* {
  margin: 0;
}

/*
  Typographic tweaks!
  3. Add accessible line-height
  4. Improve text rendering
*/
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/*
  5. Improve media defaults
*/
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/*
  6. Remove built-in form typography styles
*/
input, button, textarea, select {
  font: inherit;
}

/*
  7. Avoid text overflows
*/
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/*
  8. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}


/* Base */
.displayFlex {
  display: flex;
}

.footer {
  position: relative;
  align-self: flex-end;
  z-index: 3;
  width: 100%;
  color: rgba(0, 0, 0, 0.6);
}

footer {
  position: absolute;
  padding-left: 30px;
  padding-top: 30px;
  padding-bottom: 30px;
}

body, html {
  min-width: 300px;
}

html {
  min-height: 100vh;
  overflow: auto;
}

html.no-overscroll {
  overscroll-behavior-y: contain;
  overscroll-behavior: none;
}

html.no-overscroll body {
  overscroll-behavior-y: contain;
  overscroll-behavior: none;
}

body {
  overflow: visible;
  display: flex; 
  flex-flow: column;
  margin: 0; 
  min-height: calc(100vh - 100px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-overflow-scrolling: touch;
}

img {
  width: 100%;
}

main {
  padding: 32px;
}

h1 {
  font-size: 2em;
}
h2 {
  font-size: 1.8em;
}
h3 {
  font-size: 1.6em;
}
h4 {
  font-size: 1.4em;
}
h5 {
  font-size: 1.2em;
}
h5 {
  font-size: 1em;
}

h3.mdc-typography--headline3,
.mdc-typography--headline3 {
  margin-top:0px !important;
  margin-bottom:5px !important;
}
h4.mdc-typography--headline4,
.mdc-typography--headline4 {
  margin-top:0px !important;
  margin-bottom:5px !important;
}
h5.mdc-typography--headline5,
.mdc-typography--headline5 {
  margin-top:0px !important;
  margin-bottom:5px !important;
}
h6.mdc-typography--headline6,
.mdc-typography--headline6 {
  margin-top:0px !important;
  margin-bottom:5px !important;
}

h4.mdc-typography--headline4 .material-symbols-outlined,
.mdc-typography--headline4 .material-symbols-outlined {
  font-size:18px;
}

.menu-bar {
  display: none;
}

.logo a:hover, a:visited, a:link, a:active {
  text-decoration: none;
  color: #ba2649;
}

.mdc-select {
  margin-top:15px;
  min-width: 234px;
}

.mdc-select.dense .mdc-select__anchor {
  height: 40px;
}

.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {
  color: var(--mdc-theme-primary) !important;
}

.menu-item {
  margin: 0 10px 0 10px;
  text-decoration: none;
}

.mdc-drawer {
  width: 136px;
}

.mdc-menu.mdc-menu-surface {
  margin-right:-40px;
  margin-top:-8px;
}

.mdc-menu .mdc-list-item {
  padding: 8px;
  padding-left: 16px;
  padding-right: 16px;
}

.mdc-top-app-bar .mdc-menu .mdc-list-item {
  padding: 14px;
  padding-left: 24px;
  padding-right: 24px;
  min-width: 160px;
}

/* Typography */

.mdc-typography--overline {
  color: #555
}

.mdc-typography--body1 {
  line-height: 1.8
}

.mdc-top-app-bar {
  background-color:white;
}

.mdc-top-app-bar__title {
  color: white;
  display: flex;
  align-items: center;
}

.mdc-top-app-bar__title img {
  margin-right: 5px;
}

.contained-section {
  max-width: var(--pageMax);
  padding: 16px;
  padding-top:0px;
  width: 100%;
  margin: 0 auto;
}

.header-section {
  display: flex;
  justify-content: space-between;
  padding: 0;
  margin-top: -16px;
}

/* // Navigation */
.mdc-top-app-bar {
  background-color: var(--mdc-theme-primary);
  position: relative;
  color: inherit;
}

.mdc-top-app-bar--fixed-adjust {
  margin: 0 auto;
}

.demo-menu.mdc-top-app-bar__navigation-icon {
  color: #555;
}

.nav-title {
  margin: 16px 0 0 16px;
}

.nav-drawer {
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  width:136px;
  -webkit-transition: width 0.5s ease-in-out;
  -moz-transition: width 0.5s ease-in-out;
  -o-transition: width 0.5s ease-in-out;
  transition: width 0.5s ease-in-out;
}

.nav-drawer .material-symbols-outlined {
  width: 24px;
  max-width: 24px;
}

.nav-drawer.min {
  width:45px;
}

.nav-drawer .menu-text {
  white-space: nowrap;
}

.nav-drawer.min .menu-text {
  display: none;
}


.nav-drawer .mdc-drawer__content {
  display:flex;
  flex-flow: column;
}

.nav-drawer .mdc-drawer__content .mdc-list {
  flex: 1;
  padding-top:16px;
}

.nav-drawer .toggle-button {
  margin-bottom: 10px;
  display:flex;
}

.topic-section {
  display: none;
}

.topics {
  padding: 0 0 0 8px;
}

.topic {
  display: inline-block;
}

.topic a {
  color: var(--mdc-theme-primary);
  font-weight: 500;
  margin-left: 16px;
}

.mdc-top-app-bar--fixed-adjust {
  padding-top: 20px;
  width: 100%;
}

/* // Cards on Homepage */
.horizontal-card {
  display: flex;
  flex-direction: row;
}

.mdc-button.mdc-button--raised.inverted-colors {
  background-color: white !important;
  color:var(--mdc-theme-primary) !important;
}

.demo-card__meta {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.demo-card__media.mdc-card__media--square {
  width: 150px;
}

.demo-card__primary {
  padding: 8px;
  color: black;
}

.mdc-card + .mdc-card {
  margin-top: 16px;
}

.demo-card,
.demo-card a {
  text-decoration: none;
  color: inherit;
}

.mdc-card__primary-action {
  height: 100%;
}

#contact-form {
  max-width: 400px;
  margin-left:auto;
  margin-right:auto;
}

.text-field-container {
  margin-top:10px;
  margin-bottom:10px;
}

.text-field-container .mdc-text-field {
  width:100%;
}

.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
  color: var(--mdc-theme-primary);
}

.mdc-text-field--textarea {
  display: flex;
  flex-flow: row;
  align-items: flex-start;
  margin-bottom:10px;
}

.mdc-text-field--textarea .mdc-text-field__icon--leading {
  margin-bottom: auto;
  margin-top: 16px;
}

.mdc-text-field--textarea .mdc-text-field__input {
  padding-left:0;
}

.mdc-text-field--textarea .mdc-text-field__resizer {
  min-width: fit-content !important;
}

.demo-card .mdc-typography--subtitle1,
.demo-card .mdc-typography--headline2 {
  margin: 0;
}

.headline-title {
  margin-top: 10px;
  margin-bottom: 20px;
  color: var(--mdc-theme-primary);
}

.headline-section {
  margin: 0 auto;
  text-align: center;
  padding-top: 32px;
}

.archive-image {
  min-width: 300px;
}

.archive-section .demo-card__primary {
  padding: 16px;
}

.left {
  margin-bottom: 16px;
}

/* // Article Page */

.article {
  max-width: var(--articleMax);
}

.article-meta {
  display: flex;
  justify-content: space-between;
}

.article-title {
  margin: 0;
}

.article-preview {
  max-width: 340px;
  line-height: 1.8;
}

/* .article-body p:first-child::first-letter {
  font-size: 86px;
  font-style: italic;
  font-weight: 800;
  initial-letter: 2;
  float: left;
  line-height: 1;
  padding-right: 16px;
} */

.author {
  color: var(--mdc-theme-primary);
}

.author-meta {
  display: flex;
  align-items: center;
  margin-top: -16px;
  text-decoration: none;
}

.author-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 16px;
}

.overlapped {
  text-align: left;
  align-items: flex-start !important;
}

.overlapped-section .text-left,
.overlapped-section .text-right {
  margin-bottom:40px;
}

.main-intro ul li {
  margin-bottom:8px;
}
.main-intro ul li::marker {
  color: var(--mdc-theme-primary);
  font-size: 1.5rem;
}

.main-intro {
  display: flex;
  align-items: center;
}

.main-intro.odd {
  flex-direction: column;
}

.main-intro.even {
  flex-direction: column-reverse;
}

.hidden {
  display:none !important;
}

.pricing ul li {
  margin-bottom:6px;
}

.pricing ul li::marker {
  color: var(--mdc-theme-primary);
  font-size: 1.5rem;
}

/* Circular progress */
.mdc-button .mdc-circular-progress {
  display:none;
}

.form-field .mdc-circular-progress {
  display:none;
}

.form-field .loading {
  position: relative;
}

.form-field .loading .mdc-circular-progress {
  display:inline-block;
  position: absolute;
  left: calc(50% - 12px);
}

.mdc-button.loading .mdc-circular-progress {
  display:inline-block;
}

.mdc-button.loading .mdc-button__label {
  display:none;
}

.mdc-button.loading .material-icons, .mdc-button.loading img {
  display:none;
}

.search-field .loading .mdc-circular-progress .mdc-circular-progress__circle-clipper,
.form-field-suggestions-loading .mdc-circular-progress .mdc-circular-progress__circle-clipper {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  left: 0;
}

.form-field-suggestions-loading.loading .mdc-circular-progress {
  position: relative;
}

.search-field .loading .mdc-circular-progress__indeterminate-circle-graphic  {
  stroke: var(--mdc-theme-primary) !important;
}

/* Upload */
.upload {
  flex-wrap: wrap;
}

.upload input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.print-only {
  display:none;
}

/* Activities */
.activity-image-wrapper {
  height: 90px;
  width: 90px;
  text-align: center;
  min-width: 90px;
}
.activity-table {
  border: 1px solid silver;
  padding: 10px;
  margin-bottom:10px;
}

.activity-table .activity {
  display:flex;
  width:100%;
}

.activity-table  .activity .activity-lines {
  border: 1px solid silver;
  padding: 10px;
  padding-top:5px;
  padding-bottom:5px;
  margin-bottom:10px;
}

.activity-table  .activity-header {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left:10px;
  padding-right: 10px;
  background-color: var(--mdc-theme-primary);
  color: white;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  flex-wrap: wrap;
}

.activity-table .activity-header .count {
  padding: 5px;
  padding-top:0;
  padding-bottom:0;
  border-radius: 4px;
  display: inline-block;
  color: var(--mdc-theme-primary);
  background-color: white;
}

.activity-table .activity-lines {
  transition: all 0.5s ease-out;
}

.activity-detail {
  flex:1;
  min-width: 150px;
  margin-bottom: 10px;
}

.activity-header-text {
  pointer-events: none;
  flex: 1;
  min-width: 140px;
}

.activity-table  .activity.collapsed .activity-lines {
  max-height: 48px;
  overflow: hidden;
  position: relative;
}
.activity-table  .activity.collapsed .activity-lines div{
  margin-right:20px;
}
.activity-table  .activity.collapsed .activity-lines::after {
  content: '...';
  display: inline;
  position: absolute;
  bottom:10px;
  right:10px;
}

.activity-table .label {
  color: var(--mdc-theme-primary);
  margin-right:20px;
}

.activity-table .match {
  margin-right:10px;
  padding:5px;
  border: 1px solid silver;
}

.scan-table {
  opacity: 1;
  border: 1px solid gray;
  margin-bottom:20px;
}
.scan-table thead tr {
  border-bottom: 1px solid gray;
}
.scan-table tr th, .scan-table tr td {
  text-align: left !important;
  padding:6px;
}
.scan-table.nutrition {
  opacity: 1;
  border: 1px solid var(--mdc-theme-primary);
  margin-bottom:40px;
}

.scan-table.required {
  opacity: 1;
  border: 1px solid var(--mdc-theme-primary);
}
.scan-table.nutrition thead tr {
  border-bottom: 1px solid var(--mdc-theme-primary);
}
.scan-table.nutrition::after {
  position:absolute;
  margin-top:10px;
  content: '*Nutrition detected';
  color: var(--mdc-theme-primary);
}

input.upper-input {
  text-transform:Uppercase !important;
}

input.upper-input::placeholder {
  text-transform: none;
}

.mdc-text-field.dense {
  padding-left:10px !important;
  padding-right: 10px !important;
  height: 40px !important;
  align-items: center;
}

input.dense-number {
  padding-left: 4px;
  padding-right: 4px;
  padding-top: 0px;
  padding-bottom: 0px;
  height: 40px !important;
  width:40px;
}
.mdc-text-field.dense .mdc-icon-button {
  padding-top:0px;
  padding-bottom:0px;
  height:32px;
}

.search-field {
  display:flex;
  align-self: center;
  justify-content: center;
}
.search-field .mdc-button {
  height: 40px;
}

.search-field .mdc-text-field {
  flex:1;
  max-width: 400px;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.search-field .clear-button {
  padding:0;
  color:silver;
}

.form-field-suggestions-clear {
  padding:0;
  margin: 0;
  color:silver;
  width:24px;
  height:24px;
}

.form-field-suggestions-up {
  position: absolute;
  background: white;
  bottom: 55px;
  padding: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.38);
  border-radius: 4px;
  width: calc(100% - 26px);
  max-height: 200px;
  overflow-y: auto;
  color:rgba(0, 0, 0, 0.38);
}

.form-field-suggestions-up .suggestion {
  padding:5px;
  cursor: pointer;
  display:flex;
}

.form-field-suggestions-up .suggestion .right {
  margin-left:auto;
  flex:0;
}

.form-field-suggestions-up .suggestion:hover {
  color: var(--mdc-theme-primary);
}

.form-field-suggestions-down {
  position: relative;
  background: white;
  padding: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.38);
  border-radius: 4px;
  width: calc(100% - 26px);
  max-height: 200px;
  overflow-y: auto;
  color:rgba(0, 0, 0, 0.38);
}

.form-field-suggestions-down .suggestion {
  padding:5px;
  cursor: pointer;
  display:flex;
}

.form-field-suggestions-down .suggestion .right {
  margin-left:auto;
  flex:0;
}

.form-field-suggestions-down .suggestion:hover {
  color: var(--mdc-theme-primary);
}

.mdc-data-table {
  min-width: 200px;
}

@media only screen and (max-device-width: 480px){
  .desktop-only {
      display:none;
  }
}

@media screen and (max-width:400px) {
  .mdc-data-table__cell, .mdc-data-table__header-cell {
    padding: 0 8px 0 8px;
  }
}

@media screen and (max-width:300px) {
  .body, html {
    min-width: 300px;
  }
  .main-hero {
    width:300px;
  }
  .mdc-top-app-bar {
    width:300px;
  }
  .main-hero .right {
    display:none;
  }
  .main-hero .overlay h1 {
    font-size: 30px;
  }
  .main-hero .hero-overlay h1 {
    font-size: 30px;
  }
}

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

  .nav-drawer {
    width: 156px !important;
  }

  .nav-drawer .toggle-button {
    opacity: 0;
    visibility: hidden;
  }

  .nav-drawer .menu-text {
    display: block !important;
  }

  .article {
    min-width: 800px;
  }

  .menu-bar-button {
    display: none;
  }

  .menu-bar {
    display: block;
  }

  .hero-content {
    display:flex;
  }

  .main-hero .hero-overlay h1 {
    font-size: 40px;
  }

  .hero-content .left {
    flex:2
  }
  .hero-content .right {
    flex:1
  }

  .mdc-card + .mdc-card {
    margin-top: 32px;
  }

  .main-intro.odd {
    flex-direction: row;
  }
  .main-intro.even {
    flex-direction: row;
  }

  .left {
    margin-bottom: 0;
  }

  .left,
  .right {
    flex-direction: column;
    display: flex;
    width: 100%;
  }

  .laptop {
    width: 100%;
    margin-top:40px;
    margin-bottom:60px;
  }

  .smartphone {
    margin-left:100px;
    margin-right:100px;
  }

  .overlapped-section .text-left,
  .overlapped-section .text-right {
    max-width: 400px;
    min-width: 300px;
    text-align: left;
  }

  .right {
    margin-left: 50px;
  }

  .topic-section {
    display: flex;
    align-items: center;
  }

}