/* fx-deal.v1.css -- THE TIER REWORK (patches/tier_rework, operator 2026-10-16).
 * Served max-age=604800: never edit in place, ship a new name.
 * The #features card that takes Proxy linking's slot: "Buy, offer and cancel"
 * (KINDS.deal in features-fx.v10.js). Built from the dashboard's own pieces:
 * the stream row with Offer + Buy (offer.css: the window that comes out of the
 * Offer pill's round end), and the Purchases rows (feed_body.html .jp-recent-*:
 * Bought in the positive colour, the quiet outlined chip). Light, then dark. */

#features .fx-dl { position: absolute; inset: 0; padding: 12px 16px 0; }
#features .fx-dl-list { position: relative; height: 110px; overflow: hidden; }

/* ---- the listing row ---- */
#features .fx-dl-row {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 6px;
  border-radius: 12px;
}
#features .fx-dl-rph { width: 32px; height: 42px; border-radius: 6px; flex: none; }
#features .fx-dl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
#features .fx-dl-tx > b:first-child,
#features .fx-dl-tx > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#features .fx-dl-tx > b:first-child { font-size: 11px; font-weight: 600; }
#features .fx-dl-tx > span { font-size: 10px; color: var(--fx-ink3); }
#features .fx-dl-tx > b.num { margin-top: 1px; font-size: 11.5px; font-weight: 700; }
#features .fx-dl-act { flex: none; display: flex; align-items: center; gap: 6px; }
#features .fx-dl-act > .fx-buy { min-width: 0; width: 76px; transition: transform .16s ease, opacity .2s ease; }

/* Offer: the row's quiet glass at Buy's height (offer.css .jc-act > .jc-offer) */
#features .fx-dl-ow { position: relative; display: flex; }
#features .fx-dl-of {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--fx-rule);
  background: var(--fx-paper2);
  color: var(--fx-ink2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  transition: transform .16s ease;
}
#features .fx-dl-of.is-press { transform: scale(.93); }
#features .fx-dl-tk { display: none; width: 10px; height: 10px; color: var(--fx-positive); flex: none; }
#features .fx-dl-tk svg { display: block; width: 100%; height: 100%; }
#features .fx-dl-of.is-sent { color: var(--fx-ink); }
#features .fx-dl-of.is-sent .fx-dl-tk { display: block; }

/* the window: out of the pill's round end, over Buy, behind the pill */
#features .fx-dl-win {
  position: absolute;
  z-index: 1;
  top: 0;
  left: calc(100% - 14px);
  width: 96px;
  height: 28px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 19px;
  border: 1px solid var(--fx-rule);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  background: var(--fx-paper2);
  opacity: 0;
  transform: translate3d(-26px, 0, 0);
  transition: opacity .24s ease, transform .34s var(--fx-ease);
}
#features .fx-dl-row.is-offer .fx-dl-win { opacity: 1; transform: none; }
#features .fx-dl-row.is-offer .fx-dl-act > .fx-buy { opacity: 0; }
#features .fx-dl-in {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--fx-rule2);
  font-size: 11px;
}
#features .fx-dl-cur { color: var(--fx-ink3); }
#features .fx-dl-dg { font-weight: 600; color: var(--fx-ink); }
#features .fx-dl-caret { flex: none; width: 1px; height: 11px; background: var(--fx-ink); animation: fx-dl-blink 1s steps(1) infinite; }
@keyframes fx-dl-blink { 50% { opacity: 0; } }
#features .fx-dl-send {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fx-ink);
  color: #fff;
  transition: transform .14s ease;
}
#features .fx-dl-send svg { display: block; width: 11px; height: 11px; }
#features .fx-dl-send.is-press { transform: scale(.86); }
#features .fx-dl-msg {
  display: none;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fx-ink);
  white-space: nowrap;
}
#features .fx-dl-msg svg { width: 10px; height: 10px; flex: none; color: var(--fx-positive); }
#features .fx-dl-win.is-sent .fx-dl-in,
#features .fx-dl-win.is-sent .fx-dl-send { display: none; }
#features .fx-dl-win.is-sent .fx-dl-msg { display: inline-flex; }

/* ---- Purchases ---- */
#features .fx-dl-pur {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  padding: 7px 10px 6px;
  border-radius: 12px;
}
#features .fx-dl-ph {
  display: block;
  margin-bottom: 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fx-ink3);
}
#features .fx-dl-plist { position: relative; height: 51px; overflow: hidden; }
#features .fx-dl-p { height: 24px; display: flex; align-items: center; gap: 7px; }
#features .fx-dl-pph { width: 20px; height: 20px; border-radius: 5px; flex: none; transition: opacity .3s ease; }
#features .fx-dl-pn {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .3s ease;
}
#features .fx-dl-ps { flex: none; display: grid; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
#features .fx-dl-pb,
#features .fx-dl-pc {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
  transition: opacity .3s ease;
}
#features .fx-dl-pb { color: var(--fx-positive); }
#features .fx-dl-pb svg { width: 9px; height: 9px; flex: none; }
#features .fx-dl-pc { color: var(--fx-ink3); opacity: 0; }
#features .fx-dl-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--fx-rule);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--fx-ink2);
  transition: opacity .3s ease, transform .16s ease, color .2s ease, border-color .2s ease;
}
#features .fx-dl-chip.is-press { transform: scale(.92); color: var(--fx-danger); border-color: currentColor; }
#features .fx-dl-p.is-cx .fx-dl-pb,
#features .fx-dl-p.is-cx .fx-dl-chip { opacity: 0; }
#features .fx-dl-p.is-cx .fx-dl-pc { opacity: 1; }
#features .fx-dl-p.is-cx .fx-dl-pph { opacity: .5; }
#features .fx-dl-p.is-cx .fx-dl-pn { color: var(--fx-ink3); }

/* ---- dark (landing-dark.v2.css turns the card's tokens; the literals here
   follow the dashboard's dark scheme: --positive #5FB98A, light send disc) */
html[data-theme="dark"] #features .fx-dl-of,
html[data-theme="dark"] #features .fx-dl-win { background: #2C2C31; border-color: #3B3B42; }
html[data-theme="dark"] #features .fx-dl-in { background: #1C1C1F; border-color: #3B3B42; }
html[data-theme="dark"] #features .fx-dl-send { background: #ECECEE; color: #161513; }
html[data-theme="dark"] #features .fx-dl-tk,
html[data-theme="dark"] #features .fx-dl-msg svg,
html[data-theme="dark"] #features .fx-dl-pb { color: #5FB98A; }
html[data-theme="dark"] #features .fx-dl-chip { border-color: #3B3B42; }
