/* Section: الوصايا والتعهدات (P7, on the API). The approved demo's wills.css. Only the :root tokens from app.css;
   every class starts with "will-" (plus .seg-will-cancelled, the tone ui.js adds to the «ملغاة» button). */

/* ------------------------------------------------------------ list */

.will-sub {
  overflow-wrap: anywhere;
}

/* The due date on the row's side: red when late, amber when soon. */
.will-due {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.will-due-overdue {
  color: var(--late);
}

.will-due-soon {
  color: var(--soon);
}

.will-due-active {
  color: var(--text);
}

.will-finished-toggle {
  margin-top: 22px;
}

/* ------------------------------------------------------------ detail */

.will-status-label,
.will-text-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.will-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.will-status .seg {
  padding-inline: 6px;
  font-size: 16px;
  line-height: 1.35;
}

/* «ملغاة» when chosen: grey, not the brand colour, so it does not read as the normal state. */
.seg-will-cancelled.seg-on {
  border-color: var(--muted);
  background: var(--muted);
}

/* The people on each side: one tappable pill per name, linking to the person's page. */
.will-people {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.will-person {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand-ink) 35%, transparent);
  text-underline-offset: 5px;
}

a.will-person:hover {
  background: color-mix(in srgb, var(--brand) 18%, var(--surface));
}

.will-person-missing {
  background: var(--line);
  color: var(--muted);
  text-decoration: none;
}

.will-due-fact {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.will-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}

.will-actions .will-delete {
  color: var(--late);
}

.will-actions .will-delete:hover:not(:disabled) {
  border-color: var(--late);
}

/* ------------------------------------------------------------ form (one side's people) */

.will-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.will-side .tag-list {
  margin-bottom: 2px;
}
