/* The Plus tools (public/ui/plus-tools.js): money bars, week of meals, list total, runs out soon, price memory,
   and the Plus label over the household's own numbers. Colours come from the app's tokens, so Looks and dark mode apply. */

/* The household's own content, faded under a Plus label. Not blurred into nothing: the numbers are theirs. */
.pluslock { position: relative; cursor: pointer; border-radius: var(--radius, 16px); margin: .5rem 0; }
.pluslock .pl-in { opacity: .45; filter: saturate(.4) blur(1.5px); pointer-events: none; user-select: none; }
.pluslock .pl-tag { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .9rem; border-radius: 99px; background: var(--ink); color: var(--card); font-weight: 650; font-size: .9rem; white-space: nowrap;
  box-shadow: 0 6px 18px rgb(0 0 0 / .18); }
.pluslock .pl-tag svg { width: 1em; height: 1em; color: var(--gold, #d4a017); }
.pluslock:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Money: twelve monthly bars, green for used, red for thrown out. */
.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: .25rem; align-items: end; height: 150px; margin: .4rem 0 .6rem; }
.mbar { display: flex; flex-direction: column; align-items: center; height: 100%; gap: .2rem; }
.mbar .mb-col { flex: 1; width: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 6px; background: var(--line); overflow: hidden; }
.mbar .mb-col i { display: block; width: 100%; transition: height .5s ease; }
.mbar i.used { background: var(--ok); } .mbar i.out { background: var(--bad); }
.mbar.now .mb-col { outline: 2px solid var(--ink); outline-offset: 1px; }
.mbar .small { font-size: .68rem; color: var(--muted); }
.mlegend { display: flex; gap: 1rem; margin-bottom: .5rem; }
.mlegend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.mlegend i.used { background: var(--ok); } .mlegend i.out { background: var(--bad); }
.msum2 { display: flex; align-items: center; gap: .8rem; }
.msum2 .nums4 { flex: 1; margin: 0; }
.mring { width: 76px; height: 76px; flex: none; }
.mring circle { fill: none; stroke-width: 3.6; } .mring .bg { stroke: var(--badbg, #f3d6d2); } .mring .fg { stroke: var(--ok); stroke-linecap: round; }
.mring text { font-size: 8.5px; font-weight: 700; text-anchor: middle; fill: var(--ink); }

/* Week of meals */
.mplusrow { display: flex; gap: .5rem; flex-wrap: wrap; margin: -.2rem 0 .8rem; }
.mplusrow > * { flex: 1; min-width: 9rem; justify-content: center; }
.pstart { text-align: center; } .pstart .primary { width: 100%; }
.pweek { padding: .2rem .4rem; }
.pdayrow { display: flex; align-items: center; gap: .4rem; }
.pdayrow .mrow { flex: 1; min-width: 0; }
.pday { display: flex; flex-direction: column; align-items: center; min-width: 2.6rem; line-height: 1.1; }
.pday b { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.pday .small { font-size: 1.05rem; font-weight: 700; }
.pswap { flex: none; }
.ok-t { color: var(--ok); display: block; }

/* Shopping list */
.soonlist .rbar { height: 5px; border-radius: 9px; background: var(--line); margin-top: .3rem; overflow: hidden; max-width: 12rem; }
.soonlist .rbar i { display: block; height: 100%; background: var(--warn); border-radius: 9px; }
.listtotal .row { gap: .5rem; flex-wrap: wrap; }
.listtotal b { font-size: 1.15rem; }

/* Item sheet: price memory */
.pricemem { margin-top: .25rem; }
.pstores { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .35rem; }
.pstore { display: inline-flex; flex-direction: column; padding: .3rem .6rem; border-radius: 12px; background: var(--line); font-size: .75rem; line-height: 1.2; }
.pstore b { font-size: .95rem; }
.pstore.best { background: var(--okbg); color: var(--ok); }

/* Store food: read the date from a photo */
.pdaterow { gap: .35rem; flex-wrap: nowrap; }
.pdatebtn { flex: none; min-width: 44px; }
.pdatebtn.busy { opacity: .5; animation: pdpulse 1s ease-in-out infinite; }
@keyframes pdpulse { 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .pdatebtn.busy { animation: none; } .mbar .mb-col i { transition: none; } }

.rling { margin: .4rem 0 0; padding-left: 1.1rem; }
