@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wdth,wght@62.5,100..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

:root {

  --primary-color: #ffa300;

  --white-color: #ffffff;

  --bg-color: #0f0602;
  --bg-color-transparent: #0f060200;

  --grey-color: #1c1410;

  --dark-color: #050201;
  --dark-color-transparent: #05020100;

  --error-color: #C6372C;

  --border-radius: 20px;
  --transition: 0.25s ease-in-out;
  --transition-fun: 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --focus-opacity: 0.4;
  --soft-shadow: 0 10px 40px 2px var(--dark-color);

  --base-padding: min(30px, 2.5vw);

  --fats-color: #49d57a;
  --proteins-color: #e12d3e;

  /* Gold colors */
  --gold-dark-color: #96390b;
  --gold-medium-color: #d3881c;
  --gold-color: #d8b162;
  --gold-light-color: #fff0b3;
/*  --gold-gradient: linear-gradient(
    90deg,
    var(--gold-medium-color) 0%,
    var(--gold-color) 22%,
    var(--gold-light-color) 45%,
    var(--gold-color) 68%,
    var(--gold-medium-color) 100%
  );*/

  --gold-gradient: linear-gradient(
    0deg,
    var(--gold-medium-color) 0%,
    var(--gold-color) 22%,
    var(--gold-light-color) 45%,
    var(--gold-color) 68%,
    var(--gold-medium-color) 100%
  );

  /* Step: 27.975px (1080) → 37.3px (1800) = 25% */
  --font-head: clamp(1.7484rem, 0.8742rem + 1.2951vi, 2.3313rem);
  /* Step: 16.95px (1080) → 22.6px (1800) = 25% */
  --font-sub: clamp(1.0594rem, 0.5297rem + 0.7847vi, 1.4125rem);
  /* Step: 13.74px (1080) → 17.3px (1800) = 20% */
  --font-copy: clamp(0.8588rem, 0.525rem + 0.4944vi, 1.0813rem);
  /* Step: 12.41px (1080) → 14.6px (1800) = 15% */
  --font-small: clamp(0.7756rem, 0.5703rem + 0.3042vi, 0.9125rem);
  /* Step: 10.8px (1080) → 12px (1800) = 10% */
  --font-extra-small: clamp(0.675rem, 0.5625rem + 0.1667vi, 0.75rem);
}



/*** RESETS ***/

*{
  box-sizing: border-box;
  font-family: "Noto Serif", "Noto Sans Arabic", serif;
}

body, html{
  height: 100%;
  width: 100%;
}

body{
  margin: 0;padding: 0;
  background: var(--bg-color);
  overflow: hidden;
  overflow-y: scroll;
}

body::-webkit-scrollbar{
  width: 0;
  height: 10px;
}

body::-webkit-scrollbar-thumb{
  background: var(--primary-color);
  border-radius: 10px;
}

body::-webkit-scrollbar-track{
  background: var(--dark-color);
}

input {
  background: transparent;
  padding: 0;
  margin: 0;
  outline: none;
  border: none;
  width: 100%;
  font-size: var(--font-copy);
  color: var(--bg-color);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active { 
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--bg-color);
    color: var(--bg-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

textarea {
  width: 100%;
  line-height: 150%;
  border: none;
  outline: none !important;
  font-size: var(--font-copy);
  resize: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

select, select:focus, select:active{
  border: none;
  outline: none;
  border-radius: 0;
  -moz-appearance:none; /* Firefox */
  -webkit-appearance:none; /* Safari and Chrome */
  appearance:none;
  color: var(--bg-color);
}


p,h1,h2,h3,h4,a{
  margin: 0;
  padding: 0;
  color: var(--white-color);
}

h1, h2 {
  font-size: var(--font-head);
}


h3, h4 {
  font-size: var(--font-sub);
}

a:visited,a:focus,a:hover {
  color: var(--white-color);
}

p {
  font-size: var(--font-copy);
  font-weight: 300;
  letter-spacing: 0.02em;
}

footer {
  padding: 70px 5% 20px 5%;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  flex-wrap: wrap;
}

.grecaptcha-badge {
    visibility: hidden;
}

span.highlight{
  color: var(--primary-color);
}

.require-rtl{
  text-align: right;
  direction: rtl;
}

.no-scrollbar::-webkit-scrollbar{
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  -webkit-appearance: none;
}

.no-scrollbar::-webkit-scrollbar-thumb{
  background: transparent;
  border-radius: 10px;
}

.no-scrollbar::-webkit-scrollbar-track{
  background: transparent;
}

h3.highlight, h4.highlight{
  color: var(--primary-color);
}

.simple-select{
  width: auto;
  font-size: var(--font-copy);
  color: var(--white-color);
}

.simple-select select{
  background: transparent;
  color: var(--white-color);
  font-size: var(--font-copy);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Show ios things for desktop AND ios platforms */
body[data-platform="ios"] .android-only, body[data-platform="desktop"] .android-only{
  display: none !important;
}

body[data-platform="android"] .ios-only{
  display: none !important;
}

/*** NAVIGATION ***/

#dashboard nav {
    width: min(600px, 100%);
    padding: 0 var(--base-padding);
    display: flex;
    justify-content: space-between;
}

#dashboard nav .nav-trailing a{
  cursor: pointer;
/*  font-size: 50px;
  width: 50px;
  height: 50px;*/
  line-height: 0;
}

#dashboard nav .nav-trailing {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

#dashboard nav .nav-logo img{
  max-width: 60px;
}

#dashboard nav .view-profile img{
  max-width: 40px;
}

#dashboard nav a.view-profile{
  transition: var(--transition-fun);
  font-size: calc(var(--font-sub) * 1.3);
}


form#profile .save-btns{
  position: sticky;
  bottom: 20px;
  margin-top: 90px;
}

form#profile .save-btns:after, form#checkin .save-btns:after, form#add-meal:after {
  width: 100%;height: 100%;
  content: '';
  display: block;
  position: absolute;
  top: 0;left: 0;
  background: var(--bg-color);
  border-radius: var(--border-radius);
  box-shadow: 0 0 20px 30px var(--bg-color);
  z-index: -1;
  pointer-events: none;
}

.save-btns .error:not(:empty) {
  padding: 10px;
  text-align: center;
}


/*** PROFILE ***/

form#profile h2:not(:first-child){
  border-top: 1px solid var(--grey-color);
  padding-top: 10px;
  margin-top: 10px;
} 

