@@ -748,20 +748,20 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
748748 // Edit Mode
749749 < div className = "space-y-4 p-4" >
750750 < div >
751- < div className = "flex items-center gap-2 mb-2 overflow-x-auto " >
751+ < div className = "flex flex-col sm:flex-row sm: items-center gap-2 mb-2" >
752752 < input
753753 type = "text"
754754 value = { editMealName }
755755 onChange = { ( e ) => setEditMealName ( e . target . value ) }
756756 placeholder = "Meal name"
757- className = { `flex-1 min-w-0 text-base sm:text-lg font-semibold px-3 py-2 ${ colors . inputBg } border-2 ${ colors . inputBorder } text-white focus:ring-2 focus:ring-primary-700` }
757+ className = { `flex-1 min-w-0 text-base sm:text-lg font-semibold px-3 py-2 ${ colors . inputBg } border-2 ${ colors . inputBorder } text-white focus:ring-2 focus:ring-primary-700` }
758758 />
759759 < button
760760 onClick = { ( ) => setEditMealName ( originalMealName ) }
761- className = "bg-gray-500 hover:bg-gray-600 text-white px-3 py-2 text-xs sm:text-sm font-medium transition whitespace-nowrap flex-shrink-0"
761+ className = "w-full sm:w-auto bg-gray-500 hover:bg-gray-600 text-white px-3 py-2 text-xs sm:text-sm font-medium transition whitespace-nowrap flex-shrink-0"
762762 title = "Reset to original name"
763763 >
764- Reset
764+ Reset Name
765765 </ button >
766766 </ div >
767767 </ div >
@@ -842,18 +842,18 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
842842 { editingComponentIndex === idx ? (
843843 // Edit mode - show nutrition inputs
844844 < div className = "space-y-2" >
845- < div className = "flex justify-between items-center" >
846- < p className = { `text-sm font-medium ${ colors . textPrimary } ` } > { component . component_name } </ p >
845+ < div className = "flex flex-col sm:flex-row sm: justify-between sm: items-center gap-2 " >
846+ < p className = { `text-sm font-medium ${ colors . textPrimary } truncate ` } > { component . component_name } </ p >
847847 < div className = "flex gap-2" >
848848 < button
849849 onClick = { ( ) => setEditingComponentIndex ( null ) }
850- className = "text-xs bg-green-600 text-white px-2 py-1 hover:bg-green-700"
850+ className = "text-xs bg-green-600 text-white px-2 py-1.5 hover:bg-green-700"
851851 >
852852 Done
853853 </ button >
854854 < button
855855 onClick = { ( ) => saveComponentAsCustomFood ( idx ) }
856- className = "text-xs bg-amber-500 text-black px-2 py-1 hover:bg-amber-400"
856+ className = "text-xs bg-amber-500 text-black px-2 py-1.5 hover:bg-amber-400"
857857 >
858858 Save
859859 </ button >
@@ -922,25 +922,25 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
922922 ) : (
923923 // View mode
924924 < div className = "space-y-2" >
925- < div className = "flex justify-between items-start" >
926- < div className = "flex-1" >
927- < p className = { `text-sm font-medium ${ colors . textPrimary } ` } > { component . component_name } </ p >
925+ < div className = "flex flex-col sm:flex-row sm: justify-between sm: items-start gap-2 " >
926+ < div className = "flex-1 min-w-0 " >
927+ < p className = { `text-sm font-medium ${ colors . textPrimary } truncate ` } > { component . component_name } </ p >
928928 < p className = { `text-xs ${ colors . textSecondary } ` } >
929929 Base: { component . base_calories } cal per 100{ component . portion_unit }
930930 </ p >
931931 </ div >
932- < div className = "flex gap-2" >
932+ < div className = "flex gap-2 flex-shrink-0 " >
933933 < button
934934 onClick = { ( ) => setReplacingComponentIndex ( idx ) }
935- className = "text-xs bg-orange-500 text-white px-2 py-1 hover:bg-orange-600"
935+ className = "text-xs bg-orange-500 text-white px-2 py-1 hover:bg-orange-600"
936936 >
937- 🔄 Replace
937+ Replace
938938 </ button >
939939 < button
940940 onClick = { ( ) => setEditingComponentIndex ( idx ) }
941941 className = { `text-xs ${ colors . accentColor } hover:opacity-80` }
942942 >
943- Edit Manually
943+ Edit
944944 </ button >
945945 </ div >
946946 </ div >
@@ -990,17 +990,17 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
990990 ) : (
991991 // Simple food - smart quantity input with Replace button and macro editing
992992 < div className = "space-y-3" >
993- < div className = "flex justify-between items-center " >
993+ < div className = "flex flex-col sm:flex-row gap-2 " >
994994 < button
995995 onClick = { ( ) => setReplacingSimpleMeal ( meal . id ) }
996- className = "text-xs bg-orange-500 text-white px-3 py-1.5 hover:bg-orange-600 transition font-medium"
996+ className = "text-xs bg-orange-500 text-white px-3 py-1.5 hover:bg-orange-600 transition font-medium flex-1 sm:flex-none "
997997 >
998- 🔄 Replace Food
998+ Replace Food
999999 </ button >
10001000 < button
10011001 type = "button"
10021002 onClick = { ( ) => saveSimpleFoodAsCustomFood ( meal ) }
1003- className = "text-xs bg-amber-500 text-black px-3 py-1.5 hover:bg-amber-400 transition font-medium shadow-md"
1003+ className = "text-xs bg-amber-500 text-black px-3 py-1.5 hover:bg-amber-400 transition font-medium shadow-md flex-1 sm:flex-none "
10041004 >
10051005 Save as My Food
10061006 </ button >
@@ -1162,16 +1162,16 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
11621162 </ p >
11631163 </ div >
11641164
1165- < div className = "flex gap-2 pt-2" >
1165+ < div className = "flex flex-col sm:flex-row gap-2 pt-2" >
11661166 < button
11671167 onClick = { ( ) => saveEdit ( meal ) }
1168- className = { `flex-1 ${ colors . buttonPrimary } text-white py-2 px-4 text-sm font-medium transition` }
1168+ className = { `flex-1 ${ colors . buttonPrimary } text-white py-2.5 px-4 text-sm font-medium transition` }
11691169 >
11701170 Save Changes
11711171 </ button >
11721172 < button
11731173 onClick = { cancelEditing }
1174- className = { `flex-1 ${ colors . buttonSecondary } ${ colors . textSecondary } py-2 px-4 text-sm font-medium transition` }
1174+ className = { `flex-1 ${ colors . buttonSecondary } ${ colors . textSecondary } py-2.5 px-4 text-sm font-medium transition` }
11751175 >
11761176 Cancel
11771177 </ button >
@@ -1215,7 +1215,7 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
12151215 </ div >
12161216
12171217 { /* Action Buttons */ }
1218- < div className = "flex gap-2 sm:ml-4 mt-2 sm:mt-0" >
1218+ < div className = "flex gap-3 sm:gap- 2 sm:ml-4 mt-2 sm:mt-0 flex-shrink -0" >
12191219 < button
12201220 onClick = { ( ) => startEditing ( meal ) }
12211221 className = { `${ colors . accentColor } hover:opacity-80 text-xs sm:text-sm font-medium` }
@@ -1226,13 +1226,13 @@ export default function MealList({ refreshTrigger, onMealDeleted, onMealUpdated,
12261226 onClick = { ( ) => handleDuplicate ( meal ) }
12271227 className = "text-secondary-500 hover:opacity-80 text-xs sm:text-sm font-medium"
12281228 >
1229- Duplicate
1229+ Copy
12301230 </ button >
12311231 < button
12321232 onClick = { ( ) => handleDelete ( meal . id ) }
12331233 className = "text-red-500 hover:opacity-80 text-xs sm:text-sm font-medium"
12341234 >
1235- Delete
1235+ Del
12361236 </ button >
12371237 </ div >
12381238 </ div >
0 commit comments