/* Log: the pieces of this redesigned screen only (docs/mockups/redesign/); shared ones are
   css/widgets.css. Colours come from the tokens in style.css only. The page lays itself out as one column: the
   shell's .screen class is not on #app for this route, so the column and the card's gap are set here. */
/* width:100%: the auto inline margins would otherwise shrink the column to its content inside the flex #app */
.lgm,.lgm-form{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px;margin-inline:auto}
.lgm .card{display:flex;flex-direction:column;gap:14px;margin:0}
.lgm .card.state{align-items:center}
.lgm .orb .i{width:34px;height:34px}
.lgm .btn.block{margin:0}
.lgm-found:empty{display:none}
.lgm-found{display:flex;flex-direction:column;gap:8px}
.lgm-found .cchip{padding-block:0;padding-inline:14px;border:0;background:var(--a-soft);font-size:.9rem}
.lgm-timechip{display:flex;align-items:center;gap:10px;width:100%;min-height:50px;padding:0 14px;border:0;border-radius:var(--rm);background:var(--surface2);color:var(--ink);font:700 .95rem/1.25 var(--sans);text-align:start;cursor:pointer}
.lgm-timechip .i{color:var(--a)}
.lgm-timechip .link{min-height:0}
.lgm-pair{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:end}
.lgm-photo{min-height:52px}
.lgm-pair .f{margin:0}
.lgm-pair>.lgm-end{grid-column:1/-1}
/* the meal's end: the app's time field, the day only when it is the next one, and Clear */
.lgm-end-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.lgm-end-t{flex:0 1 8rem;min-height:48px}
.lgm-end-day{font-size:.9rem}
.lgm-end-clear{min-height:48px}
.lgm .lgm-note{min-height:52px;font-size:1rem}
.lgm .inside h4{margin:6px 0 0}
.lgm-next{font-size:.88rem}
/* Save never scrolls away under the bottom bar (the sheets' rule, LLD 7.2, which lib/sheet-keyboard.js keeps inside
   #sheet-root only: this form is a page). Sticky, it stays in flow while the form fits and stops above the bar once
   the form is taller than its room (the time panel or the details open): the bar is 70 px and the + rises 12 px over
   it, so 90 px clears both. From 900 px and on a phone on its side the bar is a rail at the side. Solid when it has
   nothing to save yet, as the floating Save is, since it can stand over the form's text. */
