/* People a quote is built with (static/ui/people.js). */
.pp-source { margin-bottom: 10px; min-height: 1.3em; }
.pp-view { margin-bottom: 10px; }
.pp-view [aria-pressed="true"] { background: var(--surface-2, #eef2f0); font-weight: 600; }
dialog.pp-dialog { width: min(720px, calc(100vw - 32px)); }
.pp-revert { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-weight: 400; }
#ppFacTable .rt-frame, #ppLecTable .rt-frame { overflow-x: auto; }
#facilitatorsField .lf-table, #lecturersField .lf-table { width: 100%; }
#facilitatorsField input[type="number"] { max-width: 7em; }
#ppIdentity .identity { margin-top: 6px; }

/* each facilitator's table of services (the owner, 11 November) */
.pp-units-table { width: 100%; margin: 6px 0; }
.pp-units-table td { vertical-align: middle; padding: 4px 6px; }
.pp-units-table select { min-width: 150px; max-width: 220px; }
.pp-units-table input[data-unit$=":note"] { min-width: 110px; width: 100%; }
.pp-units-table input[type=number] { width: 70px; }
.pp-units-table td:last-child { white-space: nowrap; }
@media (max-width: 760px) { .pp-units-table { display: block; overflow-x: auto; } }

/* a facilitator's own sale price (people.js · saleRow) — folded unless given */
.pp-sale { margin: 4px 0 8px; }
.pp-sale > summary { cursor: pointer; }
.pp-sale-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pp-sale-row label { display: inline-flex; align-items: center; gap: 6px; }
.pp-sale-row input { width: 110px; }

/* a facilitator's table past twenty lines scrolls in its frame, the header stays (people.js · unitsEditor) */
.pp-units-scroll { max-height: 640px; overflow-y: auto; }
.pp-units-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface, var(--bg)); }
/* the table fits the form's column (the walk of 13 November: at 1440 px with the assistant open it scrolled sideways) */
.pp-units-table { table-layout: auto; }
.pp-units-table th { white-space: normal !important; font-size: 12px; line-height: 1.25; min-width: 0 !important; }
.pp-units-table select { min-width: 104px; max-width: 180px; }
.pp-units-table input[data-unit$=":note"] { min-width: 70px; }
.pp-units-table input[type=number] { width: 62px; }
.pp-units-table td { padding: 4px; }

/* each facilitator a box (the owner, 13 November): name, role and origin in its header, details and services in its body */
#facilitatorsField .lf-cards { display: grid; gap: 12px; margin: 8px 0; }
#facilitatorsField .lf-card { border: 1px solid var(--border, #d9dfdc); border-radius: 10px; background: var(--surface, var(--bg)); overflow: hidden; }
#facilitatorsField .lf-card-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 10px 12px; background: var(--surface-2, #f2f5f3); border-bottom: 1px solid var(--border, #d9dfdc); }
#facilitatorsField .lf-card-cell { display: grid; gap: 2px; min-width: 160px; }
#facilitatorsField .lf-cell-who { min-width: 240px; flex: 1 1 240px; }
#facilitatorsField .lf-cell-who input { font-weight: 600; font-size: 15px; }
#facilitatorsField .lf-card-del { color: var(--bad, #b42318); }
#facilitatorsField .lf-card-body { padding: 8px 12px 12px; }
.pp-sec-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pp-fac-info { margin-bottom: 6px; line-height: 1.6; }
.pp-rates { margin-top: 2px; }
.pp-rate { white-space: nowrap; }
.pp-fac-sub { margin: 4px 0 0; }
.pp-units-table input.pp-qty { width: 76px; }
.pp-units-table input.pp-rate-in { width: 90px; }
.pp-units-table input.pp-bad, .pp-units-table input.pp-rate-in.pp-bad { border-color: var(--bad, #b42318); }
.pp-units-table tr.pp-unit-err td { padding-top: 0; border-top: 0; }
.pp-units-table tr.pp-unit-err span:empty { display: none; }
.pp-units-table tr.pp-line-bad td { background: color-mix(in srgb, var(--bad, #b42318) 5%, transparent); }
.pp-grand { margin-top: 6px; }
.pp-units-table .pp-per { margin-top: 2px; }
.pp-units-table select { width: 100%; }
/* the box's table fits the form's column with the assistant open (1440 px): narrow quantity and cost boxes, the
   description takes what is left, the two row buttons one above the other */
.pp-units-table input.pp-qty { width: 58px; }
.pp-units-table input.pp-rate-in { width: 76px; }
.pp-units-table input[data-unit$=":note"] { min-width: 56px; }
.pp-units-table select { min-width: 96px; }
.pp-units-table td:last-child { white-space: normal; width: 34px; }
.pp-units-table td:last-child .btn { display: block; padding: 2px 6px; }
.pp-units-table [data-unit-total] { white-space: nowrap; }
.pp-units-table td, .pp-units-table th { padding: 4px 3px; }
.pp-units-table select { min-width: 90px; }
.pp-units-table input[data-unit$=":note"] { min-width: 48px; }
.pp-units-table input.pp-rate-in { width: 68px; }

/* what the rule book adds for a person (people.js · autoHtml) */
.pp-auto { margin: 6px 0; }
.pp-auto:empty { display: none; }
.pp-auto-head { margin: 4px 0; }
.pp-auto-table { width: 100%; font-size: 13px; background: color-mix(in srgb, var(--accent, #2f6f5e) 5%, transparent); }
.pp-auto-table td, .pp-auto-table th { padding: 3px 4px; vertical-align: top; }
.pp-auto [data-auto-note], .pp-auto [data-auto-ask], .pp-auto [data-auto-abroad] { margin-top: 3px; }

/* the facilitators and lecturers tables: a name, a role, a country never break letter by letter — the table scrolls sideways
   inside its frame instead (the UX walk of 13 November) */
#ppFacTable td, #ppFacTable th, #ppLecTable td, #ppLecTable th { white-space: nowrap; }
#ppFacTable table, #ppLecTable table { width: max-content; min-width: 100%; }

/* the rule book's options, the person's choice (people.js · choicesHtml) */
.pp-choices { margin-top: 8px; display: grid; gap: 6px; }
.pp-choice { padding: 6px 8px; border: 1px dashed var(--line-strong, var(--line)); }
.pp-choice .btn-row { margin-top: 4px; }

/* the facilitator's own switches: the abroad multiplier and the full-day preparation (people.js · optsHtml) */
.pp-opts { display: grid; gap: 6px; margin: 6px 0; }
.pp-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pp-opt .pp-check { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pp-opt .pp-x { font-weight: 700; }
.pp-own { gap: 6px 16px; }
.pp-own .pp-own-head { font-weight: 600; }
.pp-own .pp-own-f { display: inline-flex; align-items: center; gap: 4px; }
.pp-own .pp-own-f .pp-num { width: 6.5em; }
.pp-opt .pp-num { width: 5.5em; }
.pp-opt .pp-num:disabled { opacity: .5; }
