/* shared/portal-agreement.css
 *
 * THE CONTRACT, ON THE ARRANGEMENT. Built 1 Sep 2026. See portal-agreement.js
 * for why there were two finished contract screens and neither was reachable.
 *
 * This is deliberately small. The block is a ds-card like every other box on the
 * arrangement, and the rows borrow the shape the care notes list already uses,
 * because a person tapping a contract and a person tapping a visit are doing the
 * same thing and should not have to learn two rows.
 */

/* .hds .hag .ag-row, AT (0,3,0), AND EVERY PART OF THAT IS LOAD BEARING.
   `.hds button:not(.ds-btn)` weighs (0,2,1), because :not() contributes its
   argument's specificity, and a bare `.ag-row` at (0,1,0) loses to it. The
   min-height below would never have applied and the row would have missed the
   48px tap floor. This is the same trap the care notes row fell into, caught
   there by test/type-floor.test.js, which is why it is written this way here
   from the start rather than found later. */
.hds .hag .ag-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-3) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--bd);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.hds .hag .ag-row:first-child { border-top: 0; }
.hds .hag .ag-row:hover { background: var(--surface); }
.hds .hag .ag-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* A CONTRACT WITH NOTHING BEHIND IT IS NOT A BUTTON. A draft nobody has signed
   has no rendered text to open, so it renders as a plain row: no pointer, no
   hover, no chevron. It still sits in the list, because "your carer has not sent
   it yet" is a real answer to "where is my agreement". */
.hds .hag .ag-row.is-flat { cursor: default; }
.hds .hag .ag-row.is-flat:hover { background: none; }

.ag-list { padding-top: var(--sp-2); }
.ag-row__main { flex: 1; min-width: 0; }

/* WHAT IT IS, THEN WHERE IT STANDS. Two lines, the template's row title and row
   sub, which is ONE secondary treatment rather than two that differ by a weight
   and an ink. */
.ag-row__who  { display: block; font-size: var(--fs-body); font-weight: 700; color: var(--t1); }
.ag-row__when { display: block; font-size: var(--fs-min); color: var(--t3); }
.ag-row__go   { flex: none; color: var(--t3); }

/* THE STATUS WORDS CARRY THE MEANING AND THE INK ONLY SECONDS IT. Nothing on
   this platform rests on hue alone, so "Ready for you to sign" says so in words
   and the colour is a second signal for people who read colour quickly, never
   the only one. --t3 is the default, so `wait` sets nothing. */
.ag-status--todo { color: var(--warn); }
.ag-status--ok   { color: var(--t3); }

.ag-all { margin-top: var(--sp-3); }