/*** FIELDS **/

.input-field, .input-select {
  background: var(--white-color);
  border-radius: var(--border-radius);
  padding: 15px 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.input-label {
  font-size: var(--font-small);
  color: var(--bg-color);
  position: absolute;
  top: 7px;left:20px;
  transition: var(--transition);
  transform: scale(0.5);
  opacity: 0;
  transform-origin: bottom left;
  width: max-content;
}

.input-field input:not(:placeholder-shown) ~ label, .input-field textarea:not(:placeholder-shown) ~ label {
  transform: scale(1);
  opacity: 1;
}

.input-field input:not(:placeholder-shown), .input-field textarea:not(:placeholder-shown){
  padding-top: var(--font-small);
}

.input-field:focus-within{
  box-shadow: 0 0 0 2px var(--primary-color);
}

.input-field.upload label{
  font-size: var(--font-sub);
  color: var(--bg-color);
  font-weight: 800;
  text-align: center;
  width: 100%;
  display: block;
  cursor: pointer;
}

.input-field textarea ~ .input-label{
  background: var(--white-color);
}


label.input-field.upload .input-label {
    position: initial;
}

.input-field.options {
    display: flex;
    align-items: end;
}

.input-label-property {
  align-self: end;
}

.input-select select{
  font-size: var(--font-sub);
  padding-top: var(--font-small);
  width: 100%;
  background: transparent;
}


.input-select.filter{
  background: transparent;
  flex-direction: row-reverse;
  padding: 0;
  align-items: center;
}

.input-select.filter label, .input-select.filter select{
  color: var(--white-color);
  padding: 0;
}

.input-select.filter select{
  width: fit-content;
    text-align: right;
  direction: rtl;
}

.input-select.filter .input-label{
  position: relative;
  left: auto;
  top: auto;
  right: auto;
  flex-basis: 100%;
}


.input-select label.input-label{
  transform: scale(1);
  opacity: 1;
  transition: none;
}

form img.user-profile{
  object-fit: cover;
  width: 40px;height: 40px;
  border-radius: 200px;
  position: absolute;
  top: 0;bottom: 0;left: 20px;
  margin: auto;
}




a.input-field-btn {
    color: var(--bg-color);
    float: right;
    cursor: pointer;
    position: relative;
    align-self: end;
    font-size: var(--font-extra-small);
    display: flex;
    align-items: end;
    justify-content: end;
}

.input-field input:placeholder-shown ~ .input-field-btn {
  display: none;
}

.input-field-group{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.input-field-group .input-field, .input-field-group .input-select {
  flex-basis: 48%;
  max-width: 48%;
}

.input-field-group.tripple .input-field, .input-field-group.tripple .input-select {
  flex-basis: 31%;
  max-width: 31%;
}

/*** PAGES ***/

.page:not(.active) {
  display: none !important;
}

/* some pages need to be fixed, and show overtop of any content already loaded */


#login.page{
  position: fixed;
  top:0;left:0;
  height: 100vh;
  width: 100vw;
  z-index: 9000;
  background: var(--bg-color);
  display: flex;
  justify-content: center; align-items: center;
}


#journey.page{
  position: fixed;
  top:0;left:0;
  height: 100vh;
  width: 100vw;
  z-index: 9001;
  background: var(--bg-color);
  display: flex;
  justify-content: center; align-items: center;
}

#dashboard.page {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#dashboard.page .header {
    width: 100%;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-position: bottom center;
    position: relative;
    padding-bottom: 100px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

#dashboard.page .header:empty{
  display: none;
}

#dashboard.page .body {
  margin: 0 auto;
  width: min(600px, 100%);
  padding: 0 var(--base-padding) 100px var(--base-padding);
}


.page .body .fullwidth{
  width: calc(100% + (var(--base-padding) * 2));
  margin-left: calc(var(--base-padding) * -1);
}

#loading.page {
  position: fixed;
  top:0;left:0;
  height: 100vh;
  width: 100vw;
  z-index: 1000000000;
  background: var(--bg-color);
  display: flex;
  justify-content: center; align-items: center;
}

.loading-bar{
  position: absolute;
  top: 0;left:0;
  z-index:  2;
  width:  100vw;
  background: var(--bg-color);
  height: 2px;
}

.loading-bar:after{
  content: '';
  position: absolute;
  top: 0;left: 0;
  height: 100%;
  background: var(--primary-color);
  box-shadow: 0 0 20px 0 var(--primary-color);
  mix-blend-mode: plus-lighter;
  animation-fill-mode: forwards;
  -webkit-animation-fill-mode: forwards;
  animation: 10s load_init cubic-bezier(0.05, 1.06, 0.58, 1);
  animation-fill-mode: forwards;
  animation-iteration-count: 1;
  transition: 0.25s cubic-bezier(0.05, 1.06, 0.58, 1);
}

@keyframes load_init {
  0% {width: 0%}
  10% {width: 5%}
  100% {width: 90%}
}


/** LOGIN STEPS **/

#login nav {
    position: fixed;
    top: 10px;
}

#login nav .nav-logo img{
  width: 80px;
}

#login footer{
  position: fixed;
  bottom: 0;left: 0;
}

.login-step{
  padding: min(30px, 5vw);
  width: min(500px, 90%);
  background: var(--dark-color);
  border-radius: var(--border-radius);
}


.login-step:not(.active-step){
  display: none !important;
}


.login-step form {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}


.error{
  color: var(--error-color);
  font-weight: 800;
}

.error:empty{
  display: none;
}




/** JOURNEY STEPS **/

#journey nav {
    position: fixed;
    top: 10px;
}

#journey nav .nav-logo img{
  width: 80px;
}

.journey-step{
  padding: min(30px, 5vw);
  width: min(600px, 95%);
  background: var(--dark-color);
  border-radius: var(--border-radius);
}


.journey-step:not(.active-step){
  display: none !important;
}


