/* Plan, Start, More and Tools screens (round 9). Tokens and logical properties only; laptop rules behind a min-width query. */

/* ---------- Plan: a day's own menu, an empty day, the note mark, the numbers button ---------- */
/* The day menu is a button beside the day's <details>, not inside its <summary> (no control inside a control). The
   summary keeps a gap of the button's size where it used to sit (.pd-menu-gap, before the chevron) and the button
   lies over that gap. From the end edge: the card's border (1px) + its padding (16px) + the chevron (10px with its
   stroke) + the summary's gap (10px) - the gap's pull (4px). From the top: the gap is centred in the header, whose
   height changes with its text, so plan.js sets inset-block-start from the gap itself (placeMenus); the value here is
   the one for a two-line header, used until then. Same place, same 44px target, on a phone and a laptop, in both
   directions. */
.pd-wrap{position:relative;min-width:0}
.pd-wrap>.pd-menu{position:absolute;z-index:1;inset-block-start:var(--s-4);inset-inline-end:calc(var(--s-6) + var(--s-2) + 1px);background:transparent;color:var(--muted)}
.pd-wrap>.pd-menu svg{width:var(--ic-md);height:var(--ic-md)}
.plan-day>summary>.pd-menu-gap{flex:none;inline-size:44px;block-size:44px;margin-block:-6px;margin-inline-end:calc(-1 * var(--s-1))}
/* a long name with no spaces (an exercise the lifter named, a day of 30 letters) wraps inside its row, header or
   sheet instead of widening the screen */
.slot-btn .h3,.pd-title>.h2,.pl-name,.my-plans .lg-t{overflow-wrap:anywhere;min-width:0}
.pd-title>.h2{max-inline-size:100%}
/* a plan with no exercises yet: one quiet line where the muscle balance row would be */
.plan-bal-none{margin:0;max-width:none;text-align:center}
/* what a sheet asks for when Save was refused (a day with no name, a row of "I know my numbers") */
.pl-err,.kn-line.is-err{margin:0;max-width:none;color:var(--bad);font-weight:600}
.pl-err:empty{display:none}
.pd-empty{margin:0;padding:var(--s-4);font-size:var(--t-sm)}
.slot-note{display:inline-flex;vertical-align:middle;margin-inline-start:var(--s-1);color:var(--muted)}
.slot-note .ic{inline-size:var(--ic-sm);block-size:var(--ic-sm)}
.ps-known,.ob-known>.btn{align-self:flex-start;margin-inline-start:calc(-1 * var(--s-2))}
.ob-known{align-items:center;gap:var(--s-2);margin-block-start:calc(-1 * var(--s-2))}
/* sheets that are a short list of actions (Plan options, Day options, a saved plan) */
.pl-menu .btn{justify-content:flex-start}
.pl-menu .grid-2>.btn{justify-content:center}
.pl-copy{min-block-size:220px;font:400 var(--t-sm)/1.5 var(--font-body);resize:vertical;white-space:pre-wrap}
/* what would bring the count of muscles below target down: plain ink, one or two short sentences */
.plan-gap,.ob-gap{max-width:none}
/* the verdict's mark is green only when every muscle is on target */
.ob-verdict.is-low .ic{background:var(--warn-soft);color:var(--warn);stroke-width:var(--ic-stroke)}

/* ---------- "I know my numbers" ---------- */
.kn-list{gap:var(--s-4)}
.kn-row{gap:var(--s-2)}
.kn-row+.kn-row{padding-block-start:var(--s-3);border-block-start:1px solid var(--line-soft)}
.kn-line{min-block-size:1.4em;max-width:none}
.kn-line:empty{display:none}

/* ---------- Edit plan: My plans ---------- */
.my-plans .lg-row{inline-size:100%}
.bp-days{grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.bp-days .day-n{padding:12px 2px}

/* ---------- Tools ---------- */
.tool{gap:var(--s-3)}
.tool-in{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:var(--s-2);align-items:end}
.tool-in .field>span,.tool-in .field>label{font-size:var(--t-sm);color:var(--muted);font-weight:600}
.tool-res{margin:0;font:700 var(--t-lg)/1.3 var(--font-body);max-width:none}
.tool-cap{margin:0;max-width:none}
.tool-t{inline-size:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:var(--t-sm)}
.tool-t th,.tool-t td{padding:6px var(--s-2);text-align:start;border-block-start:1px solid var(--line-soft)}
.tool-t thead th{border-block-start:0;font:var(--f-label);letter-spacing:var(--track-label);text-transform:uppercase;color:var(--muted)}
html[lang="ar"] .tool-t thead th{letter-spacing:0;text-transform:none}
.tool-t tbody th{font-weight:600;color:var(--muted)}
.tool-t td:last-child,.tool-t th:last-child{text-align:end}
/* the reps by reps-left grid: 6 narrow columns, numbers centred, never wider than the card */
.tool-grid{table-layout:fixed}
.tool-grid th,.tool-grid td{padding-inline:2px;text-align:center}
.tool-grid td:last-child,.tool-grid th:last-child{text-align:center}
.tool-grid thead th:first-child,.tool-grid tbody th{text-align:start}
.tool-wrap{overflow-x:auto;max-inline-size:100%}

/* ---------- laptop: Plan in two columns (views.css .split) ---------- */
@media (min-width:1200px){
  /* the side column holds the lifts card, the summary and the muscle bars: taller than a laptop screen, so it scrolls
     with the page instead of sticking */
  .main.wide .plan-split>.split-side{position:static}
}
