/* Trade alerts (app/components/tradealert.js, markup tradealert-markup.js), prefix ta-: the bell button and the line
   under it in the chat, the Trades page's bell chip, and the trade as pictures (the Alerts page's rows). Colours only
   from tokens.css. */

/* ================================================================ the bell in the chat: the button, the line under it */
.ta-notify { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 100%; }
.ta-btn { --h: 48px; max-width: 100%; }
/* a long label on a narrow phone wraps inside the button instead of widening the chat */
@media (max-width: 479px) { .ta-btn { height: auto; min-height: var(--h); padding-block: 12px; white-space: normal; text-align: left; } }
.ta-btn .m-spin, .ta-chip .m-spin { flex-shrink: 0; }
/* done: "✓ Notifying you" / "✓ Saved", green on its soft green (one tap undoes it for a moment, then it rests) */
.ta-btn.is-on { --bg: var(--color-sea-sponge); --edge: var(--color-turtle); --fg: var(--color-tree-frog); }
.ta-btn.is-on:not([data-undo-until]) { cursor: default; }
@media (hover: hover) { .ta-btn.is-on:not([data-undo-until]):hover { filter: none; } }
.ta-btn.is-on:not([data-undo-until]):active { transform: none; }
.ta-btn.is-on:not([data-undo-until]):active::before { box-shadow: 0 var(--lip) 0 var(--edge); }
.ta-btn.u-btn--white.is-on:not([data-undo-until]):active::before { box-shadow: 0 2px 0 var(--edge); }
/* busy: the spinner where the bell was, the button as it was (aria-disabled would grey it) */
.ta-btn[aria-busy] { color: var(--fg); transform: none; }
.ta-btn[aria-busy]::before { background-color: var(--bg); box-shadow: 0 var(--lip) 0 var(--edge); }
.ta-btn.u-btn--white[aria-busy]::before { box-shadow: 0 2px 0 var(--edge); }
.ta-state:empty { display: none; }
.as-msg .ta-state { scroll-margin-bottom: 176px; }   /* scrolled into sight above the chat's box */
.ta-state { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.ta-say { margin: 0; color: var(--color-eel); font: 400 17px/26px var(--font); }
.ta-say .u-val { display: inline; }
.ta-link { color: var(--color-link); font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .ta-link:hover { text-decoration: underline; text-underline-offset: 3px; } }
.ta-link:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; border-radius: 4px; }
.ta-act { display: flex; }

/* ================================================================ the Trades page's bell: a chip in its filter row */
.ta-chip { gap: 6px; padding: 0 12px; }
.ta-chip > svg { flex-shrink: 0; color: var(--color-macaw); }
.ta-chip.is-on > svg { color: inherit; }
.ta-chip[aria-busy] { cursor: default; }

/* ================================================================ the trade as pictures: you give ⇄ you get */
/* the tier tiles (UI.pic), 6px apart; a value side is one tile of its own, as tall as a picture */
.ta-strip { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.ta-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ta-side__word { color: var(--color-label); font: 700 13px/16px var(--font); white-space: nowrap; }
.ta-side__pics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ta-pic { display: flex; flex-shrink: 0; }
.ta-swap { display: flex; flex-shrink: 0; color: var(--color-hare); }
.ta-vtile {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; height: var(--ta-pic, 48px); padding: 0 12px;
  border-radius: 12px; background: var(--color-polar); color: var(--color-eel); font: 700 15px/20px var(--font); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ta-vtile .u-val { gap: 2px; color: inherit; }
.ta-vtile--any { background: none; border: 2px dashed var(--color-swan); color: var(--color-label); }
