/* Client v3.48 — tablet/phone clipping, shared GIMI control and usability fixes. */
/* Both recipe-card pathways show just reviewed dietary and allergen suitability. */
#recipeGrid .card .recipe-tags,#recipeGrid .card .card-tags,
#recipeGrid .card .recipe-card-tags,#haveResults .card .recipe-tags,
#ideaList .card .recipe-tags{display:none!important}
#recipeGrid .card .recipe-card-flags,#recipeGrid .locked-recipe-card .recipe-card-flags{
 display:flex!important;position:static!important;flex-wrap:wrap!important;
 clear:both!important;min-width:0!important;max-width:100%!important;
 margin:7px 0 0!important;padding:0!important;gap:4px!important;
}
#recipeGrid .card .card-metrics-v249,#recipeGrid .locked-recipe-card .card-metrics-v249{
 display:flex!important;position:relative!important;align-items:center!important;justify-content:flex-start!important;
 flex-wrap:wrap!important;clear:both!important;gap:9px!important;width:100%!important;
 min-width:0!important;height:auto!important;min-height:36px!important;margin:8px 0 0!important;
 padding:0 0 3px!important;overflow:visible!important;
}
@media(max-width:1100px), (hover:none) and (pointer:coarse){
/* Protect the real approved purple plate artwork's aspect ratio while limiting
   its layout footprint, especially iPad and Android cards. */
#recipeGrid .card .card-metrics-v249 .washing-badge:has(.washing-level-9),
#recipeGrid .locked-recipe-card .washing-badge:has(.washing-level-9),
#haveResults .washing-badge:has(.washing-level-9),
#ideaList .washing-badge:has(.washing-level-9){
 display:flex!important;flex:0 0 42px!important;min-width:42px!important;max-width:42px!important;
 width:42px!important;height:36px!important;max-height:36px!important;align-items:center!important;
 justify-content:flex-start!important;padding:0!important;margin:0 6px 0 0!important;
 box-sizing:border-box!important;overflow:hidden!important;
}
#recipeGrid .card .card-metrics-v249 .washing-level-row.washing-level-9,
#recipeGrid .locked-recipe-card .washing-level-row.washing-level-9,
#haveResults .washing-level-row.washing-level-9,#ideaList .washing-level-row.washing-level-9{
 display:flex!important;position:static!important;align-items:center!important;justify-content:flex-start!important;
 width:38px!important;min-width:0!important;max-width:38px!important;height:35px!important;max-height:35px!important;
 flex:0 0 38px!important;margin:0!important;padding:0!important;transform:none!important;
}
#recipeGrid .card .card-metrics-v249 .washing-level-row.washing-level-9>.washing-level-art,
#recipeGrid .locked-recipe-card .washing-level-row.washing-level-9>.washing-level-art,
#haveResults .washing-level-row.washing-level-9>.washing-level-art,
#ideaList .washing-level-row.washing-level-9>.washing-level-art{
 display:block!important;width:38px!important;max-width:38px!important;min-width:0!important;
 height:34px!important;min-height:0!important;max-height:34px!important;
 object-fit:contain!important;object-position:left center!important;transform:none!important;
}
}
/* Do not crowd tag pills: metrics and suitability labels must occupy separate rows. */
#recipeGrid .locked-recipe-card .card-body,#recipeGrid .card .card-body-v12276{min-width:0!important;overflow:visible!important}
#recipeGrid .locked-recipe-card .locked-inline-icon{display:none!important}
/* Cards on phones AND touch tablets: skip side suggestions, not the recipe data.
   The proper recipe-page sides and Save Time side selection remain unchanged. */
@media(max-width:1100px), (hover:none) and (pointer:coarse){
  #recipeGrid .card .recipe-card-servewith,
  #recipeGrid .locked-recipe-card .recipe-card-servewith,
  #haveResults .recipe-card-servewith,#ideaList .recipe-card-servewith,
  .quick-recipe-card .recipe-card-servewith{display:none!important}
}
/* Trim old manual add widgets on non-ingredient tabs; original ingredient entry
   remains unaffected on Savoury and Sweet. */
#whatHavePanel.gimi-other-explore-v348 .gimi-entry-actions-v229,
#whatHavePanel.gimi-other-explore-v348 #haveIngredientsForm,
#whatHavePanel.gimi-other-explore-v348 .have-selected-realfood-row-v211{display:none!important}
/* Shared Surprise Me button now lives immediately above Other guides / Explore cards. */
#whatHavePanel #gimiOtherPanel #randomStart,
#whatHavePanel #gimiExploreMore #randomStart{display:flex!important;align-items:center!important;width:100%!important;
 max-width:420px!important;min-height:92px!important;margin:8px 0 14px!important;
 position:relative!important;float:none!important;transform:none!important;z-index:1!important}
