/* The action panel: one editor for every section. On a wide window it is docked at the right from under the top bar to the bottom of the window, whatever
   the list beside it holds and wherever the page is scrolled to, and the view makes room for it. Under 1080 px it sits under the list. */

.panel {
  position: relative; width: 100%; min-width: 0; display: flex; flex-direction: column; overflow-y: auto;
  background: var(--pn); border-top: 1px solid var(--ln);
}
@media (min-width: 1081px) {
  .panel { position: fixed; top: var(--bar-height); right: 0; bottom: 0; z-index: 10; width: var(--panel-drawn); border-top: 0; border-left: 1px solid var(--ln); }
  .view:has(.panel) { padding-right: var(--panel-drawn); }
}
.panel-head { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 16px; border-bottom: 1px solid var(--ln); background: var(--pn); }
.panel-title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.panel-title .two { flex: 1; }
.panel-title .two b { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
/* A name or an address in the title is read whole: it wraps where it must and is never cut. Open full page and Close keep their size and their place at the right. */
.two.whole b, .two.whole > span { overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.panel-title > .btn, .panel-title > .icon-btn { flex: none; }
.panel-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-strip { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--accln); border-radius: 8px; background: var(--accbg); }
.panel-strip.is-danger { border-color: var(--bd); background: var(--nobg); }
/* The in-place line for a node that is not running (node/need.js): what needs it, the Start button and the phases of the start, wherever it is drawn. */
.need-node { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--accln); border-radius: 8px; background: var(--accbg); }
.need-node p { margin: 0; overflow-wrap: anywhere; }
.panel-strip > .need-node, .need-node .need-node { padding: 0; border: 0; background: none; }
.need-words { font-size: 12.5px; font-weight: 600; }
.need-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.need-phase:empty, .need-failure:empty { display: none; }
.panel-result { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; font-weight: 600; color: var(--ok); }
.panel-result.is-problem { color: var(--bd); }
.panel-result.is-warning { color: var(--wn); }
/* A press that takes time says its step beside a small turning ring: under the panel's action bar (.panel-result.is-working), under a page's header (.page-note.is-working) and in a callout or a part (.working-line). One that can be stopped has its Cancel after the words (.working-words). */
.working-line, .panel-result.is-working, .page-note.is-working { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; color: var(--acct); }
.working-line:empty { display: none; }
.working-line::before, .panel-result.is-working::before, .page-note.is-working::before { content: ''; flex: none; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: working-spin 0.9s linear infinite; }
/* The words take the line, so the Cancel stays at its end whatever the words grow to; a page's note is kept to a readable width so that the Cancel is not far from them. */
.working-words { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; text-wrap: pretty; }
.is-working .btn { flex: none; }
.page-note.is-working { max-width: 800px; }
@keyframes working-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .working-line::before, .panel-result.is-working::before, .page-note.is-working::before { animation: none; } }

.panel-groups { display: flex; flex-direction: column; }
.group { border-bottom: 1px solid var(--ln); }
.group:last-child { border-bottom: 0; }
.group-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 24px; border: 0; background: none; text-align: left; cursor: pointer; }
.group-head:hover { background: var(--hov); }
.group-head:focus-visible { outline-offset: -2px; }
.group-title { font-weight: 600; font-size: 13.5px; }
.group-summary { margin-left: auto; color: var(--dim); font-size: 12px; text-align: right; }
.group-head[aria-expanded="true"] svg { transform: rotate(180deg); }
.group-head[aria-expanded="true"] .group-title { color: var(--acct); }
.group-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 24px 22px; }
.group-body[hidden] { display: none; }

.kv { display: grid; grid-template-columns: minmax(96px, 120px) minmax(0, 1fr); gap: 10px 14px; align-items: start; margin: 0; }
.kv dt { color: var(--dim); padding-top: 1px; }
.kv dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sect-head { margin: 0 0 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.box { border: 1px solid var(--ln); border-radius: 8px; background: var(--bg); }
.box-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--ln); }
.box-item:last-child { border-bottom: 0; }
.box-item.is-marked { background: var(--accbg); box-shadow: inset 3px 0 0 var(--accm); }

@media (max-width: 599px) {
  .panel-head, .group-body, .group-head { padding-left: 16px; padding-right: 16px; }
  .kv { grid-template-columns: minmax(84px, 100px) minmax(0, 1fr); }
}