.journey-step form {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.journey-step .video{
  margin-top: 20px;
}

.journey-step .web-app-image{
  width: 100%;
  text-align: center;
}

.web-app-image img{
  width: 100%;
  margin: 20px auto 0 auto;
  max-width: 300px;
  overflow: hidden;
  border-radius: var(--border-radius);
}


/**** BUTTON ANIMATIONS *****/

.btn {
  background: var(--primary-color);
  width: 100%;
  color: var(--bg-color);
  padding: 20px;
  text-align: center;
  margin: 0 auto;
  font-size: var(--font-copy);
  cursor:pointer;
  border-radius: var(--border-radius);
  cursor:pointer;
  font-weight: 700;
  position: relative;

  outline: none !important;
  box-shadow:none;
  border:none;
  text-decoration: none;
  box-shadow: 0 2px 0 2px var(--gold-dark-color);
}

.btn-secondary {
  background: var(--grey-color);
  width: 100%;
  color: var(--white-color);
  padding: 15px;
  text-align: center;
  margin: 0 auto;
  font-size: var(--font-copy);
  cursor:pointer;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor:pointer;
  font-weight: 700;
  position: relative;

  outline: none !important;
  box-shadow:none;
  border:none;
  text-decoration: none;
}

a.btn-secondary:hover {
    background: var(--gold-medium-color);
    color: var(--bg-color);
}

a.btn-small {
    font-size: var(--font-small);
    display: flex;
    align-items: center;
    cursor: pointer;
    width: fit-content;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-weight: 800;
    background: var(--primary-color);
    color: var(--bg-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 0 1px var(--gold-dark-color);
}

.btn-small:before {
    content: '';
    width: 100%;height: 100%;
    position: absolute;
    top: 0;
    left: -100%;
    background: linear-gradient(70deg, transparent, var(--white-color), transparent);
    z-index: 3;
    transition: 0.25s linear;
}

.btn-small:hover{
  color: var(--bg-color);
}

.btn-small:hover:before{
  left: 100%;
}


.btn-error {
  background: transparent;
  width: 100%;
  display: block;
  color: var(--error-color);
  padding: 20px 5px;
  text-align: center;
  margin: 0 auto;
  font-size: var(--font-small);
  cursor:pointer;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor:pointer;
  font-weight: 700;
  position: relative;

  outline: none !important;
  box-shadow:none;
  border:none;
  text-decoration: none;
  margin-top: 10px;
}

.btn-error:hover{
  opacity: 0.3;
  text-decoration: underline;
}

.btn.loading, .btn-secondary.loading{
  pointer-events: none;
}

.btn.loading .progress:not(:empty){
  position: absolute;
  top:0;left:0;bottom:0;right:0;
  margin: auto;
  height: var(--font-copy);
}



.spinner {
  display: none;
  width: 24px;
  height: 24px;
  position: absolute;
  top: calc(50% - 12px);
  left: calc(50% - 12px);
  background: transparent;
  box-sizing: border-box;
  border-top: 2px solid var(--bg-color);
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 100%;
  animation: spin 0.6s ease-out infinite;
}

.loading .spinner, [data-status="updating"] .spinner {
  display:block;
}

.item-sheet-body.loading .spinner{
  z-index: 2;
  border-top: 2px solid var(--bg-color);
}

.btn-secondary .spinner, .spinner.light {
  border-top: 2px solid var(--white-color);
}

.btn-error .spinner{
  border-top: 2px solid var(--error-color);
}

.add-meal-option .spinner {
  border-top: 2px solid var(--white-color);
}

.input-field-btn .spinner{
  position: relative;
  top: 0;left: 0;
}


.loading .text{
  opacity:0;
  white-space: nowrap;
}

@keyframes spin {
  100% {transform: rotate(360deg)}
}

a.simple-link{
  cursor: pointer;
}

a.simple-link:not(:hover) {
  text-decoration: underline;
}


.btn:visited, .btn:focus, .btn:hover {
  color: var(--bg-color);
}

.bubble:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    /*background: #fff0b308;*/
    background: #fff0b30f;
    left: 0;top: 0;
    border-bottom-left-radius: 1000px;
    border-bottom-right-radius: 1000px;
    pointer-events: none;
}


/** VIMEO VIDEO HANDLERS ***/

.video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background-position: center;
    background-size: cover;
}

.video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}




/*** SCHEDULE **/


.entries{
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--soft-shadow);
    border-radius: var(--border-radius);
    padding: min(30px, 5vw);
    width: 100%;
    z-index: 3;
    position: relative;
    background: var(--white-color);
}

.entries[data-total-entries="0"]{
  display: none;
}

.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
}

.entries-header img {
    width: 40px;
}

.entries-header h3.highlight{
  color: var(--gold-medium-color);
  display: flex;
  align-items: center;
  gap: 6px;
}

.entries-header .entries-completed:after{
  content: attr(data-content);
}

.entries:empty {
  display: none;
}

.item-title{
  padding: 15px 0;
  font-weight: 800;
}

.entry-input-hitbox, .entry-click-hitbox{
  position: absolute;
  width:100%;height:100%;
  top:0;left:0;
  cursor: pointer;
}

.entry-input-hitbox{ display: block; }
.entry-click-hitbox{ display: none; }

.item[data-status="completed"] .entry-input-hitbox{
  display: none;
}
.item[data-status="completed"] .entry-click-hitbox{
  display: block;
}



.item {
  padding: 0 20px;
  background: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.item.entry:before {
    content: '';
    width: 100%;height: 100%;
    position: absolute;
    top: 0;
    left: -100%;
    background: linear-gradient(70deg, transparent, var(--white-color), transparent);
    z-index: 3;
    transition: 0.25s linear;
}

.item.entry.bubble:after{
  background: #fff0b31a;
}



.item.entry[data-status="completed"]:before {
  left: 100%;
}

.item p, .item label {
  font-size: var(--font-sub);
}


.item[data-status="updating"]{
  pointer-events: none;
}

.item-status{
  position: relative;
  min-width:30px;min-height:30px;
  max-width:30px;max-height:30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-status .icon {
  position: absolute;
  font-size: var(--font-head);
  color: var(--white-color);
  transition: var(--transition-fun);
  transform: scale(0);
}

.item-status .icon.icon-x{
  transform: scale(1);
  background: var(--bg-color);
  z-index: 2;
  border-radius: 100%;
}

.item-status .icon.icon-x:before{
  content:'';
  width: 20px;height:20px;
  box-shadow: 0 1px 0 0.5px var(--gold-light-color);
  border-radius: var(--border-radius);
  display: block;
}

.item-status .progress {
  color: var(--white-color);
  font-size: var(--font-extra-small);
  font-weight: 800;
  position: absolute;
  top:0;left:0;right:0;bottom:0;margin:auto;
  height: fit-content;
  width: fit-content;
  transition: 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: scale(0);
  z-index: 2;
}

.item[data-status="updating"] .item-status .progress {
  transform: scale(1);
}

.item[data-status="updating"] .item-status .icon-x {
  opacity: 0;
  transform: scale(0);
}

.item[data-status="completed"] .item-status .icon-checkmark {
  opacity: 1;
  transform: scale(1);
}

.item[data-status="completed"] .item-status .icon-x {
  opacity: 0;
  transform: scale(0);
}

.item[data-status="completed"] {
  background-color: var(--gold-medium-color);
  /*background-image: linear-gradient(45deg, var(--gold-color), transparent);*/
  background-image: linear-gradient(45deg, transparent, transparent, var(--gold-color), transparent);
}

.item[data-status="completed"] .highlight{
  display: none;
}

.btn#request-notifications{
  margin: 30px 0;
}


.item.add-highlight {
  animation: flash 2s ease-out forwards;
}

@keyframes flash {

  0% { 
    outline: 4px solid var(--primary-color);
  }

  100% { 
    outline: 0px solid transparent;
  }
}


/*** ITEM SHEET ***/

.item-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--dark-color);
  transition: var(--transition-fun);
  opacity: 0;
  z-index: 1;
}

