/* FONTS: Consolidated in App.razor - removed unused Pacifico, Roboto Slab, Roboto */
/* Active fonts: Raleway (headings), Cabin (body), Bitter (buttons) */

/* Universal box-sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Increased Specificity */
@media (max-width: 768px) {
  #questionnaire-button:hover {
    background-color: #0d6efd !important;
  }
}

.blurry-background {
  backdrop-filter: blur(10px) !important;
}

/**** Weight check in dialog ****/

.weight-checkin-btn {
  min-width: 140px;
  height: 42px;
  padding: 6px 16px;
  background-color: var(--fs-bg-secondary) !important;
  border: 1px solid #dee2e6 !important;
  color: #6c757d !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.weight-checkin-btn.mud-button-filled.mud-button-filled-success {
  background-color: #4caf50 !important;
  border-color: #43a047 !important;
  color: white !important;
}

.weight-checkin-btn:not(:disabled):hover {
  background-color: #e9ecef !important;
  border-color: #ced4da !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.weight-checkin-btn.mud-button-filled-success:hover {
  background-color: #43a047 !important;
}

.weight-checkin-container {
  margin-left: 16px;
}

.mud-tooltip {
  font-size: 12px;
}

.weight-modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  z-index: 1060;
  transition: color 0.2s;
  line-height: 1;
}

.weight-modal-close:hover {
  color: #666;
}

@media (max-width: 576px) {
  .d-flex.align-items-center.justify-content-center {
    flex-direction: column;
    width: 100%;
  }

  /* Override: Keep checkmark items horizontal in landing page sections */
  .why-choose-section .d-flex.align-items-center,
  .beta-section .d-flex.align-items-center {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    justify-content: flex-start !important;
  }

  .MudIconButton {
    position: absolute;
  }

  .MudIconButton:first-child {
    left: 0;
  }

  .MudIconButton:last-of-type {
    right: 0;
  }

  .flex-grow-1 {
    width: 100% !important;
    max-width: none !important;
    padding: 0 40px;
  }

  .weight-checkin-container {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    display: flex;
    justify-content: center;
  }

  .weight-checkin-btn {
    min-width: 140px;
    padding: 6px 16px;
    font-size: 11px;
    letter-spacing: 0px;
  }
}
/*************Dieter Profile accordion**************************/
.accordion-button:not(.collapsed) {
  background-color: var(--fs-bg-secondary);
  color: #0d6efd;
}

.accordion-button:focus {
  box-shadow: none;
}

.material-symbols-outlined {
  font-size: 1rem;
}

.delete-profile-link {
  display: inline-block;
  margin-top: 20px;
  color: #6c757d; /* A subtle gray color */
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s;
}

.delete-profile-link:hover {
  color: #dc3545; /* Red color on hover for emphasis */
}

/***************************************/
/****************Food Selection*********/

