
/* EPLARY v441 — multi-food picker, scoped to the client food search sheet. */
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-modal{
 display:flex!important;flex-direction:column!important;
 max-height:min(90dvh,900px)!important;
 overscroll-behavior:contain;
 padding-bottom:max(14px,env(safe-area-inset-bottom,0px))!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-meal-target{
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:10px!important;padding:9px 2px!important;margin:5px 0 9px!important;
 color:#718098!important;font-size:13px!important;font-weight:700!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-meal-target select{
 width:auto!important;max-width:60%!important;min-width:115px!important;
 min-height:39px!important;padding:6px 28px 6px 12px!important;
 background:#f1f5fb!important;color:#183451!important;
 border:1px solid #dae5f3!important;border-radius:12px!important;
 font-size:13px!important;font-weight:750!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-results{
 flex:0 1 auto!important;max-height:35dvh!important;
 overflow:auto!important;overscroll-behavior:contain!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row{
 display:grid!important;grid-template-columns:minmax(0,1fr) 35px!important;
 align-items:center!important;gap:7px!important;
 min-height:66px!important;text-align:left!important;
 padding:10px 11px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row .food-lookup-row-copy{
 display:grid!important;min-width:0!important;gap:3px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row .food-lookup-row-copy strong{
 font-weight:800!important;font-size:13px!important;line-height:1.3!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row .food-lookup-row-copy :is(small,span,em){
 line-height:1.35!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-check{
 width:29px!important;height:29px!important;
 border-radius:9px!important;border:1.5px solid #9aa9bf!important;
 background:#fff!important;color:transparent!important;
 display:grid!important;place-items:center!important;
 font-size:18px!important;font-weight:800!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row.is-selected{
 background:#eff5ff!important;border-color:#9bbefb!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-row.is-selected .food-lookup-check{
 background:#2e79f4!important;border-color:#2e79f4!important;
 color:#fff!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-portion{
 flex:0 0 auto!important;margin-top:10px!important;padding:10px 12px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-next{
 margin-top:10px!important;width:100%!important;min-height:39px!important;
 border:1px solid #d5e3fa!important;border-radius:11px!important;
 color:#2f72d6!important;background:#fff!important;
 font-weight:700!important;font-size:12px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection{
 position:sticky!important;z-index:5!important;
 bottom:0!important;flex:0 0 auto!important;
 margin:12px -10px -10px!important;padding:12px 10px max(10px,env(safe-area-inset-bottom,0px))!important;
 background:#fff!important;border:1px solid #dfe6f0!important;border-radius:17px!important;
 box-shadow:0 -5px 17px rgba(20,43,73,.09)!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection[hidden]{display:none!important}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-head{
 display:flex!important;justify-content:space-between!important;align-items:flex-start!important;
 flex-wrap:wrap!important;gap:3px 10px!important;margin-bottom:8px!important;
 font-size:12px!important;color:#142c4b!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-head strong{
 font-size:14px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-head span{
 font-size:11px!important;color:#708198!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-list{
 display:flex!important;gap:6px!important;overflow-x:auto!important;
 overscroll-behavior-x:contain!important;
 margin:0 0 9px!important;padding:2px 0 4px!important;
 scrollbar-width:thin;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-item{
 display:flex!important;align-items:center!important;flex:0 0 auto!important;
 max-width:210px!important;min-height:39px!important;
 background:#f3f6fb!important;border:1px solid #dce6f2!important;
 border-radius:11px!important;overflow:hidden!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-edit{
 display:flex!important;flex-direction:column!important;align-items:flex-start!important;
 justify-content:center!important;gap:1px!important;
 max-width:158px!important;min-width:0!important;
 padding:6px 9px!important;margin:0!important;background:transparent!important;
 border:0!important;color:#183451!important;text-align:left!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-edit strong{
 font-size:11px!important;max-width:100%!important;overflow:hidden!important;
 text-overflow:ellipsis!important;white-space:nowrap!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-edit small{
 font-size:10px!important;color:#74849a!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-remove{
 width:36px!important;min-width:36px!important;height:39px!important;
 border:0!important;border-left:1px solid #dce6f2!important;
 border-radius:0!important;background:transparent!important;color:#75869d!important;
 font-size:21px!important;
}
body.eplan-redesign.client-ui #foodSearchModal #foodLookupAddToDiary{
 display:block!important;width:100%!important;min-height:44px!important;
 margin:0!important;padding:9px 12px!important;border:0!important;border-radius:13px!important;
 background:#2c78f3!important;color:white!important;
 font-weight:800!important;font-size:14px!important;
}
body.eplan-redesign.client-ui #foodSearchModal #foodLookupAddToDiary:disabled{
 opacity:.5!important;cursor:not-allowed!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-feedback{
 font-size:11px!important;line-height:1.35!important;margin:7px 0 0!important;color:#ab493e!important;
}
body.eplan-redesign.client-ui #foodSearchModal :is(.food-lookup-row,.food-lookup-next,.food-lookup-selection-edit,.food-lookup-selection-remove,#foodLookupAddToDiary):focus-visible{
 outline:2px solid #397dec!important;outline-offset:2px!important;
}
/* OLED: preserve the project's graphite surfaces and readable selection status. */
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-meal-target,
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-head span{
 color:#b6c3d3!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-meal-target select{
 background:#202b39!important;border-color:#455468!important;color:#eaf0f7!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-check{
 background:#141b24!important;border-color:#657486!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-row.is-selected{
 background:#19314b!important;border-color:#548bd3!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-row.is-selected .food-lookup-check{
 background:#357df0!important;border-color:#357df0!important;color:#fff!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-next{
 background:#192531!important;border-color:#455468!important;color:#b5d6ff!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection{
 background:#0b0f14!important;border-color:#435162!important;
 box-shadow:0 -6px 18px rgba(0,0,0,.3)!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-head strong{
 color:#f1f5fa!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-item{
 background:#17232f!important;border-color:#3c4e61!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-edit{
 background:transparent!important;color:#f1f5fa!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-edit small{
 color:#acbacb!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection-remove{
 border-left-color:#3c4e61!important;color:#c3cedc!important;
 background:transparent!important;
}
@media(max-width:350px){
 body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection-head span{
  flex-basis:100%;
 }
 body.eplan-redesign.client-ui #foodSearchModal .food-lookup-modal{
  padding:12px!important;
 }
}

/* v442 — stable iPhone search layout.
   Only the middle of the sheet scrolls; the selected-food tray never
   overlaps or compresses the result cards as the query changes. */
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-modal{
 height:min(90dvh,900px)!important;
 max-height:min(90dvh,900px)!important;
 min-height:0!important;
 overflow:hidden!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-modal > :not(.food-lookup-scroll):not(.food-lookup-selection){
 flex-shrink:0!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll{
 display:block!important;
 flex:1 1 auto!important;
 min-height:0!important;
 min-width:0!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;
 padding:0 2px 6px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll .food-lookup-results{
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-auto-rows:max-content!important;
 align-content:start!important;
 flex:none!important;
 width:100%!important;
 min-width:0!important;
 min-height:0!important;
 height:auto!important;
 max-height:none!important;
 overflow:visible!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll .food-lookup-row{
 width:100%!important;
 height:auto!important;
 max-height:none!important;
 min-height:76px!important;
 overflow:visible!important;
 box-sizing:border-box!important;
 align-self:stretch!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll .food-lookup-row .food-lookup-row-copy{
 display:flex!important;
 flex-direction:column!important;
 align-items:flex-start!important;
 min-width:0!important;
 height:auto!important;
 max-height:none!important;
 gap:4px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll .food-lookup-row .food-lookup-row-copy > *{
 display:block!important;
 width:100%!important;
 min-width:0!important;
 max-height:none!important;
 height:auto!important;
 white-space:normal!important;
 overflow-wrap:anywhere!important;
 word-break:normal!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll #foodLookupPortion:empty{
 display:none!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll #foodLookupPortion:not(:empty){
 margin-bottom:10px!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection{
 position:relative!important;
 bottom:auto!important;
 flex:0 0 auto!important;
 min-width:0!important;
 max-height:none!important;
 margin:9px 0 0!important;
 padding:10px 10px max(10px,env(safe-area-inset-bottom,0px))!important;
 z-index:1!important;
}
@media(max-height:580px){
 body.eplan-redesign.client-ui #foodSearchModal .food-lookup-modal{
  overflow-y:auto!important;
  overscroll-behavior:contain;
 }
 body.eplan-redesign.client-ui #foodSearchModal .food-lookup-scroll{
  flex:0 0 auto!important;
  min-height:110px!important;
  max-height:38dvh!important;
 }
 body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection{
  position:sticky!important;
  bottom:0!important;
 }
}

/* v443 — selected foods: full-width stacked rows and aligned remove controls.
   Prevent horizontal scrolling from pushing X controls outside the tray. */
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-list{
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-auto-rows:minmax(43px,auto)!important;
 align-content:start!important;
 gap:6px!important;
 width:100%!important;
 min-width:0!important;
 max-height:148px!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 margin:0 0 9px!important;
 padding:1px 2px 3px!important;
 box-sizing:border-box!important;
 overscroll-behavior:contain!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-item{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 44px!important;
 align-items:stretch!important;
 gap:0!important;
 width:100%!important;
 max-width:none!important;
 min-width:0!important;
 min-height:43px!important;
 height:auto!important;
 overflow:hidden!important;
 box-sizing:border-box!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-edit{
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 align-items:flex-start!important;
 gap:1px!important;
 width:100%!important;
 max-width:none!important;
 min-width:0!important;
 height:100%!important;
 min-height:43px!important;
 box-sizing:border-box!important;
 padding:5px 10px!important;
 overflow:hidden!important;
 text-align:left!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-edit strong{
 display:block!important;
 width:100%!important;
 min-width:0!important;
 max-width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove{
 position:relative!important;
 display:grid!important;
 place-items:center!important;
 justify-self:stretch!important;
 align-self:stretch!important;
 width:44px!important;
 min-width:44px!important;
 max-width:44px!important;
 height:100%!important;
 min-height:43px!important;
 margin:0!important;
 padding:0!important;
 flex:none!important;
 box-sizing:border-box!important;
 background:transparent!important;
 border:0!important;
 border-left:1px solid #dce6f2!important;
 border-radius:0!important;
 box-shadow:none!important;
 font-size:0!important;
 line-height:0!important;
 cursor:pointer;
 touch-action:manipulation;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove::before,
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove::after{
 content:"";
 position:absolute!important;
 left:50%!important;
 top:50%!important;
 width:14px!important;
 height:2px!important;
 border-radius:2px!important;
 background:currentColor!important;
 pointer-events:none!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove::before{
 transform:translate(-50%,-50%) rotate(45deg)!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove::after{
 transform:translate(-50%,-50%) rotate(-45deg)!important;
}
body.eplan-redesign.client-ui[data-eplan-theme="dark"] #foodSearchModal .food-lookup-selection .food-lookup-selection-remove{
 border-left-color:#3c4e61!important;
 color:#c3cedc!important;
 background:transparent!important;
}

/* v444 — horizontal selected-product chips, with a fixed X inside every chip.
   Keep the v443 CSS-drawn X and compact diary defaults unchanged. */
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-list{
 display:flex!important;
 flex-direction:row!important;
 flex-wrap:nowrap!important;
 align-items:stretch!important;
 gap:6px!important;
 width:100%!important;
 min-width:0!important;
 min-height:44px!important;
 max-height:none!important;
 overflow-x:auto!important;
 overflow-y:hidden!important;
 padding:2px 1px 5px!important;
 margin:0 0 7px!important;
 box-sizing:border-box!important;
 overscroll-behavior-x:contain!important;
 -webkit-overflow-scrolling:touch;
 touch-action:pan-x;
 scrollbar-width:thin;
 scroll-snap-type:x proximity;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-item{
 display:grid!important;
 flex:0 0 clamp(150px,43vw,176px)!important;
 grid-template-columns:minmax(0,1fr) 44px!important;
 align-items:stretch!important;
 width:clamp(150px,43vw,176px)!important;
 max-width:176px!important;
 min-width:0!important;
 min-height:44px!important;
 height:44px!important;
 max-height:44px!important;
 overflow:hidden!important;
 box-sizing:border-box!important;
 scroll-snap-align:start;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-edit{
 flex:1 1 auto!important;
 width:100%!important;
 min-width:0!important;
 max-width:none!important;
 height:44px!important;
 min-height:44px!important;
 max-height:44px!important;
 padding:4px 7px!important;
 gap:0!important;
 overflow:hidden!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-edit strong{
 display:block!important;
 max-width:100%!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 font-size:10px!important;
 line-height:1.25!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-edit small{
 font-size:10px!important;
 line-height:1.15!important;
}
body.eplan-redesign.client-ui #foodSearchModal .food-lookup-selection .food-lookup-selection-remove{
 flex:0 0 44px!important;
 justify-self:stretch!important;
 align-self:stretch!important;
 width:44px!important;
 min-width:44px!important;
 max-width:44px!important;
 height:44px!important;
 min-height:44px!important;
 max-height:44px!important;
 margin:0!important;
 padding:0!important;
 font-size:0!important;
}
