/* Parties and CRM (UI-5), on the tokens of application.css; panels, figures, lists, the log
   and the collapsible actions come from counter.css and workshop.css. */

.parties-search { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 12px; max-width: 560px; }
.parties-search .input { flex: 1; }
.parties-list__name { font-weight: 600; }

.party { display: flex; flex-direction: column; gap: 16px; }
.party__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 16px; align-items: start; }
.party__column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.party__notes { margin: 8px 0 0; }
.party__rows li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.party__rows li:last-child { border-bottom: 0; }
.party__rows li.is-inactive { color: var(--ink-muted); }
.party__rows form { display: inline; }
.party__rows .btn--small { margin-left: auto; }
.party__rows .btn--small + form .btn--small, .party__rows form + form .btn--small { margin-left: 0; }
.party .action { margin-top: 10px; }
.party .action > .form, .party .action > .field, .party .action > .hint { padding: 0 12px 12px; }
.party .action > .field { padding-top: 10px; }

.party-form__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.party-form__group legend { padding: 0 6px; font-weight: 600; }
.party-form__roles { display: flex; gap: 12px; flex-wrap: wrap; }

.consents th[scope="row"] { text-align: left; white-space: nowrap; }
.consents td { vertical-align: top; }
.consents td form { display: inline; margin-left: 6px; }
.consents__history { margin: 8px 0 0; font-size: 13px; }

.gifts__recipient { display: flex; flex-direction: column; gap: 2px; align-items: stretch; }
.gifts__line { font-size: 14px; }

.timeline__event { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.timeline__body { flex-basis: 100%; }
.timeline__body p { margin: 0; }
.timeline__event--audit { color: var(--ink-muted); }

.upcoming tr.is-due td { background: var(--warn-bg); }

/* Badges of the party pages. */
.badge--party-active { background: var(--ok-bg); color: var(--ok-ink); }
.badge--party-inactive { background: var(--bg-muted); color: var(--ink-muted); }
.badge--party-deceased, .badge--anonymized { background: var(--err-bg); color: var(--err-ink); }
.badge--primary, .badge--tag, .badge--upcoming { background: var(--info-bg); color: var(--info-ink); }
.badge--gifts, .badge--granted { background: var(--ok-bg); color: var(--ok-ink); }
.badge--due { background: var(--warn-bg); color: var(--warn-ink); }

@media (max-width: 1000px) {
  .party__grid { grid-template-columns: minmax(0, 1fr); }
}