.item-sheet{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 2.5vw;
  transition: var(--transition-fun);
  z-index: 8999;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.item-sheet-module{
  width: min(600px, 95vw);
  height: auto;
  max-height: 90vh;
  background: var(--bg-color);
  border-radius: var(--border-radius);
  z-index: 2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translate(0%, 100%);
  transition: transform var(--transition-fun);
}

/* modern viewport units where supported */
@supports (height: 100dvh) {
  .item-sheet { padding: 5dvh 2.5dvw; }
  .item-sheet-module {
    width: min(600px, 95dvw);
    max-height: 90dvh;
  }
}

/* for small viewport behavior, more stable with ios bars */
@supports (height: 100svh) {
  .item-sheet { padding: 5svh 2.5vw; }
  .item-sheet-module { max-height: 90svh; }
}


.item-sheet-module::-webkit-scrollbar {
    width: 2px !important;
    height: 0px !important;
}

.item-sheet-module::-webkit-scrollbar-thumb{
  background: var(--dark-color);
  border-radius: 10px;
}

.item-sheet-module::-webkit-scrollbar-track {
    background: transparent;
}


.active .item-sheet-module{
  transform: translate(0%, 0%);
}

.active .item-sheet-overlay{
  opacity: 0.7;
}

.item-sheet-header{
  padding: 20px;
  position: sticky;
  top: 0;left:0;
/*  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(4px);*/
  width: 100%;
  z-index: 3;
  height: 70px;
}

.item-sheet-header .back {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  position: relative;
}


.item-sheet-header .back:after {
    content: '';
    width: 60px;height: 60px;
    position: absolute;
    top: -15px;left: -15px;
}
.icon.icon-arrow:before{
  position: relative;
  top: 0;
  transition: var(--transition);
}

.back:hover .icon.icon-arrow:before{
  top: -5px;
  opacity: var(--focus-opacity);
}

.back .icon.icon-arrow{
  transform: rotate(-90deg);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-size: var(--font-sub);
  width: 30px;height:30px;
  background: var(--bg-color);
  color: var(--white-color);
  border-radius: 100%;
}


.item-sheet.active{
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.item-sheet-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 100%;
  padding: 10px var(--base-padding) 20px var(--base-padding);
}

.item-sheet-body img{
  border-radius: var(--border-radius);
}

.item-sheet-body form{
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0 3px 20px 3px;
}

.item-sheet[data-sheet-id="disable-dashboard"] h2{
  font-size: var(--font-head);
  margin: 20px 0;
}

.item-sheet[data-sheet-id="disable-dashboard"] p{
  margin: 30px 0;
}




/** CHALLENGE INFO **/

.challenge-desc, .challenge-prize{
  width: min(600px, 100%);
  margin: 0 auto;
  padding: 20px var(--base-padding);
  text-align: center;
  font-weight: 900;
  line-height: 120%;
}

h1.challenge-desc{
  font-size: var(--font-head);
}

p.challenge-desc{
  font-size: var(--font-sub);
  font-weight: 800;
}

h3.challenge-prize{
  font-size: var(--font-sub);
}

h3.challenge-prize:empty{
  display: none !important;
}

img.challenge-banner{
  width: 100%;
  border-radius: var(--border-radius);
}

.challenge-share{
  width: min(600px, 100%);
  margin: 0 auto;
  padding: 0 var(--base-padding); 
    position: absolute;
    bottom: 50px;
    z-index: 4;
}

a.challenge-story-template {
    margin: 0 0 0 auto;
    width: fit-content;
    display: block;
    font-weight: 800;
    color: var(--bg-color);
    background: var(--white-color);
    padding: 5px 15px;
    font-size: var(--font-small);
    border-radius: var(--border-radius);
    cursor: pointer;
    position: relative;
}

/*a.challenge-story-template:hover{
  background: var(--bg-color);
  color: var(--white-color);
}*/

a.challenge-story-template.loading{
  color: var(--white-color);
  pointer-events: none;
  background: var(--white-color);
}

a.challenge-story-template .spinner{
  width: 15px;
  height: 15px;
  top: calc(50% - 6.5px);left: calc(50% - 6.5px);
  pointer-events: none;
}

.challenge-video {
  width: min(300px, 70%);
  margin: 0 auto;
}

img.challenge-image {
  width: min(600px, 100%);
  margin: 0 auto;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

p.challenge-countdown {
  font-size: calc(var(--font-head) * 1.7);
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  contain: layout paint;
}

.export-winners-btn{
  margin: 0 auto 100px auto;
  width: auto;
}


/** PROGRESS POINTS ***/

/*.points-progress:not(:empty) {
    display: flex;
    flex-direction: column;
    box-shadow: var(--soft-shadow);
    width: 100%;
    z-index: 3;
    position: relative;
    gap: 10px;
    border-radius: var(--border-radius);
    padding: min(30px, 5vw);
    background: var(--white-color);
    margin-top: 20px;
}

.points-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.points-progress h3.highlight{
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-sub);
    flex-direction: column;
    gap: 0;
    padding-bottom: 20px;
}

.points-progress-header img {
    width: 40px;
}

.points-progress .points{
  font-size: calc(var(--font-head) * 2);
}*/

.points-progress:empty{
  display: none !important;
}


.notifications:empty ~ .points-progress {
  margin-top: -40px;
}


.points-progress:not(:empty) {
    display: flex;
    box-shadow: var(--soft-shadow);
    width: 100%;
    z-index: 3;
    position: relative;
    gap: 10px;
    border-radius: var(--border-radius);
    padding: min(15px, 2.5vw) min(30px, 5vw);
    background: var(--gold-dark-color);
    margin: 20px 0;
    flex-wrap: wrap;
}

.points-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.points-progress-header .points-desc{
  flex-basis: 75%;
}

.points-progress p{
  color: var(--bg-color);
}

.points-progress h3.highlight span{
  font-weight: 800;
  font-size: calc(var(--font-head) * 1.5);
}



.points-progress-header img {
    width: 40px;
}

.points-amount {
    width: 100%;
    font-weight: 800;
    color: var(--white-color);
    text-align: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    font-size: var(--font-small);
    margin: auto;
    height: fit-content;
}

.day-countdown{
    color: var(--bg-color);
    font-weight: 800;
    flex-basis: 24%;
    font-size: var(--font-small);
    display: flex;
    align-items: center;
    justify-content: end;
}

.day-countdown .icon {
  font-size: var(--font-sub);
}

.points-bar{
  content: '';
  width: 100%;
  border-radius: var(--border-radius);
  height: 28px;
  position: relative;
}

.points-bar:after{
  content: '';
  position: absolute;
  width: 100%;height:100%;
  top:0;left:0;
  background: var(--bg-color);
  opacity: 0.2;
  z-index: -1;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 0 0px #000;
}

.points-bar span.percent{
  background: linear-gradient(0deg, var(--gold-light-color), var(--primary-color));
  box-shadow: 0 0 20px 5px var(--primary-color);
  width: 0%;height: 100%;
  min-width: 10px !important;
  left:0;top:0;
  transition: var(--transition-fun);
  display: block;
  position: relative;
  border-radius: var(--border-radius);
}

.points-bar span.percent:after {
    content: '';
    position: absolute;
    width: 92%;height: 50%;
    background: var(--gold-light-color);
    top:3px;left:4%;
    margin: auto;
    border-radius: var(--border-radius);
    opacity: 0.7;
    mix-blend-mode: overlay;
}

.points-progress-body {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.points-progress-winner{
  min-width:60px;min-height:60px;width:60px;height:60px;
  border-radius: 1000px;
  overflow: hidden;
  border: 5px solid var(--white-color);
  background: var(--primary-color);
  text-align: center;
    position: absolute;
    right: 0;
}

.points-progress-winner img{
  object-fit: cover;
  width: 100%;
}


img.points-progress-coins {
    width: 100px;
    position: absolute;
    right: calc(-1 * min(15px, 2.5vw));
}


.event p{
  position: fixed;
  pointer-events: none;
  top: 100%;left: 50%;
  font-size: calc(var(--font-head) * 3);
  animation: newEventText 2s cubic-bezier(.07,.8,.46,1.06) forwards;
  animation-delay: 0.1s;
  z-index: 999;
  font-weight: 900;
  text-shadow: 0 6px 0 var(--gold-dark-color);
  color: var(--primary-color);
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: var(--gold-medium-color);
/*  background-image: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;*/
}

.event p.highlight-blur{
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 40px 90px var(--primary-color);
    mix-blend-mode: plus-lighter;
}

@keyframes newEventText {
  0% {
    top: 100%;
    transform: translate(-50%, 0) scale(1.25);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    top: 60%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}


.event .event-coin {
  position: fixed;
  pointer-events: none;
  top: 100%;left: 50%;
  z-index: 1000;
  opacity: 1;
  width: var(--coin-size);
  transform: translate(calc(-1 * (var(--coin-size) / 2)), 0) scale(0.2) rotate(0deg);
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-position: center;
  background-image: url('../media/icon-coin.png');
}

.event .event-coin:nth-child(1) {
  animation: newEventCoinLeft 1.5s ease forwards;
}


.event .event-coin:nth-child(2) {
  animation: newEventCoinLeft 1s ease forwards;
}

.event .event-coin:nth-child(3) {
  
  animation: newEventCoinRight 1s ease forwards;
}

.event .event-coin:nth-child(4) {
  animation: newEventCoinRight 1.5s ease forwards;
}

.event .event-coin:nth-child(5) {
  animation: newEventCoinRight 0.7s ease forwards;
}


@keyframes newEventCoinLeft {
  0% {
    transform: translate(calc(-1 * (var(--coin-size) / 2)), 0) scale(0.2) rotate(0deg);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-55vw - var(--coin-size)), var(--coin-end-y)) scale(1) rotate(-200deg);
    opacity: 0;
  }
}


@keyframes newEventCoinRight {
  0% {
    transform: translate(calc(-1 * (var(--coin-size) / 2)), 0) scale(0.2) rotate(0deg);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(55vw, var(--coin-end-y)) scale(1) rotate(-200deg);
    opacity: 0;
  }
}



/*** NOTIFICATIONS / MESSAGES **/

.notifications{
  display: none;
  flex-direction: column;
  gap: 3px;
  padding: var(--base-padding);
  margin-top: -40px;
}

.notifications:not(:empty){
  display: flex;
}

.notification{
  position: relative;
}

.notification .mark-as-read{
    color: var(--white-color);
    cursor: pointer;
    padding: 0 0 8px 8px;
    position: absolute;
    top: 6px;
    right: 16px;
    font-size: var(--font-copy);
    width: var(--font-copy);
    height: var(--font-copy);
    margin: auto;
}

.notification-body {
    display: block;
    background: var(--grey-color);
    padding: 15px 30px 15px 12px;
    border-radius: var(--border-radius);
    width: fit-content;
    max-width: 80%;
    border-bottom-left-radius: 0;
    margin-left: 35px;
    word-wrap: break-word;
    position: relative;
}

.notification-by{
  align-items: center;
  margin-top: 10px;
  gap: 10px;
  display: none;
}

img.profile-small{
    width: 40px;
    height: 40px;
    border-radius: 100%;
    object-fit: cover;
    background: var(--grey-color);
}

.notification:last-child .notification-by{
  display: flex;
}




/** LEADERBOARD **/
/*
.view-leaderboard {
  border-radius: 100%;
  color: var(--primary-color);
  transform: scale(1);
  transition: var(--transition-fun);
  display: none;
  cursor: pointer;
}


[data-challenge-id] .view-leaderboard{
  display: inherit;
}
*/

.view-leaderboard, .view-leaderboard:hover{
    color: var(--white-color);
    font-weight: 800;
    opacity: 1 !important;
    cursor: pointer;
    font-size: var(--font-small);
}



.leaderboard-header{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: -50px;
  padding-bottom: 20px;
}

.leaderboard-header .icon-leaderboard{
  font-size: 90px;
  color: var(--primary-color);
}

.leaderboard-header img{
  width: 70px;
  transform: rotate(13deg);
}

.participant{
  display: flex;
  justify-content: space-between;
  margin: 10px auto;
  width: min(400px, 100%);
  align-items: center;
}

.participant span{
  display: flex;
  align-items: center;
  gap: 10px;
}

#leaderboard .spinner {
    border-top-color: var(--primary-color);
    position: relative;
}


/*** WORKOUTS ***/

.workouts{
  position: relative;
}

.workouts:not(:empty):after {
  content: '';
  background: linear-gradient(-90deg, var(--bg-color) 0%, var(--bg-color-transparent) 80%);
  pointer-events: none;
  position: absolute;
  top:0;right:0;
  width: min(100px, 10vw);
  height: 100%;
  z-index: 2;
}

.workouts:not(:empty):before {
    content: attr(data-content);
    margin: 20px 0 0 0;
    display: block;
    color: var(--white-color);
    font-size: var(--font-head);
    width: 100%;
    box-sizing: border-box;
    font-weight: 800;
    padding: var(--base-padding) calc(var(--border-radius) + var(--base-padding));
    z-index: 3;
    position: relative;
}

.workouts-list .item:first-child{
  margin-left: var(--base-padding);
}

.workouts-list .item:last-child{
  margin-right: min(100px, 10vw);
}

.workouts-list{
  display: flex;
  justify-content: left;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 20px min(110px, 11vw) 60px 4px;
  gap: 2%;
  direction: ltr;
}

.grabbing, .grabbing .item.workout {
    cursor: grabbing !important;
}

.item.workout{
  scroll-snap-align: center;
  flex-shrink: 0;
  transform: scale(1);
  transform-origin: center center;
  transition: transform .5s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden !important;
  width: 80%;
  padding: 60px 20px;
  text-align: center;
  background-size: cover;
  background-position: center;
  min-height: 20vh;
  gap: 3px;
  background-color: var(--grey-color);
  box-shadow: var(--soft-shadow);

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.item.workout p.item-title{
  text-align: center;
}

.item.workout .item-title span{
  z-index: 2;
  position: relative;
}
.item.workout .item-title:after{
  content:'';
  position: absolute;
  top:0;left:0;
  width: 100%;height:100%;
  z-index: 0;
  background: var(--grey-color);
  opacity: 0.8;
}

.item.workout.bubble:after{
  height: 20%;
}

/*
.item.workout:hover .item-title{
  color: var(--primary-color);
}

.item.workout:hover .item-title:after{
  opacity: 0.8;
}
.item.workout:hover{
  box-shadow: 0 0 0 2px var(--primary-color);
  z-index: 10;
}

*/


/*.item.workout[data-type="gym-male"]{
  background-image: url('../media/gym-male-thumb.jpg');
}
.item.workout[data-type="home-male"]{
  background-image: url('../media/home-male-thumb.jpg');
}
.item.workout[data-type="gym-female"]{
  background-image: url('../media/gym-female-thumb.jpg');
}
.item.workout[data-type="home-female"]{
  background-image: url('../media/home-female-thumb.jpg');
}
*/

body[data-gender="male"] [data-type="gym-female"],
body[data-gender="male"] [data-type="home-female"],
body[data-gender="female"] [data-type="gym-male"],
body[data-gender="female"] [data-type="home-male"]{
  display: none !important;
}


.workout-set{
  margin: 10px 0;
  border-bottom: 1px solid var(--grey-color);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-bottom: 10px;
}



.workout-exercise{
  position: relative;
  margin: 3px 0;
  cursor: pointer;
  background: var(--grey-color);
  border-radius: var(--border-radius);
}

.workout-exercise span{
  z-index: 1;
  position: relative;
  font-size: var(--font-sub);
}

.workout-exercise .exercise-reps, 
.workout-exercise .icon-play{
  font-weight: 900;
  color: var(--primary-color);
}


.workout-exercise:not([data-connection]) .icon-play{
  display: none;
}


.workout-exercise .exercise-details{
  display: none;
  overflow: hidden;
  z-index: 1;
}

.exercise-item{
  padding: 15px 20px;
}

.workout-exercise.active-details .exercise-details{
 display: inherit;
  margin: 10px 0 0 0;
}

.active-details .icon-play{
  display: none;
}

.exercise-details img{
  width: 100%;
  position: relative;
  z-index: 1;
}

.exercise-details p{
  font-size: var(--font-small);
  position: relative;
  z-index: 1;
  padding: 10px 20px;
}

.exercise-details .icon-x{
    position: absolute;
    top: 10px;right: 10px;
    font-size: var(--font-sub);
    color: var(--white-color);
    z-index: 10;
    background: var(--bg-color);
    width: 20px;height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    line-height: 0;
}

.item-rest-day{
    background: var(--grey-color);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 10;
    margin: 0 var(--base-padding);
    padding: calc(var(--base-padding) * 2);
    box-shadow: var(--soft-shadow);
}

.item-rest-day .item-title{

}

/*** NUTRITION ****/

.nutrition-header {
    margin: 40px 0 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white-color);
    width: 100%;
    box-sizing: border-box;
    z-index: 3;
    position: relative;
    padding: var(--base-padding) var(--border-radius);
}




.nutrition-header h2 {
  font-size: var(--font-head);
}

.day-macros{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--border-radius);
  margin-bottom: 40px;
}