.lgm-form>#log-save:not(.lgm-float){position:sticky;bottom:calc(env(safe-area-inset-bottom) + 90px);z-index:2}
.lgm-form>#log-save[disabled]{opacity:1;background:var(--surface2);color:var(--mut)}
@media (min-width:900px),(max-height:499px) and (min-width:560px){.lgm-form>#log-save:not(.lgm-float){bottom:calc(env(safe-area-inset-bottom) + 12px)}}
.lgm .time-more{margin-top:8px}
/* What was heard, for the voice step that moves onto this page */
/* The voice sheet (views/voice-sheet.js): the Log page's look in a sheet. Its own heading replaces the sheet's,
   which stays for the close button and as the dialog's name. */
.sheet[data-sheet=voice] .sheet-head h2{visibility:hidden}
.vce{display:flex;flex-direction:column;gap:14px}
.vce .card{display:flex;flex-direction:column;gap:14px;margin:0}
.vce .btn.block{margin:0}
.vce-listen{gap:18px}
.vce-orb{cursor:pointer}
.vce-orb:disabled{opacity:.5;cursor:default}
.vce-heard{min-height:1.5em;font-size:1.2rem;font-weight:600;color:var(--ink2)}
.vce-heard .fin{color:var(--ink)}
.vce-wave{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;height:44px;direction:ltr}
.vce-wave i{width:4px;border-radius:2px;background:var(--a);animation:vcewave 1s ease-in-out infinite alternate}
@keyframes vcewave{from{transform:scaleY(.35)}to{transform:scaleY(1)}}
@media (prefers-reduced-motion:reduce){.vce-wave i,.vce-orb.pulsing{animation:none}}
.vce-card{text-align:start}
.vce-quote{margin:0;padding:14px 16px;border-inline-start:3px solid var(--a);background:var(--surface2);border-radius:var(--rm);font-size:1.1rem;font-weight:600;color:var(--ink)}
.vce-earlier{display:flex;flex-direction:column;gap:2px;font-size:.88rem;color:var(--mut)}
.vce-changes{font-size:.88rem;color:var(--ink2)}
.vce .sec{margin:0}
.vce-card .cchips{margin:0}
.vce-card .cchip{padding-block:0;padding-inline:14px 6px;border:0;background:var(--a-soft);font-size:.9rem}
.vce-time{margin:0;min-height:50px;padding-block:8px;padding-inline:14px;border-radius:var(--rm);background:var(--surface2)}
.vce-time>.i{color:var(--a)}
.vce-time .link{min-height:0;align-self:center}
.vce-ask{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:var(--rm);background:var(--d-soft);color:var(--ink)}
.vce-ask .chips{gap:8px}
.vce-edit{display:flex;flex-direction:column;gap:10px}
.vce-edit .f{margin:0}
.vce-err{text-align:start;margin:0}
.vce-lang{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.vce-privacy{margin:0}
.vce .rowbtns{flex-wrap:wrap}
.vce .rowbtns .btn{flex:1 1 130px;min-width:0;padding-inline:10px}
.vce-time{line-height:1.35}
/* Save floating just above the phone's keyboard while the meal text is typed (views/log-keyboard.js sets --kb) */
/* It is solid while it floats over text: no transition or dimming shows the row under it through it. A Save with
   nothing to save yet stays solid too, in the muted surface colour. While it floats the page keeps room under its
   content for the keyboard and the button (--save-h), so the text box and the time row can scroll clear of it. */
.lgm .btn.lgm-float{position:fixed;inset-inline:16px;bottom:calc(var(--kb) + 8px);z-index:var(--z-controls);width:auto;margin:0;box-shadow:var(--shadow);opacity:1;transition:none;transform:none}
.lgm .btn.lgm-float[disabled]{background:var(--surface2);color:var(--mut);box-shadow:var(--shadow);pointer-events:auto}
.lgm.lgm-kb{padding-bottom:calc(var(--kb) + var(--save-h) + 24px)}
/* The floating Save's row carries the page's surface, as a sheet's pinned row does (css/sheet.css .sk-float): a full
   width band from 10 px over the button down to the keyboard, under the button, so the form's lines do not read
   through the gaps beside and under it. */
.lgm.lgm-kb::after{content:"";position:fixed;inset-inline:0;bottom:var(--kb);height:calc(var(--save-h) + 18px);z-index:calc(var(--z-controls) - 1);background:var(--surface);border-top:1px solid var(--line);pointer-events:none}
.lgm.lgm-kb #meal-text,.lgm.lgm-kb .lgm-timechip{scroll-margin-bottom:calc(var(--kb) + var(--save-h) + 16px)}
/* Sleep and activity times: an activity's two clock fields (the two-step picker, lib/time-pick.js) or the sleep panel, the length live under them, five stars */
.spn{display:flex;flex-direction:column;gap:8px}
.spn .grid2 .f{margin:0}
.sp-time{min-height:60px;font-size:1.3rem;font-weight:600;text-align:center;padding-inline:8px;font-variant-numeric:tabular-nums}
.sp-live{margin:0;min-height:1.4em;font-size:1.05rem;font-weight:600;color:var(--ink);text-align:center}
.sp-err{margin:0;padding:8px 12px;border-radius:var(--rm);background:var(--d-soft);color:var(--ink);font-size:.9rem}
.sp-stars{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:2px}
.sp-star{display:grid;place-items:center;min-width:52px;min-height:52px;font-size:2rem;line-height:1;color:var(--mut);cursor:pointer;border-radius:var(--rm)}
.sp-star:has(input:checked),.sp-star:has(input:checked)~.sp-star{color:var(--a)}
.sp-star:has(input:focus-visible){outline:2px solid var(--a)}
.copy-total{border:0;padding:0;margin:0;display:grid;gap:8px}
.copy-total legend{padding:0;margin-bottom:6px}
.copy-total label{display:flex;align-items:center;gap:8px;min-height:32px}
/* The weight field between its two steps (views/log-context.js kgField): the row spans the form's two columns, the
   steps are 48 px targets, the number large enough to read the tenth at a glance */
.wkg{grid-column:1/-1}
.wkg-row{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:8px;align-items:center}
.wkg-row input{text-align:center;font-size:1.3rem;font-weight:600;font-variant-numeric:tabular-nums}
.wkg .wkg-step{min-width:48px;width:48px;padding:0;font-size:1.4rem}
.wkg-last{margin:0}
/* the context form's name field, hidden while the workout has a kind of its own (views/log-context.js ctx-type) */
.f[data-ctx-name][hidden]{display:none}
/* the details fold says what it does: closed, "+ Add details"; open, "Details" (both in the summary, one shown) */
.lgm details.fold:not([open])>summary .lgm-opened,.lgm details.fold[open]>summary .lgm-shut{display:none}
.lgm details.fold>summary .lgm-shut{display:inline-flex;align-items:center;gap:8px}
