/* LMF v3.1 people panel (lane U-N, on lane F's skeleton). Scoped to the slot inside the existing owner box.
 * Selectors start with #detail-dialog #v31-people-panel so the kit holds against "#detail-dialog .parcel-aside button"
 * (workspace-property-focus.css:479). Tokens only (gate zero rule 2): no hex or rgb, weights 500/700/800, sizes on the scale.
 * Gate zero 4.6: name 17 px heavy, facts on one text edge, call and e-mail squares and the Nezvanīt tick on one row,
 * the co-owner and group lists as real folds. STATES 11: a person marked Nezvanīt is a pale red block with the chip. */

/* The owner box keeps its land facts and "Citi īpašumi"; its own person list gives way to the panel. */
#detail-dialog .property-owner-box[data-v31-people=mounted]>.property-owner-people{display:none}

#detail-dialog #v31-people-panel{grid-column:1/-1;display:grid;gap:var(--v31-s-2);padding:var(--v31-s-3) 0;border-bottom:1px solid var(--v31-line);font-family:var(--v31-font);color:var(--v31-text)}

/* One person. The block bleeds 8 px into the box padding so a marked person's tone has room while the text keeps the box's edge. */
#detail-dialog #v31-people-panel .v31-pp-person{display:grid;gap:4px;min-width:0;margin:0 -8px;padding:8px;border-radius:var(--v31-r-ctl)}
#detail-dialog #v31-people-panel .v31-pp-person+.v31-pp-person{margin-top:4px}
#detail-dialog #v31-people-panel .v31-pp-person.is-dnc{background:color-mix(in srgb,var(--v31-late-bg) 55%,var(--v31-surface))}
#detail-dialog #v31-people-panel .v31-pp-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
#detail-dialog #v31-people-panel .v31-pp-name{min-width:0;font-size:var(--v31-fs-md);font-weight:var(--v31-fw-heavy);line-height:var(--v31-lh-head);overflow-wrap:anywhere}
#detail-dialog #v31-people-panel .v31-pp-role{color:var(--v31-text-2);font-size:var(--v31-fs-sm);font-weight:var(--v31-fw);line-height:var(--v31-lh-row)}

/* Facts: icon 15 px in a 16 px column, every text on the same edge. */
#detail-dialog #v31-people-panel .v31-pp-fact{display:grid;grid-template-columns:16px minmax(0,1fr);align-items:start;gap:8px;font-size:var(--v31-fs-sm);font-weight:var(--v31-fw);line-height:var(--v31-lh-row)}
#detail-dialog #v31-people-panel .v31-pp-ic{display:inline-flex;align-items:center;justify-content:center;height:17px;color:var(--v31-muted)}
#detail-dialog #v31-people-panel .v31-pp-ic .v31-i{width:15px;height:15px}
#detail-dialog #v31-people-panel .v31-pp-tx{min-width:0;overflow-wrap:anywhere}
/* The map link is a 32 px target (44 on a phone) that does not raise the line: negative margins give the height back. */
#detail-dialog #v31-people-panel .v31-pp-map{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:-8px 0 -8px -4px;vertical-align:middle;color:var(--v31-forest);border-radius:var(--v31-r-ctl)}
#detail-dialog #v31-people-panel .v31-pp-map:hover{background:var(--v31-forest-soft)}
#detail-dialog #v31-people-panel .v31-pp-map .v31-i{width:15px;height:15px}

