/* The website around the new Expenses screens (js/expense-host.js). The screens' own look is shared/expense-ui.css;
   the old panes inside the folds keep theirs (workbook-new.css, expense-balance.css). Layout only. */

/* the floating "+ Add expense" sits clear of the page's corner bar (LakBi) */
html.wb-new #panel-expenses #exp-xu {
  --xu-fab-bottom: 22px;
  --xu-fab-z: 90;
  --xu-pad-bottom: 112px;
}
/* The line above the screens ("You can add your own expenses…", "Unsaved") also holds the page's toast, which floats.
   The page hides an empty head and opens it when anything in it shows: a toast alone opened it, and the whole screen
   moved down 19px and back with every "Saved." (owner / Finance, who have no line there). So here the head is always
   in place and empty takes no room: the room under it belongs to the line that shows, never to the toast. */
html.wb-new #panel-expenses > .exp-xu-head { display: flex; margin-bottom: 0; gap: 0; }
html.wb-new #panel-expenses > .exp-xu-head > #exp-xu-why:not(:empty) { margin-bottom: calc(12px + 1.2rem); }
html.wb-new #panel-expenses > .exp-xu-head #exp-dirty:not([hidden]) { margin-bottom: 1.2rem; }

/* A change that didn't save: Save / Undo take the right corner. The Add button is in the middle, clear of them, so it
   stays where it is: it never hops, and the page's toast (88px up, above the button) never lands on it. */

/* The "Marked paid · Undo" strip floats just above the button (shared/expense-ui.css .xu-undo: 10px up, 60px tall).
   A toast that shows with it (a connection dropped half-way through Mark paid) sits clear above the strip, so on
   these screens the toast is always that high: it never lands on the strip and never moves when the strip comes. */
html.wb-new #panel-expenses .exp-xu-head .exp-toast:not([hidden]) { bottom: 112px; }

/* a narrow window (under 1024px): the page's corner bar is a strip along the bottom, so the button floats above it */
@media (max-width: 63.99rem) {
  html.wb-new #panel-expenses #exp-xu {
    --xu-fab-bottom: 102px;
    --xu-pad-bottom: 28px;
  }
  /* the last line of the page ("Receipts are kept until…") ends above the button, not under it */
  html.wb-new #panel-expenses #exp-xu-keep { padding-bottom: 68px; }
  html.wb-new #panel-expenses #exp-xu[hidden] ~ #exp-xu-keep { padding-bottom: 0; }
  /* the button now sits where the page's toast shows: on these screens the toast shows above the button, always */
  /* …and above the Undo strip when that is there too (the strip ends 172px up) */
  html.wb-new #panel-expenses .exp-xu-head .exp-toast:not([hidden]) { bottom: 190px; }
}

/* the Spending level on Summary: the same band as on the total card, on its own */
#exp-xu .exp-xu-level .lbt-level { margin-top: 0; border: 1px solid #ece3cf; }
#exp-xu .exp-xu-level.is-budget .lbt-level-word { color: #2f6b4f; }
#exp-xu .exp-xu-level.is-moderate .lbt-level-word { color: #2e5f8a; }
#exp-xu .exp-xu-level.is-comfortable .lbt-level-word { color: #8a6a1f; }
#exp-xu .exp-xu-level.is-luxury .lbt-level-word { color: #a1452f; }

/* an open row's links (stay, stop, Put on a day) and its rate line */
#exp-xu .exp-xu-links { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
#exp-xu .exp-xu-links[hidden] { display: none; }
#exp-xu .exp-xu-links .nu-link-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
#exp-xu .exp-xu-fx { margin: 0; font: 500 12.5px/1.45 "DM Sans", sans-serif; color: #7d705a; }
#exp-xu .exp-xu-fx small { font: inherit; color: inherit; }
#exp-xu .exp-xu-fx small + small { margin-left: 10px; }
#exp-xu .xu-row.is-focus-flash { box-shadow: 0 0 0 3px rgba(223, 168, 56, 0.55); border-radius: 16px; transition: box-shadow 0.3s ease; }

/* the old panes inside a fold: no second frame, no page gutter of their own */
#exp-xu .xu-fold-b > .exp-xu-old { margin: 0; padding: 6px 0 0; }
#exp-xu .xu-fold-b > .exp-xu-old > .exp-table-wrap { margin: 0; }

/* the Pending screen: a way back, then today's list */
#exp-xu-pend .exp-xu-back { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
#exp-xu-pend .exp-xu-back h3 { margin: 0; font: 400 22px/1.2 "Playfair Display", Georgia, serif; color: #1d3a2e; }
#exp-xu-pend .exp-xu-backbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid #dcd2bd;
  background: #fff;
  font: 700 14px/1 "DM Sans", sans-serif;
  color: #1d3a2e;
  cursor: pointer;
}
#exp-xu-pend .exp-xu-backbtn:hover { background: #f6f0e2; }
#exp-xu-pend .exp-xu-backbtn:focus-visible { outline: 2px solid #1d3a2e; outline-offset: 2px; }
#exp-xu-keep .exp-total-keep { margin-top: 0; }

/* the stop chip on an expense: "Day 5 · <stop name>", one line, a long name ends in … */
.nu-link-chip.is-stop { max-width: 100%; }
.nu-link-chip .nu-link-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* owner 2026-11-22: the Spending level shows on Summary only; the Expenses tab keeps the Group total card without it */
.xu-total .lbt-level { display: none !important; }

/* owner 2026-11-22: no Fewer payments switch; Balances lists who owes whom as it is */
.xu-root .xu-simple:not(.xu-logsw) { display: none !important; }

/* owner 2026-11-23: Quick cost and + Add expense live in the page's corner dock; no floating pair over the list */
#exp-xu .xu-fabs { display: none !important; }
#exp-xu-dock [data-xu-dock][hidden] { display: none !important; }
#exp-xu-dock .exp-fab-wrap[hidden] { display: none !important; }

/* the dock's Quick / Add on Balances and Summary: invisible but keeping their place (nothing beside them moves) */
#exp-xu-dock [data-xu-dock][data-xu-off] { visibility: hidden; pointer-events: none; }
