/* The Tip Jar's History (static/js/tip-jar.js), laid out with the web
   History's styles (timeline.css), which match the app's: the account page's
   Tips tab and the admin's User Tip History. */

/* An amount, the jar standing in for its currency sign (the app's Tips.inline). */
.th-tips { display: inline-flex; align-items: center; gap: 0.12em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.th-tips svg { flex: none; width: 1.05em; height: 1.05em; }
.th-tl .tl-hero .tl-stats { margin-bottom: 0; }
/* Not the caption under it, which is also a span in .tl-big. */
.tl-big strong .th-tips { font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; opacity: 1; }
/* What the day earned, under its date. */
.th-day-total { margin-top: 3px; font-size: 11px; font-weight: 800; line-height: 1.3; color: var(--color-text-secondary); }
.th-day-total.is-long { font-size: 9px; }

/* A day's lines, all in one card: each group under its heading. */
.th-day-card {
  display: grid; gap: 12px; min-width: 0; padding: 10px; border: 1px solid var(--tl-subtle);
  border-radius: 12px; background: white;
}
.th-group-head { display: flex; align-items: center; gap: 4px; min-width: 0; margin-bottom: 8px; color: var(--color-mountain-main, #4a7c8c); }
.th-group-head .material-icons { font-size: 16px; }
.th-group-head strong { flex: 1; min-width: 0; overflow: hidden; font-size: 0.86rem; white-space: nowrap; text-overflow: ellipsis; }
.th-lines { border: 1px solid var(--tl-line); }
.th-line { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: stretch; }
.th-line + .th-line { border-top: 1px solid var(--tl-line); }
.th-line-icon { display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--tl-line); background: var(--tl-number); }
.th-line-icon span { font-size: 15px; color: var(--tl-ink); }
.th-line.is-nothing .th-line-icon span { color: var(--color-text-muted); }
.th-line-words { align-self: center; min-width: 0; padding: 5px 8px; }
.th-line-label {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 0.84rem; font-weight: 600; line-height: 1.3;
}
/* Lines in the same words but for what they name: the words once, then the names. */
.th-line-names { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.3; color: var(--color-text-secondary); }
.th-line .th-tips { align-self: center; padding-right: 8px; font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted); }

/* A day's purchases and refunds, bright among the earnings. */
.th-buy {
  overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--color-amber-main, #d4a537) 70%, transparent); border-radius: 8px;
  background: color-mix(in srgb, var(--color-amber-main, #d4a537) 14%, white);
}
.th-buy-row { display: flex; align-items: center; gap: 12px; padding: 10px; }
.th-buy-row + .th-buy-row { border-top: 1px solid color-mix(in srgb, var(--color-amber-main, #d4a537) 35%, transparent); }
.th-buy-icon {
  display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px;
  background: var(--color-amber-main, #d4a537); color: white;
}
.th-buy-icon .material-icons { font-size: 24px; }
.th-buy-row.is-refund .th-buy-icon { background: var(--tl-subtle); color: var(--color-text-secondary); }
.th-buy-words { flex: 1; min-width: 0; }
.th-buy-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--color-rust-dark, #a86e20); }
.th-buy-label {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-family: 'Lora', Georgia, serif; font-size: 1.03rem; font-weight: 700; line-height: 1.25;
}
.th-buy-row .th-tips { font-size: 1rem; font-weight: 800; color: var(--color-rust-dark, #a86e20); }
.th-buy-row.is-refund .th-tips { color: var(--color-text-secondary); }
@media (max-width: 700px) {
  .th-day-card { padding: 8px; }
}

/* A reward rung up (GrassTipJar.ringUp): what it paid and why, a moment at
   the top of the page. */
.tip-ring-up {
  align-items: center;
  background: var(--color-forest-deep, #0e4d51);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(43, 37, 32, 0.25);
  color: white;
  display: flex;
  gap: 10px;
  left: 50%;
  max-width: calc(100vw - 32px);
  opacity: 0;
  padding: 10px 14px;
  position: fixed;
  top: 14px;
  transform: translate(-50%, -16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2500;
}
.tip-ring-up.is-up { opacity: 1; transform: translate(-50%, 0); }
.tip-ring-up .th-tips { font-size: 1.15rem; font-weight: 800; }
.tip-ring-up-words { font-size: 0.9rem; font-weight: 600; }