/**********************************/
.container {
  max-width: 100%; /* Ensure the container does not exceed the width of the viewport */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.collapse-card {
  width: 100%; /* Ensure the card fits within its container */
  overflow: hidden; /* Prevent overflow */
}

@media (max-width: 576px) {
  .collapse-card {
    margin: 0; /* Remove margin to fit within container */
  }
}

.narrow-column {
  width: 10%; /* Adjust this width as needed */
}

.equal-width-columns th,
.equal-width-columns td {
  width: 20%; /* Ensure all columns have equal width */
  text-align: left;
  vertical-align: middle;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words are broken to fit */
  overflow-wrap: break-word; /* Ensure long words are broken to fit */
}

@media (max-width: 576px) {
  .equal-width-columns th,
  .equal-width-columns td {
    white-space: normal; /* Allow text to wrap on small screens */
    word-break: break-word; /* Break words if necessary on small screens */
  }
  .d-none.d-sm-table-cell {
    display: none !important;
  }
  .d-none.d-sm-table-row {
    display: none !important;
  }
  .d-sm-none {
    display: inline !important;
  }
}

.table-responsive {
  overflow-x: auto; /* Ensure table responsiveness */
}
.parent-container {
  max-width: 100%; /* Ensure the parent container does not exceed the viewport width */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.steps-content {
  width: 100%; /* Ensure the steps content fits within its container */
  overflow: hidden; /* Prevent overflow */
}

@media (max-width: 576px) {
  .steps-content {
    margin: 0; /* Remove margin to fit within container */
  }
}
/*********************************/
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.nutrient-target {
  justify-content: space-between;
}
@media (min-width: 768px) {
  /* md breakpoint */
  .nutrient-target {
    justify-content: flex-start;
  }
  .info-icon {
    margin-left: 0.25rem;
    margin-top: 0; /* Reset margin-top for larger screens */
  }
}
.info-icon {
  margin-top: 0.5rem; /* Add margin-top for smaller screens */
}

.ratio video {
  /* If your video is directly inside the .ratio container */
  border-radius: 0.3rem; /* Adjust the value for the desired rounding */
}

.video-container {
  /* If you have a container around the video */
  border-radius: 0.3rem;
}

.navbar.bg-orange {
  background-color: var(--fs-accent); /* Specific to your navbar */
}

/* Mobile Navigation Global Fixes */
@media (max-width: 991.98px) {
  /* Prevent horizontal scroll when mobile menu is open */
  body.mobile-nav-open {
    overflow-x: hidden;
  }

  /* Fix for mobile navbar positioning issues */
  .navbar {
    position: relative;
    z-index: 1050;
  }

  /* Ensure content doesn't get hidden behind fixed navbar */
  .main {
    position: relative;
  }

  /* Fix navbar collapse issues on mobile */
  .navbar-collapse:not(.show) {
    display: none !important;
  }

  .navbar-collapse.show {
    display: block !important;
  }
}

/* Fix for mobile viewport issues */
@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Prevent text from being too small on mobile */
  .nav-link {
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
  }
}

.text-muted.small {
  font-size: 0.8rem; /* Smaller font size for explanations */
}

.form-control[disabled] {
  /* Styles for disabled input fields */
  background-color: #e9ecef;
  opacity: 0.75;
}

.clickable-text {
  cursor: pointer;
  transition: color 0.3s ease;
}

.clickable-text:hover {
  color: #007bff; /* Bootstrap primary color, or choose your own */
  text-decoration: underline;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Desktop navigation link styles */
@media (min-width: 992px) {
  .nav-link {
    color: #fff !important; /* White text */
    margin-right: 10px;
    transition: color 0.3s ease;
  }

  .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
  }
}

/* Mobile navigation styles are handled in TopNavBar.razor.css */

/*blazorise steps override*/
.step-container {
  width: 7rem !important;
  max-width: 7rem !important;
}

.steps {
  overflow-x: visible !important;
  --bs-gutter-x: 0 !important;
}

.step-container:hover {
  cursor: pointer;
}

.step-circle::before {
  width: calc(7rem + 1rem - 1.5rem) !important;
}

/*end of blazorise steps override*/

.my-logo {
  width: 400px; /* Adjust to your preferred width */
  height: 400px; /* Adjust to your preferred height */
}

::placeholder {
  color: #7a7c6a !important; /* Override browser form placeholder color */
  font-weight: 100 !important;
}

body {
  font-size: 1.8rem; /* Body font size of around 18px */
  color: #263e67;
  font-weight: 300;
}

header {
  color: #263e67;
  font-weight: 300;
}

.container-width {
  max-width: 1170px;
  margin: 0 auto;
}

img {
  max-width: 100%;
}

.basic-grid {
  font-family: inherit;
}

.min-max-label {
  width: 120px; /* Adjust the width as desired */
}

.transparent-btn {
  background-color: rgba(0, 123, 255, 0.1) !important;
}

.transparent-btn:hover {
  background-color: #0d6efd !important;
}

/* Primary font */
h1,
h2,
h3,
h4 {
  font-family: "Raleway", sans-serif;
  color: #c79550;
  font-weight: 700; /* Use bold for headers */
}

h5,
h6 {
  font-family: "Raleway", sans-serif;
  color: #263e67;
  font-weight: 700; /* Use bold for headers */
}

.subtitle {
  font-family: "Raleway", sans-serif;
  color: #74aacb;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem; /* Adjusted spacing for better visual appeal */
}

.navigationFont {
  color: #7a7c6a;
}

.subtitle2 {
  font-family: "Raleway", sans-serif;
  color: #7a7c6a; /* Darkened for better readability */
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.5rem; /* Adjusted spacing for better visual appeal */
}

.macroLabel {
  font-family: "Bitter", sans-serif;
  color: #7a7c6a;
  font-size: 1.5rem;
  font-weight: 500; /* Use bold for headers */
}

.mealMacroAbstract {
  font-weight: 100 !important;
  font-size: 0.8rem;
  font-family: "Cabin", sans-serif;
}

.ShowMoreResultsBtn {
  color: #263e67 !important;
  background-color: #c79550 !important;
}

/*Desktop font sizes*/
h1 {
  font-size: 3rem; /* Headings size of around 35px */
}

h3,
h4 {
  font-size: 2.2rem; /* Subheadings size of around 30px */
}

/*
 * Historical rule: `input { font-size: 1.8rem }` targeted every <input> on the page.
 * Because there is no `html { font-size: 62.5% }` in this codebase, 1.8rem resolves
 * to ~28.8px (not 18px as the original comment implied). That zero-specificity bare-
 * element selector was the root cause of the !important cascade war across components
 * (771 !important declarations in wwwroot/css at the time of this refactor).
 *
 * Scoping to `.form-control` preserves sizing for legacy Bootstrap forms that opt in
 * (ResetPassword, ForgotPassword, DietQuestionnaire, EditMacroTargetsModal, etc.) and
 * lets component-scoped inputs (.unified-serving-input, .quick-add-input, etc.) set
 * their own sizing without fighting a global rule.
 */
.form-control {
  font-size: 1.8rem; /* ~28.8px — legacy Bootstrap form sizing. TODO: retire in favor of design tokens. */
}

/* Preserved from legacy template - actively used in Blazor app */
.light-background {
  background-color: rgb(245, 245, 245);
}

.standart-list:hover {
  background: #7cc4a5;
  cursor: pointer;
}

/* new version modifications */
.steps-container {
  background-color: #ffffff;
}

/*PROFILE*/
.research-used-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.research-info {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}
/* Questionnaire progress bar styling */
.questionnaire-progress-container {
  width: 100%;
  margin-bottom: 1rem;
}
.questionnaire-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #ff9520, #ff8c00);
}
.questionnaire-progress-labels {
  font-size: 0.8rem;
  color: #6c757d;
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.my-orange-progress .mud-progress-linear-bar {
  background: linear-gradient(to right, #ff9520, #ff8c00) !important;
}

/* Blazor-safe chevron transition - prevents DOM manipulation conflicts */
.meal-chevron-icon {
  transition: transform 0.15s ease;
  will-change: transform;
  /* Prevent browser from holding DOM references during transition */
  backface-visibility: hidden;
  transform: translateZ(0);
}

.meal-chevron-icon.expanded {
  transform: rotate(90deg) translateZ(0);
}
