 /* === Meal Planner Core Layout === */
/*********sticky scroll from meal tabs***************/

.meal-sticky-header {
  position: sticky;
  top: 20px;
  z-index: 999;
  background: #fff;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.meal-section {
  display: none !important;
  background: #f0fdf0;
  border: 1px solid #cceacc;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.meal-section.active {
  display: block !important;
}
/* === Tab Bar === */
.tab-bar {
  display: flex;
  gap: 2px;/* MAKE LARGER ON BIG SCREEN*/
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab {
  /*padding: 8px 16px;*/
  background: #ddd;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}


/*breakfast, lunch, dinner, snack tabs) */
@media (max-width: 600px) {
.tab{
    width: 60px;
    font-size: 11px;/*MAKE BIGGER LARGE SCREENS*/
	}
}


.tab.active {
  background: #28a745;
  color: white;
  font-weight: bold;
}
/* === Help Text & Planner List === */
.help-text {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}
.planner-list {
  margin-top: 10px;
  background: #eef5ee;
  padding: 0px;
  border-radius: 6px;
  min-height: 40px;
  white-space: pre-line;
}


/* === Custom Entry Fields === */
.custom-entry {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.custom-entry input {
  flex-grow: 1;
  padding: 6px;
}
.custom-add-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}
/* === Pantry Filter Bar === */
.filter-bar {
  margin-top: 1px;
  margin-bottom: 1px;
}
.filter-bar input {
  padding: 6px;
  width: 100%;
  max-width: 300px;
  font-size: 14px;
}

.meal-sticky-header input[type="text"] {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 1px;
}

/* === Pantry Card Grid === */
.pantry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
.pantry-item {
  position: relative;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  width:auto;
  height: 125px;/*Leave space for diet insertion*/
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}
/* === Pantry Card Content Toggle === */
.pantry-item .food-name,
.pantry-item .nutrients,
.pantry-item .card-meta-row {
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pantry-item .nutrients {
  display: none; /* Initially hide nutrients */  
}


.pantry-item .nutrients, .pantry-item .card-meta-row {
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 100%;
}

.pantry-item.expanded .food-name,
.pantry-item.expanded .card-meta-row,
.pantry-item .more-link {
  display: none; /* Initially show 'more...' */
}

.pantry-item.expanded .nutrients {
  display: block; /* Show nutrients when expanded */
}

.pantry-item.expanded .close-link {
  display: inline;
}
/* === Inline Text Link Toggle Controls === */
.pantry-item .textlink {
  color: #0077cc;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 4px;
  font-size: 13px;
}
/* === Add Button === */
.pantry-item .add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 14px;
  background: #a9e7b8;;
  color: black;
  border: none;
  padding: 4px 8px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}
/******modify for this version of nutritabs **********/
.nutri-name{font-size:8px;}
.nutri-level{font-size:8px;}
.section-label{font-size:10px;}
.section-line {
    font-size: 10px;
    margin: 6px 0 10px;
}

.cal-circle {
    width: 30px;
    height: 30px;
    font-size: 10px;
    text-align: center;
	line-height:0.9;
}

.card-indicator {
    display: flex;
    justify-content: space-evenly;
    align-items: baseline;
}

.pantry-item .add-btn {
    position: absolute;
    top: 8px !important;
    right: 8px;
    font-size: 14px;
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.add-btn{height:25px;}

/*
.pantry-item{
	height:100px;
}
*/

.pantry-item.expanded {  
height: 90px; /* Adjust to your desired height */
width:100%;
  
}

.pantry-item.expanded .more-link {
  display: none;  /* Hide "more..." when expanded */
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-indicator,
.card-range {
  flex: 1 1 auto;
}

.pantry-item .food-name, .pantry-item .nutrients {
    width: 100%;
}

.close-link {
    display: none; /* initially hide the close link */
}

.pantry-item.expanded .close-link {
    display: inline; /* Show the close link when expanded */
}

.pantry-item .more-link {
    display: inline; /* Initially show 'more...' */
}
/********************Selected/Added to MealPlan Foods in Food Preferences**************/

/*the added food block / container has a class of foodprefTag*/
.foodprefTag {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #cde3cd;
  margin: 3px;
  padding: 0px;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s ease;
  max-width: 100%;
}



.foodprefTag button {
  margin-left: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.foodprefTag input {
  border: none;
  padding: 3px 6px;
  font-size: 14px;
  max-width:50%;
}

/**************foodprefTag contriols to shrink and expand meal planner***************************/

/*
.foodprefTag-controls {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px;
  z-index: 2;
  
}
*/
.foodprefTag-controls {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px;
  z-index: 2;
}

/* Only when shrunk, reposition controls */
.foodprefTag.shrunk .foodprefTag-controls {
  position: relative;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}



.foodprefTag-controls button{
  font-size: 12px;
  padding: 1px 4px;
  margin: 3px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.foodprefTag-controls button shk{
	background:red;
}
	
	
.foodprefTag-controls button exp{
	background:green;	
}
/*
.foodprefTag.shrunk {
  zoom: 0.5 !important;
  display: inline-block;
  margin: 4px;
  max-width: unset; /* ✅ Overrides the default max-width */
}
*/

.foodprefTag.shrunk {
  zoom: 0.5 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 3px;
  max-width: calc(25% - 6px);
  flex: 1 1 calc(25% - 6px);

}







/*this is the food item and delete*/
.row1 {
  display: flex;
  justify-content: space-between; /* label left, trash right */
  align-items: center;
  gap: 0px;
}

/*this is the row containing the slider, info and counter*/
.row2 {
    display: flex;
    /* flex-direction: column; */
    gap: 4px;
}

/*The dynamic range input on food preferences */
.qty-slider{accent-color: #4CAF50;}

/*The dynamic range input COUNTER on food preferences */
.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  
}

.qty-value {
  font-weight: bold;
  color: #4CAF50;
  min-width: 50px;
  text-align: right;
  font-size:12px;
}

/*INFO PANEL*/
.info-panel {
  position: absolute;
  z-index: 1000;
  width: 250px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size:12px;
}

.close-btn {
  font-size: 14px;
  color: #007BFF; /* Bootstrap blue or adjust as needed */
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}
.close-btn:hover {
  color: #0056b3;
}


/*************style row three of selected items-cook mwethod radio buttons****************/
.row3 {
  display: flex;
  /*gap: 1.5em; *//*space between options */
  /*margin-top: 0.5em;*/
  align-items: center;
  font-size:12px;
}

.cook-option {
  display: flex;
  align-items: center;
  gap: 0.2em; /* space between label and radio */
}

/* Optional: style labels */
.cook-option label {
  font-weight: 500;
  cursor: pointer;
}

/* Optional: style radios */
.cook-option input[type="radio"] {
  accent-color: #0077cc; /* modern browsers */
  width: 1em;
  height: 1em;
}


/*end radios*/

/******tooltip equiv mobile friendly to explain cooking methods**********/
#myHelp {
  display: none;
  position: absolute; /* Adjust as needed */
  background-color: #eee;
  border: 1px solid #ccc;
  padding: 5px;
  z-index: 10;
}

.help-icon {
  display:inline-block;
  cursor: pointer;
  width: 20px;
  height: 20px;
  text-align: center; 
  border-radius: 50%;
  color: white;          /* white question mark */
  background:black;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Media query for smaller screens (optional) */
@media (max-width: 600px) {
  #myHelp {
    position: fixed;  /* Cover the screen */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center popup */
    width: 80%;  /* Adjust width */
    box-sizing: border-box; /* Include padding/border in width */
  }
}

/**change visibility on shrunk*/
.foodprefTag.shrunk .emoji,
.foodprefTag.shrunk .row2,
.foodprefTag.shrunk .row3,
.foodprefTag.shrunk .qty-value,
.foodprefTag.shrunk .info-btn,
.foodprefTag.shrunk .close-btn,
.foodprefTag.shrunk .qty-slider,
.foodprefTag.shrunk .cook-option,
.foodprefTag.shrunk .foodprefTag-controls button:not(:first-child) {
  display: none !important;
}

.foodprefTag.shrunk .row1 button {
  display: none !important;
}



.foodprefTag.shrunk .foodprefTag-controls button:first-child {
  font-size: 15px; 
  background: #28a745;
  color: white;
}