/* The action row: squares on the left, "Atzīmēja ..." and the tick on the right. */
#detail-dialog #v31-people-panel .v31-pp-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:4px;min-height:var(--v31-ctl)}
#detail-dialog #v31-people-panel .v31-pp-since{flex:1 1 auto;min-width:0;color:var(--v31-text-2);font-size:var(--v31-fs-xs);font-weight:var(--v31-fw);line-height:var(--v31-lh-row)}
#detail-dialog #v31-people-panel .v31-pp-tick{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:var(--v31-ctl);margin-left:auto;padding:0 8px;border-radius:var(--v31-r-ctl);font-size:var(--v31-fs-sm);font-weight:var(--v31-fw-bold);color:var(--v31-text);cursor:pointer}
#detail-dialog #v31-people-panel .v31-pp-tick:hover{background:var(--v31-ctl-fill-hover)}
#detail-dialog #v31-people-panel .v31-pp-tick input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}
#detail-dialog #v31-people-panel .v31-pp-box{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:20px;height:20px;border:2px solid var(--v31-ctl-line);border-radius:6px;background:var(--v31-surface);color:var(--v31-surface)}
#detail-dialog #v31-people-panel .v31-pp-box .v31-i{width:15px;height:15px;stroke-width:2.6;opacity:0}
#detail-dialog #v31-people-panel .v31-pp-tick input:checked+.v31-pp-box{border-color:var(--v31-late);background:var(--v31-late)}
#detail-dialog #v31-people-panel .v31-pp-tick input:checked+.v31-pp-box .v31-i{opacity:1}
#detail-dialog #v31-people-panel .v31-pp-tick input:focus-visible+.v31-pp-box{outline:2px solid var(--v31-focus);outline-offset:2px}
#detail-dialog #v31-people-panel .v31-pp-tick:has(input:disabled){cursor:default}
#detail-dialog #v31-people-panel .v31-pp-tick:has(input:disabled):hover{background:transparent}
#detail-dialog #v31-people-panel .v31-pp-tick:not([aria-busy]) input:disabled+.v31-pp-box{opacity:.55}
#detail-dialog #v31-people-panel .v31-pp-tick[aria-busy] .v31-pp-box{border-color:transparent;background:transparent;color:var(--v31-text-2)}
#detail-dialog #v31-people-panel .v31-pp-tick[aria-busy] .v31-busy{width:16px;height:16px}

/* The notice at the tick (CONTACT_CHANGED and other refusals): in place, one sentence. */
#detail-dialog #v31-people-panel .v31-pp-person>.v31-notice{margin-top:4px}

/* Folds: "+N līdzīpašnieki" and the property group's owners. */
#detail-dialog #v31-people-panel .v31-pp-fold>summary{display:flex;align-items:center;gap:8px;min-height:var(--v31-ctl);margin:0 -8px;padding:0 8px;border-radius:var(--v31-r-ctl);color:var(--v31-forest);font-size:var(--v31-fs-sm);font-weight:var(--v31-fw-bold);list-style:none;cursor:pointer}
#detail-dialog #v31-people-panel .v31-pp-fold>summary::-webkit-details-marker{display:none}
#detail-dialog #v31-people-panel .v31-pp-fold>summary:hover{background:var(--v31-forest-soft)}
#detail-dialog #v31-people-panel .v31-pp-fold>summary:focus-visible,#detail-dialog #v31-people-panel .v31-pp-map:focus-visible,#detail-dialog #v31-people-panel .v31-btn:focus-visible{outline:2px solid var(--v31-focus);outline-offset:2px}
#detail-dialog #v31-people-panel .v31-pp-chev{display:inline-flex;width:16px;justify-content:center;transition:transform var(--v31-t-ctl)}
#detail-dialog #v31-people-panel .v31-pp-chev .v31-i{width:15px;height:15px}
#detail-dialog #v31-people-panel .v31-pp-fold[open]>summary .v31-pp-chev{transform:rotate(90deg)}
#detail-dialog #v31-people-panel .v31-pp-fold-body{display:grid;gap:4px;padding-top:4px}
#detail-dialog #v31-people-panel .v31-empty-line{min-height:var(--v31-btn);padding:0}
#detail-dialog #v31-people-panel .v31-pp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Phone and narrow windows (gate zero rule 24): 44 px targets. */
@media (max-width:720px){
  #detail-dialog #v31-people-panel .v31-pp-acts{min-height:44px}
  #detail-dialog #v31-people-panel .v31-pp-acts>.v31-btn--icon:not(#v31-kit#v31-kit#v31-kit#v31-kit){width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px}
  #detail-dialog #v31-people-panel .v31-pp-tick,#detail-dialog #v31-people-panel .v31-pp-fold>summary{min-height:44px}
  #detail-dialog #v31-people-panel .v31-pp-map{width:44px;height:44px;margin:-12px 0 -12px -8px}
}
@media (prefers-reduced-motion:reduce){#detail-dialog #v31-people-panel .v31-pp-chev{transition:none}}
@media (forced-colors:active){
  #detail-dialog #v31-people-panel .v31-btn,#detail-dialog #v31-people-panel .v31-pp-box{border-color:ButtonText}
  #detail-dialog #v31-people-panel .v31-pp-tick input:checked+.v31-pp-box{background:Highlight;border-color:Highlight}
  #detail-dialog #v31-people-panel .v31-pp-person.is-dnc{outline:1px solid CanvasText}
}
