/* F-UX4: Update what's due (js/update-due.js), on Settings' page and as a
 * sheet over the room, and the Ember tab's pay day card. The palette's
 * tokens only (--lp-*: Lamplit, or Plaster in light), the phone's type
 * scale only (app.css's --t-*, F-TY1/F-TY2). Every line wraps; nothing is
 * cut off (CLAUDE.md §5). An old age is the accent, never red: red is only
 * for a failure. Done and fine are sage, as the mock-up drew them. */

.udlist { display: grid; gap: 12px; margin-top: 12px; }
.udrow {
  display: grid; gap: 8px; min-width: 0; padding: 12px 14px; border-radius: 14px;
  background: var(--lp-card); color: var(--lp-ink); border: 1px solid var(--lp-edge); box-shadow: var(--lp-shadow);
  font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body);
  transition: opacity var(--dur) var(--ease);
}
.udrow.done, .udrow.skipped { opacity: .72; }
.udtop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; min-width: 0; }
.udname { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.udage { font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-faint); overflow-wrap: anywhere; }
.udage.old { color: var(--lp-accent); }
.udwas { margin: 0; font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-soft); overflow-wrap: anywhere; }
.udact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.udin {
  flex: 1 1 96px; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--lp-edge); background: var(--lp-ground); color: var(--lp-ink);
  font-family: var(--body-face); font-weight: 600; font-size: var(--t-input); line-height: var(--lh-input);
  font-variant-numeric: tabular-nums;
}
.udin::placeholder { color: var(--lp-faint); font-weight: 400; }
.udbtn {
  flex: none; min-height: 44px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--lp-edge); background: var(--lp-accentBg); color: var(--lp-ink);
  font-family: var(--body-face); font-weight: 600; font-size: var(--t-small); line-height: var(--lh-small);
  white-space: normal; text-align: center;
}
.udbtn.udgo { background: var(--lp-accent); border-color: var(--lp-accent); color: var(--lp-card); }
.udbtn:disabled { opacity: .55; cursor: default; }
.udstate { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: var(--t-small); line-height: var(--lh-small); font-weight: 600; color: var(--lp-steady); overflow-wrap: anywhere; }
.udstate.skipped { color: var(--lp-faint); }
.uderr { margin: 0; font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-ink); overflow-wrap: anywhere; }
.udlink {
  display: inline; min-height: 0; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--lp-accent); text-decoration: underline; text-underline-offset: 2px;
}

/* The rows that are fine: quieter, one line each where it fits. */
.udfine { display: grid; gap: 0; border-radius: 14px; background: var(--lp-card); border: 1px solid var(--lp-edge); }
.udfine .udrow { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 10px 14px; }
.udfine .udrow + .udrow { border-top: 1px solid var(--lp-edge); }
.udfineword { font-size: var(--t-small); line-height: var(--lh-small); font-weight: 600; color: var(--lp-steady); overflow-wrap: anywhere; }

.udcount { margin: 12px 0 0; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-faint); }
.udexport {
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--lp-edge);
  font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-soft); overflow-wrap: anywhere;
}

/* ---- the sheet, from the pay day card: a card from the foot ---- */
.udsheet {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  background: var(--lp-scrim); color-scheme: var(--lp-scheme);
  transition: opacity var(--dur) var(--ease);
}
.udsheet.away { opacity: 0; }
.udcard {
  position: relative; box-sizing: border-box; width: 100%; max-width: 560px; max-height: calc(100% - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--lp-ground); color: var(--lp-ink); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body);
  transition: transform var(--dur) var(--ease);
}
.udsheet.away .udcard { transform: translateY(calc(100% + 32px)); }
.udhead { display: flex; align-items: center; gap: 8px; }
.udtitle { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--body-face); font-weight: 700; font-size: var(--t-title); line-height: var(--lh-title); overflow-wrap: anywhere; }
.udx {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--lp-accentBg); color: var(--lp-ink); font-family: var(--body-face); font-size: var(--t-title); line-height: 1;
}
.udcard .lede, .udcard .hint, .udcard .status {
  margin: 8px 0 0; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-soft); overflow-wrap: anywhere;
}
.udsheet button:focus-visible, #settings .udrow button:focus-visible, .udin:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

/* ---- the Ember tab: the pay day card in the feed's top slot ---- */
.efover button.efupdate {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body); color: var(--lp-ink);
  animation: rise var(--dur) var(--ease);
}
.efupdate .efuw { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.efupdate .efut { overflow-wrap: anywhere; }
.efupdate .efus { font-size: var(--t-small); line-height: var(--lh-small); color: var(--lp-faint); overflow-wrap: anywhere; }
.efupdate .efgo { flex: none; color: var(--lp-accent); font-weight: 700; font-size: var(--t-title); line-height: 1; }
.efupdate:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