.macro-progress {
    position: absolute;
}

.macro-progress circle {
    stroke: var(--grey-color);
    transition: var(--transition-fun);
}

.macro-progress circle.macro-progress-completed {
    stroke: var(--white-color);
    stroke-dasharray: 301.10565185546875;
    stroke-dashoffset: 301.10565185546875;
    transform-origin: center;
}

.day-macro-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1;
    flex-direction: column;
    position: relative;
    font-size: var(--font-copy);
    color: var(--white-color);
    width: 33%;
}

.day-macro-circle .macro-goal{
  font-size: var(--font-small);
}

/*
.day-macro-circle .macro-goal:before{
  content: '/';
  display: inline-block;
  margin-right: 10px;
}
*/
.macro-progress-line{
  margin: 5px 0;
  width: 100%;
  background: var(--grey-color);
  border-radius: var(--border-radius);
  height: 7px;
  position: relative;
  overflow: hidden;
}

.day-macro-breakdown {
    width: 62%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.macro-line-header{
  display: flex;
  justify-content: space-between;
}

.macro-progress-line span.macro-progress-completed{
  width: 0%;
  transition: var(--transition-fun);
  background: var(--primary-color);
  position: absolute;
  top:0;left:0;
  height: 100%;
}

.macro-progress-line span[data-macro-goal-progress="fats"]{
  background: var(--fats-color);
}

.macro-progress-line span[data-macro-goal-progress="proteins"]{
  background: var(--proteins-color);
}

.day-meals {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 10px;
}

.add-meal-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin-top: -30px;
}

