/* suite.css: the shared pieces from Christopher's 10/26 feedback (see suite.js). Class names start s-, so they can move into the
   kit after his yes without colliding with it. House rules: ink, light gray fills, white items inside, no borders inside the
   panel, no side stripes or bands, one filled button a screen (none of these pieces adds one). Loads after app.css. */

/* ---- the six-app switcher: the two new glyphs at the kit's size */
.s-glyph { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- Help with this screen: the button in the top bar and the phone bar, the panel (the kit's k-help parts) */
.s-help-btn { display: inline-flex; align-items: center; gap: var(--ol-sp-8); min-height: var(--ol-h); padding: 0 var(--ol-sp-12); border: 0; border-radius: var(--ol-r); background: none; color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); font-weight: 600; cursor: pointer; white-space: nowrap; }
.s-help-btn svg { width: 18px; height: 18px; flex: none; }
.s-help-btn[aria-expanded="true"] { background: var(--ol-wash); }
.s-help-btn:focus-visible { outline: 2px solid var(--ol-ink); outline-offset: 2px; }
.s-help-btn.s-icon-only { width: var(--ol-h); padding: 0; justify-content: center; }
.s-help-btn.s-icon-only span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the k-help-body tweaks sit in each app's css under its [data-app] scope, so the kit check stays clean (app.css, pass 8c) */
/* on a wide screen the open panel sits beside the page, not over it: nothing on the page is covered while Help is open (CH 110626) */
@media (min-width: 1100px) { body.s-help-open .k-main { margin-right: 404px; } }
.s-help { top: 64px; bottom: auto; max-height: calc(100vh - 88px); display: flex; flex-direction: column; }
.s-keys span { white-space: nowrap; }
.s-help-more { font-size: var(--ol-fs-13); color: var(--ol-ink-2); }
.s-help-copy { padding: 0 var(--ol-sp-16) var(--ol-sp-12); font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-help-x { margin-left: auto; }
@media screen and (max-width: 900px) {
  .s-help { top: 64px; left: var(--ol-sp-16); right: var(--ol-sp-16); width: auto; max-height: calc(100vh - 160px); }
}

/* ---- one shared time grid. The ticks, every person's bar and the busy-times bars sit in boxes of the same width, so their
   left and right edges match to the pixel and 8:00 lines up under the 8. */
.s-grid { --s-grid-pad: 0px; }
.s-ticks { position: relative; height: 20px; margin: 0 var(--s-grid-pad); font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-ticks::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--ol-rule); opacity: .5; }
.s-tick { position: absolute; bottom: 0; height: 6px; border-left: 1px solid var(--ol-rule); }
.s-tick b { position: absolute; bottom: 6px; left: 0; transform: translateX(-50%); font-weight: 400; line-height: 1; }
.s-tick.is-start b { transform: none; }
.s-tick.is-end b { transform: translateX(-100%); }
.s-track { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--ol-wash-2); }
.s-span { position: absolute; top: 0; bottom: 0; left: min(var(--l), calc(100% - 48px)); width: max(var(--w), 48px); max-width: 100%; border-radius: 4px; background: var(--ol-ink); }
.s-busy-track { position: relative; height: 54px; margin: 0 var(--s-grid-pad); }
.s-busy-col { position: absolute; bottom: 0; top: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0 1px; }
.s-busy-lab { display: block; height: 18px; padding-top: 4px; font-style: normal; font-size: var(--ol-fs-11, 11px); line-height: 14px; text-align: center; color: var(--ol-ink-2); white-space: nowrap; }
.s-busy-col i { display: block; width: 100%; min-height: 0; border-radius: 2px 2px 0 0; background: var(--ol-ink-2); opacity: .35; }
.s-busy-col i.is-bad { background: var(--ol-danger); opacity: 1; }