#whatHavePanel #gimiOtherPanel #randomStart img,
#whatHavePanel #gimiExploreMore #randomStart img{max-width:84px!important;max-height:80px!important;object-fit:contain!important}
/* A real centred preview sheet for Explore surprises on iPad, not a scroll target
   somewhere underneath the current page. */
#surpriseModal:has(.gimi-explore-surprise-result).open{position:fixed!important;inset:0!important;
 z-index:12010!important;display:flex!important;align-items:center!important;justify-content:center!important;
 padding:15px!important;overflow:auto!important;box-sizing:border-box!important;background:rgba(36,24,40,.62)!important}
#surpriseModal:has(.gimi-explore-surprise-result).open>.sheet{position:relative!important;display:block!important;
 width:min(520px,96vw)!important;max-width:520px!important;max-height:min(88dvh,800px)!important;
 overflow-y:auto!important;overflow-x:hidden!important;margin:auto!important;box-sizing:border-box!important;
 background:#fff!important;transform:none!important}
/* Clear separate Bought section; checkbox change now has a visible effect. */
#shoppingList .shopping-completed-section{border:2px solid #d1dfd0;border-radius:12px;margin:14px 0 10px;
 background:#f4f8f1;padding:10px 12px}
#shoppingList .shopping-completed-section>summary{cursor:pointer;color:#456b48;font-weight:800;font-size:15px;padding:3px 2px 10px}
#shoppingList .shopping-completed-section .shopping-item{opacity:.83;background:#f6f8f3!important;
 border-bottom:1px solid #dce6d8!important;display:flex!important;justify-content:space-between;align-items:center;gap:10px}
#shoppingList .shopping-completed-section .shopping-item-name{text-decoration:line-through!important;color:#596c5b!important}
#shoppingList .shopping-completed-section .shopping-delete{flex:0 0 auto}
/* Make the new settings subsections independently collapsible without losing
   their original controls, selected preferences or text. */
#about .gimi-settings-subsection{margin:10px 0;padding:0!important;border:1px solid #d5dfd0;
 background:#fff;border-radius:12px;overflow:hidden}
#about .gimi-settings-subsection>summary{cursor:pointer;list-style:revert;font:800 14px/1.4 "Atkinson Hyperlegible Next",Arial,sans-serif;
 color:#5b1665;padding:13px 16px}
#about .gimi-settings-subsection[open]>summary{border-bottom:1px solid #dce5d8}
#about .gimi-settings-subsection>.dietary-preference-setting,
#about .gimi-settings-subsection>.allergen-preference-setting{padding:12px 14px!important;margin:0!important;border:0!important}
/* Alternative ways must always start closed; existing details element opens on tap. */
#recipeDetail .recipe-alternative-details,#cookingMode .cooking-alternative-details{display:block!important;
 margin:8px 0;border:1px solid #d9dfd5;background:#fafcf7;border-radius:11px;padding:7px 10px}
#recipeDetail .recipe-alternative-details>summary,#cookingMode .cooking-alternative-details>summary{
 cursor:pointer;font-weight:800;color:#5b1665;padding:5px 0;line-height:1.35}
#recipeDetail .recipe-alternative-details .method-alternative-ways{margin:6px 0 3px}
/* When scaling, avoid showing OLD quantities until Apply & lock is selected. */
#recipeDetail:has(.recipe-scaler:not(.is-locked)) #scaledIngredients,
#recipeDetail:has(.recipe-scaler:not(.is-locked)) .got-it-ingredient-intro,
#recipeDetail:has(.recipe-scaler:not(.is-locked)) .ingredient-actions{display:none!important}
#recipeDetail:has(.recipe-scaler:not(.is-locked)) .recipe-scale-info-layout::after{
 content:'Ingredient quantities are hidden until you choose Apply & lock.';
 color:#5b1665;font:700 13px/1.4 "Atkinson Hyperlegible Next",Arial,sans-serif;
 display:block;grid-column:1/-1;padding:8px 12px;background:#f7f0f8;border-radius:10px}
#recipeDetail .gimi-restart-guided[hidden]{display:none!important}
#recipeDetail .gimi-restart-guided{display:block!important;margin:7px 0 12px!important;width:100%;min-height:42px}
#cookingMode .gimi-guided-timers[hidden]{display:none!important}
#cookingMode .gimi-guided-timers{display:flex;flex-wrap:wrap;align-items:center;gap:8px;
 margin:6px 0 12px;padding:5px 7px;border-radius:10px;background:#f6f0f7}
#cookingMode .gimi-guided-timer-pill{background:#fff;border:1px solid #baa5c4;
 border-radius:999px;color:#5b1665;font:800 14px/1.3 "Atkinson Hyperlegible Next",Arial,sans-serif;padding:6px 10px;
 font-variant-numeric:tabular-nums}