.add-meal-header h2{
  flex: 1;
  text-align: center;
  margin: 20px 0 30px 0;
}

.add-meal-header .verified-badge{
  width: 60px;min-width: 60px;height:60px;min-height: 60px;
  background: url('../media/icon-star.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
}


.add-meal-select{
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

label.add-meal-option{
  color: var(--white-color);
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  height: 160px;
}

.add-meal-option label {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  font-size: var(--font-small);
}

.add-meal-option label .icon{
  font-size: 50px;
}

.add-meal-option.loading label, .add-meal-option.loading label .icon{
  font-size: 0;
}


.add-meal-option.bubble:after{
  height: 30px;
}

@media all and (max-width: 720px) {

  .add-meal-select{
    justify-content: left;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 min(110px, 11vw) 0 4px;
    gap: 2%;
    direction: ltr;
  }

  label.add-meal-option{
    scroll-snap-align: center;
    flex-shrink: 0;
    transform: scale(1);
    transform-origin: center center;
    transition: transform .5s;
    width: 45%;
    flex-basis: 45%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  .add-meal-select:after {
    content: "";
    background: linear-gradient(-90deg, var(--bg-color) 0%, var(--bg-color-transparent) 80%);
    pointer-events: none;
    position: absolute;
    top: 0px;right: var(--base-padding);
    width: min(100px, 10vw);
    height: 100%;
    z-index: 2;
  }

}



.search-result {
  color: var(--white-color);
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
  padding: 15px;
  background: var(--grey-color);
  border-radius: var(--border-radius);
  margin: 5px 0;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  gap: 6px;
}

.search-result .icon {
  font-size: var(--font-head);
  background: var(--grey-color);
  z-index: 1;
  border-radius: 100px;
  box-shadow: 0 1px 0 1px var(--bg-color);
}

.search-result p {
    flex: 1;
}

.search-result.loading .icon{
  display: none;
}

.search-result .spinner{
  position: relative;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}

.meal-macros {
    flex-basis: 100%;
    display: flex;
    justify-content: flex-start;
    font-size: var(--font-small);
    gap: 10px;
    z-index: 2;
    font-weight: 300;
}

.meal-macros b{
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  position: relative;
  overflow: hidden;
}

.meal-macros b:after{
  content: '';
  position: absolute;
  top:0;left:0;
  width: 100%;height: 100%;
  opacity: 0.25;
}

.meal-macros [data-macro-type="carbs"] { color: var(--primary-color); }
.meal-macros [data-macro-type="carbs"] b:after{ background: var(--primary-color); }

.meal-macros [data-macro-type="fats"] { color: var(--fats-color); }
.meal-macros [data-macro-type="fats"] b:after{ background: var(--fats-color); }

.meal-macros [data-macro-type="proteins"] { color: var(--proteins-color); }
.meal-macros [data-macro-type="proteins"] b:after{ background: var(--proteins-color); }


.item.meal{
  justify-content: flex-start;
  padding: 15px 20px;
  gap: 2.5%;
  background: var(--grey-color);
  box-shadow: var(--soft-shadow);
}

.item.meal.bubble:after {
    height: calc(40% + 15px);
}


.item.meal .item-title{
  position: relative;
  z-index: 2;
  padding: 0;
  flex: 1;
}

.item.meal .verified-badge, h2 .verified-badge{
  width: 40px;min-width: 40px;height:40px;min-height: 40px;
  background: url('../media/icon-star.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
}

h2 .verified-badge{
  margin-right: -40px;
}

.meal-details{
  padding-bottom: 50px;
}

.meal-details h2{
  font-size: var(--font-head);
  padding-bottom: 20px;
}

.meal-details ul, .meal-details ol{
  color: var(--white-color);
}

.meal-details li {
  margin: 10px 0;
  font-weight: 300;
}

.meal-details li b, .ingredient-name b{
  font-weight: 800;
}

.meal-detail-title{
  font-weight: 800;
  padding: 10px 0;
}


form.meal-details-btns{
  position: sticky;
  width: 100%;
  bottom:20px;left:0;
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 0;
  align-items: stretch;
  justify-content: space-between;
}

.meal-details-btns .btn{
  flex: 1;
}

.meal-details-btns .input-select{
  width: 100px;
}

.delete-meal{
  margin-top: 30px;
}

.meal-detail-overview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 2.5% 20px 2.5%;
  border-bottom: 1px solid var(--grey-color);
  margin-bottom: 20px;
}

.meal-detail-overview .overview-item {
  color: var(--white-color);
  text-align: center;
  display: flex;
  justify-content: end;
  align-items: center;
  flex-direction: column;
}

.overview-item .icon, .overview-item .overview-item-breakdown{
    font-size: var(--font-head);
    width: var(--font-head);
    height: var(--font-head);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.overview-item .overview-item-breakdown .macro-chart-small{
  width: 100%;
  justify-content: center;
}

.overview-item .overview-item-breakdown {
    transform: rotate(90deg);
    padding-right: 5px;
}

.overview-item p{
  font-size: var(--font-small);
}

.overview-item p[data-macro-weight="carbs"]{ color: var(--primary-color); font-weight: 800; }
.overview-item p[data-macro-weight="fats"]{ color: var(--fats-color); font-weight: 800; }
.overview-item p[data-macro-weight="proteins"]{ color: var(--proteins-color); font-weight: 800; }

img.meal-image {
  min-height: 270px;
    width: calc(100% + calc(var(--base-padding) * 2));
    position: relative;
    margin-top: -80px;left: calc(var(--base-padding) * -1);
    object-fit: cover;
    max-height: 40vh;
    object-position: center;
    background-color: var(--grey-color);
}

.macro-chart-small{
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  width: min(55px, 10vw);
  gap: 3px;
}

.macro-chart-line{
  display: flex;
  justify-content: flex-end;
}

.macro-chart-line .percent{
  height: 7px;
  display: block;
  border-radius: var(--border-radius);
}

.macro-chart-line[data-line-type="carbs"] .percent {
  background: var(--primary-color);
}
.macro-chart-line[data-line-type="fats"] .percent {
  background: var(--fats-color);
}
.macro-chart-line[data-line-type="proteins"] .percent {
  background: var(--proteins-color);
}

.meal-scan-progress{
  height: 50vh;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background-color: var(--grey-color);
  overflow: hidden;
  border-radius: var(--border-radius);
  position: relative;
}

.meal-scan-progress:after, .meal-scan-progress:before{
  content: '';
  width: 100%;height:100%;
  top:0;left:0;
  position: absolute;
}


.meal-scan-progress:before{
  z-index: 2;
  background: var(--bg-color);
  opacity: 0.75;
}

.meal-scan-progress:after{
  z-index: 1;
  display: block;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background: var(--scan-image);
  animation: unblur 7s ease-in-out infinite alternate;
}

.meal-scan-progress:not([style]):after{
  display: none;
}

@keyframes unblur {
  from { filter: blur(30px); }
  to { filter: blur(5px); }
}


.meal-scan-progress.loading .spinner{
  border-top: 2px solid var(--white-color);
  z-index: 9;
}


#meal-log-progress:not(:empty){
  width: 100%;height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: var(--bg-color);
  gap: 5px;
}


.meal-log-sources{
  text-align: center;
  margin: 0 auto;
  position: relative;
  left: 10px;
  display: flex;
}


.meal-log-source{
  display: none;
  width: 30px;height: 30px;
  border-radius: 1000px;
  background-color: var(--grey-color);
  margin-left: -10px;
  box-shadow: 0 0 15px 0 var(--dark-color);
  position: relative;
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
  animation: move-in 0.4s normal forwards ease-out;
}

.meal-log-source:nth-child(0){ z-index: 10; }
.meal-log-source:nth-child(1){ z-index: 9; }
.meal-log-source:nth-child(2){ z-index: 8; }
.meal-log-source:nth-child(3){ z-index: 7; }
.meal-log-source:nth-child(4){ z-index: 6; }

.meal-log-source:nth-child(0), .meal-log-source:nth-child(1), .meal-log-source:nth-child(2), .meal-log-source:nth-child(3) {
  display: block;
}

@keyframes move-in {
    from {

        transform: scale(0.7) translateX(-16px);
    }
    to {

        transform: scale(1) translateX(0);
    }
}


.meal-log-title{
  text-align: center;
  width: 100%;
}

.meal-log-ingredients{
  width: 100%;
  margin: 0 0 20px 0
}

.meal-log-ingredient{
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  padding: 0;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.meal-log-ingredient:after{
  content: '';
  position: absolute;
  top:0;left:0;width: 100%;height: 100%;
  z-index: 0;
  background: var(--grey-color);
  opacity: 0.5;
}


.meal-log-ingredients > .meal-log-ingredient {
  animation: move-down 0.25s ease-out both;
  animation-delay: calc(var(--position) * 0.55s); /* Delays by slightly more than the entry animation, set to == main animation for no delay */
}

@keyframes move-down {
  from {
    opacity: 0.5;
    transform: translateY(20px) scale(0.98);
    max-height: 0px;
    margin: 0 auto;
    padding: 0;
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 500px;
    margin: 5px auto;
    padding: 20px 15px;
  }
}



.meal-log-ingredient .ingredient-name{
  flex: 1;
  font-size: var(--font-sub);
  z-index: 2;
  text-transform: capitalize;
}

.meal-log-ingredient .ingredient-calories{
  color: var(--primary-color);
  z-index: 2;
  display: flex;
  align-items: center;
}

.meal-log-ingredient .icon{
  font-size: var(--font-sub);
}


.meal-log-ingredient .ingredient-amount:empty,
.meal-log-ingredient .ingredient-name:empty,
.meal-log-ingredient .ingredient-calories:empty {
  min-width: 60px;
  height: 20px;
  border-radius: var(--border-radius);
  width: fit-content;
  z-index: 2;
}

.meal-log-ingredient .ingredient-name:empty{
  min-width: 150px;
}


.placeholder-shimmer, .meal-log-ingredient.loading:after {
  background: linear-gradient(-70deg, var(--grey-color), var(--grey-color), #322621, var(--grey-color));
  /*background: linear-gradient(-70deg, var(--gold-color), var(--gold-color), var(--gold-light-color), var(--gold-color));*/
  background-size: 300% 300%;
  animation: shimmer 2s ease infinite;
}

.placeholder-shimmer:not(:empty){
  animation: none;
  background: inherit;
}




@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}




@media all and (max-width: 720px) {
  .overview-item p{
    font-size: var(--font-extra-small);
  }
}

/*** ALIGNMENT CONVERSIONS ***/

body[lang="ar"] {
  direction: rtl;
}

/*[lang="ar"] .challenge-desc,
[lang="ar"] .challenge-prize,*/

[lang="ar"] .dashboard-head,
[lang="ar"] .item p,
[lang="ar"] .item-sheet-body,
[lang="ar"] .item-sheet-header {
  text-align: right;
}

[lang="ar"] .notification-body {
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: 0;
}

[lang="ar"] .page .body .fullwidth{
  margin-left: auto;
  margin-right: calc(var(--base-padding) * -1);
}

[lang="ar"] .input-label{
  left: auto;right:20px;
}


[lang="ar"] .input-select.filter select{
  text-align: left;
  direction: ltr;
}

/*[lang="ar"] .macro-chart-small .macro-chart-line{
  justify-content: flex-start;
}*/


[lang="ar"] img.meal-image{
  left: var(--base-padding);
}


[lang="ar"] img.points-progress-coins{
    right: inherit;
    left: calc(-1 * min(15px, 2.5vw));
    transform: scaleX(-1);
}

[lang="ar"] .workouts-list .item:last-child, [lang="ar"] .workouts-list .item:first-child{
  margin: 0;
}


[lang="ar"] .overview-item .overview-item-breakdown {
    transform: rotate(-90deg);
}



[lang="ar"] h2 .verified-badge{
  margin-right: 0px;
}

[lang="ar"] .meal-log-ingredient{
  justify-content: end;
}

