:root {
  --black: #0d121c;
  --white: #fff;
  --text: #202939;
  
  --secondary-font: "Manrope", sans-serif;

  /* new colors */

  --primary-lighter: #fff2f1;
  --primary-light: #fbd5d2;
  --primary: #f3796f;
  --primary-dark: #b65b53;
  --primary-darker: #552a27;

  --secondary-light: #667387;
  --secondary: #08324f;
  --secondary-dark: #06263b;
  --secondary-darker: #03121c;

  --blue-light: #e2ecf3;
  --blue-medium: #CAD2F2;
  --blue: #347eb1;
  --blue-darker: #0a4771;

  --gray-white: #fdfdfd;
  --gray-light: #f3f4f8;
  --gray-normal: #A6A6A6;
  --gray-black: #191919;

  --red-light: #f3baba;
  --red: #d72121;
  --red-dark: #c21e1e;
  --red-darker: #4b0c0c;

  --orange: #F2A76F;
  --orange-light: #F4BB95;
  --orange-dark: #C78043;
  --orange-darker: #643E1D;

  --yellow-light: #fbe8c4;
  --yellow: #f1b640;
  --yellow-dark: #b58930;
  --yellow-darker: #544016;

  --green-light: #bfebd1;
  --green: #2fc069;
  --green-dark: #23904f;
  --green-darker: #104325;

  --protein: #FF2C3A;
  --carbs: #23904F;
  --fat: #F1B640;
  --kcal: #347EB1;
  --protein-light: #FFD5D7;
  --carbs-light: #D2F1DF;
  --fat-light: #FBE9C5;
  --kcal-light: #EFF8FF;

  --very-happy: #ccefda;
  --happy: #fef9c1;
  --neutral: #f6f6f9;
  --sad: #fbecd0;
  --very-sad: #f6c8c8;
  --very-happy-normal: #2FC069;
  --happy-normal: #F2A76F;
  --neutral-normal: #A6A6A6;
  --sad-normal: #F1B640;
  --very-sad-normal: #F3796F;

  /* new colors */

  --purple-25: #fffbfb;
  --purple-50: #fef6f6;
  --purple-100: #fff2f1;
  --purple-200: #ffe4e1;
  --purple-300: #ffcdc7;
  --purple-400: #ff7c6d;
  --purple-500: #fa6d5c;
  --purple-600: #f84e3b;
  --purple-800: #c12614;
  --purple-900: #a02214;
  --purple-950: #842318;

  --blue-50: #e0ecf4;
  --blue-400: #0a4771;
  --blue-500: #08324f;

  --gray-25: #fcfcfd;
  --gray-50: #f8fafc;
  --gray-100: #eef2f6;
  --gray-200: #e3e8ef;
  --gray-300: #cdd5df;
  --gray-400: #9aa4b2;
  --gray-500: #697586;
  --gray-600: #4b5565;
  --gray-700: #364152;
  --gray-800: #202939;
  --gray-900: #121926;
  --gray-950: #0d121c;

  --mercury-25: #fafafa;
  --mercury-50: #f7f7f7;
  --mercury-100: #ededed;
  --mercury-200: #e2e2e2;
  --mercury-300: #c8c8c8;
  --mercury-400: #adadad;
  --mercury-500: #999999;
  --mercury-600: #888888;
  --mercury-700: #7b7b7b;
  --mercury-800: #676767;
  --mercury-900: #545454;
  --mercury-950: #363636;
}

.global-infinite-scroll-back-to-top-button {
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: none;
  background: var(--blue-500);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  z-index: 60;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
}

* {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 300;

  /* background-color: var(--mercury-25); */
  background-color: #f8f9fb;
  color: var(--text);

  overflow: hidden;
}

main {
  height: calc(100vh - 100px);
  overflow-y: scroll;
  overflow-x: hidden;
}

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

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  border-radius: 16px;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 15px;
  background: var(--primary-light);
  border-radius: 16px;
}

input[type="range"]::-moz-range-track {
  height: 15px;
  background: var(--primary-light);
  border-radius: 16px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 15px;
  width: 15px;
  background-color: var(--white);
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: -407px 0 0 400px var(--primary);
}

input[type="range"]::-moz-range-thumb {
  height: 15px;
  width: 15px;
  background-color: var(--white);
  border-radius: 50%;
  border: 1px solid var(--primary);
  box-shadow: -407px 0 0 400px var(--primary);
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.fi {
  display: flex;
}

.heading-xl {
  font-size: 26px;
}

.heading-lg {
  font-size: 24px;
}

.heading-md {
  font-size: 22px;
}

.heading-sm {
  font-size: 20px;
}

.subtitle-lg {
  font-size: 18px;
}

.subtitle-sm {
  font-size: 16px;
}

.body-lg {
  font-size: 16px;
}

.body-md {
  font-size: 14px;
}

.body-sm {
  font-size: 12px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--blue-light);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.7rem;
  text-align: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-secondary {
  color: var(--primary);
  background-color: var(--white);
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.7rem;
  text-align: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.font-secondary {
  font-family: var(--secondary-font) !important;
}

*::-webkit-scrollbar {
  display: none;
}

/* Loading Spinner Animation - Global */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes food-record-btn-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(243, 121, 111, 0.45);
    transform: scale(1);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(243, 121, 111, 0);
    transform: scale(1.01);
    opacity: 0.92;
  }
}

#food-record-btn.food-record-btn-pending {
  /* Controlled by profile FoodDiaryButtonHandler */
  animation: food-record-btn-pulse 1.6s ease-in-out infinite;
}

::placeholder {
  color: var(--gray-normal); 
  opacity: 1; 
}

:-ms-input-placeholder { 
  color: var(--gray-normal);
}
::-ms-input-placeholder { 
  color: var(--gray-normal);
}

/* Account Switch Drawer */
.account-card--active {
  box-shadow: 0 8px 20px rgba(29, 40, 61, 0.06);
}

.account-status--active {
  background-color: var(--secondary);
  color: white;
}

.account-status--inactive {
  background-color: var(--blue-50);
  color: var(--blue-50);
}

.account-avatar--no-image {
  background-color: var(--secondary);
  color: white;
}