/* ---- option cards: side by side when the decision is wide enough, stacked on a phone. Each card keeps every detail. */
.s-call { container-type: inline-size; }
.s-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ol-sp-8); margin-top: var(--ol-sp-16); background: none; border: 0; border-radius: 0; overflow: visible; }
.s-cards > .s-card { display: flex; flex-direction: column; align-items: stretch; gap: var(--ol-sp-4); width: 100%; min-height: 0; margin: 0; padding: var(--ol-sp-12) var(--ol-sp-16) var(--ol-sp-16); border: 0; border-radius: var(--ol-r); background: var(--ol-surface); color: var(--ol-ink); text-align: left; font: inherit; cursor: pointer; }
.s-cards > .s-card[aria-pressed="true"] { background: var(--ol-surface); box-shadow: inset 0 0 0 2px var(--ol-ink); }
.s-cards > .s-card:focus-visible { outline: 2px solid var(--ol-ink); outline-offset: 2px; }
.s-cards > .s-card[disabled] { cursor: not-allowed; color: var(--ol-muted); }
.s-card-top { display: flex; align-items: center; gap: var(--ol-sp-8); min-height: 24px; }
.s-card-top .s-sugg { margin-left: auto; font-size: var(--ol-fs-13); font-weight: 600; color: var(--ol-ink); }
.s-card-ask { font-size: var(--ol-fs-17); font-weight: 600; line-height: 1.3; }
.s-card-desc { display: block; font-size: var(--ol-fs-13); color: var(--ol-ink-2); }
.s-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ol-sp-8) var(--ol-sp-12); margin-top: auto; padding-top: var(--ol-sp-8); font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-card-meta:empty { display: none; }
@container (min-width: 600px) {
  .s-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@container (min-width: 720px) {   /* room for every option on one line: four cards stay side by side, same top, same height */
  .s-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* ---- under each decision: Someone else, Why?, Add a note */
.s-acts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 var(--ol-sp-16); margin-top: var(--ol-sp-8); }
.s-acts > details > summary, .s-act { display: inline-flex; align-items: center; min-height: var(--ol-h); padding: 0; border: 0; background: none; color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.s-acts > details > summary::-webkit-details-marker { display: none; }
.s-acts > details { flex: 0 1 auto; }
.s-acts > details[open] { flex: 1 1 100%; order: 9; }
/* CH 102626: the three controls stay in one fixed row and whatever opens drops below it, full width, so nothing jumps */
@supports selector(::details-content) {
  .s-acts { display: grid; grid-template-columns: repeat(3, max-content) 1fr; column-gap: var(--ol-sp-16); }
  .s-acts > details { display: contents; }
  .s-acts > details > summary { grid-row: 1; }
  .s-acts > details::details-content { grid-column: 1 / -1; }
  .s-acts > details[open] > summary { text-decoration-thickness: 2px; }
}
.s-acts > details > :not(summary) { margin: 0 0 var(--ol-sp-8); font-size: var(--ol-fs-13); color: var(--ol-ink-2); }
.s-pickers { display: flex; flex-wrap: wrap; gap: var(--ol-sp-8); }
.s-note { flex: 1 1 100%; order: 10; display: flex; flex-direction: column; gap: var(--ol-sp-4); margin-top: var(--ol-sp-4); font-size: var(--ol-fs-13); color: var(--ol-ink-2); }
.s-note textarea { min-height: 64px; }
/* CH 102626 later: Someone else is a list of everyone in the building then, one row a person; a pick is pressed in ink */
.s-else-lead { margin: 0 0 var(--ol-sp-8); }
.s-else-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--ol-sp-8); max-height: 320px; overflow: auto; padding: var(--ol-sp-8); border-radius: var(--ol-r); background: var(--ol-wash); }
.s-else-row { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: var(--ol-sp-8); row-gap: 2px; min-height: var(--ol-h); padding: var(--ol-sp-12) var(--ol-sp-16); border: 0; border-radius: var(--ol-r); background: var(--ol-surface); color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); text-align: left; cursor: pointer; }
.s-else-row b { font-weight: 600; }
.s-else-row span:not(.k-radio) { color: var(--ol-ink-2); }
.s-else-row:hover { box-shadow: inset 0 0 0 1px var(--ol-rule); }
.s-else-row[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ol-ink); }
.s-else-row .k-radio { grid-row: 1 / span 2; }
.s-else-row[aria-pressed="true"] .k-radio { border: 5px solid var(--ol-ink); }
.s-else-row b, .s-else-row span:not(.k-radio) { grid-column: 2; }
.s-note-help { margin: var(--ol-sp-4) 0 0; font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-note-line { margin: var(--ol-sp-4) 0 0; font-size: var(--ol-fs-13); color: var(--ol-ink-2); }
.s-note-line b { color: var(--ol-ink); font-weight: 600; }

/* ---- the why prompt: one optional question after a change */
.s-why { margin-top: var(--ol-sp-12); padding: var(--ol-sp-12) var(--ol-sp-16); border-radius: var(--ol-r); background: var(--ol-surface); }
.s-why-q { margin: 0 0 var(--ol-sp-8); font-weight: 600; }
.s-why-opt { font-weight: 400; font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-why-picks { display: flex; flex-wrap: wrap; gap: var(--ol-sp-8); }
.s-chip { display: inline-flex; align-items: center; min-height: var(--ol-h); padding: 0 var(--ol-sp-12); border: 1px solid var(--ol-ctl); border-radius: var(--ol-r); background: var(--ol-surface); color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); cursor: pointer; }
.s-chip[aria-pressed="true"] { border-color: var(--ol-ink); box-shadow: inset 0 0 0 1px var(--ol-ink); font-weight: 600; }
.s-why-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ol-sp-8) var(--ol-sp-12); margin-top: var(--ol-sp-8); }
.s-why-l { flex: 1 1 220px; }
.s-why-skip { min-height: var(--ol-h); padding: 0; border: 0; background: none; color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---- one plain line under a heading that says what the section is for */
.s-purpose { margin: 0 0 var(--ol-sp-12); font-size: var(--ol-fs-13); color: var(--ol-ink-2); font-weight: 400; }

/* ---- the side panel that opens and closes */
.s-panel-toggle { display: inline-flex; align-items: center; gap: var(--ol-sp-8); min-height: var(--ol-h); padding: 0 var(--ol-sp-4); border: 0; background: none; color: var(--ol-ink); font: inherit; font-size: var(--ol-fs-13); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.s-panel-toggle svg { width: 18px; height: 18px; flex: none; }

/* ---- a rule the plan learned: a line with its state word and two quiet actions */
.s-learn { list-style: none; margin: 0; padding: 0 var(--ol-sp-12); border-radius: var(--ol-r); background: var(--ol-surface); }
.s-learn li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ol-sp-4) var(--ol-sp-16); padding: var(--ol-sp-12) 0; border-top: 1px solid var(--ol-line); }
.s-learn li:first-child { border-top: 0; }
.s-learn-when { flex: none; min-width: 64px; font-size: var(--ol-fs-13); color: var(--ol-muted); }
.s-learn-what { flex: 1 1 260px; min-width: 0; }
.s-learn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ol-sp-8) var(--ol-sp-16); }

@media print {
  .s-help, .s-help-btn, .s-acts, .s-why, .s-panel-toggle { display: none !important; }
}
