/* TVEmbed: real TrendVision bot messages in Discord's LIGHT theme, no client chrome.
   Values are Discord's own light-theme tokens (theme-light, visual refresh), read from discord.com's production CSS
   on 2026-11-24. Embed colours live inline in messages-light.js; this file only lays out the message around them. */
.tve {
  --tve-chat: #fbfbfb;        /* --background-base-lower (chat surface) */
  --tve-strong: #28282d;      /* --text-strong: username, titles, field names */
  --tve-text: #2e2e34;        /* --text-default: message text, field values, footer */
  --tve-muted: #6c6d76;       /* --text-muted */
  --tve-time: #70717a;        /* --chat-text-muted: timestamps */
  --tve-link: #006dd4;        /* --text-link */
  --tve-spine: #c5c6ca;       /* --spine-default: reply/interaction spine */
  --tve-brand: #5865f2;       /* --background-brand: APP tag */
  --tve-hover: rgba(151, 151, 159, .12); /* --message-background-hover */
  display: block;
  color: var(--tve-text);
  font-family: "gg sans", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.375; text-align: left;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  background: transparent;
}
.tve *, .tve *::before, .tve *::after { box-sizing: border-box; }

/* surface: "card" — Discord's light chat surface on a hairline card, for tinted page sections */
.tve--card {
  background: var(--tve-chat);
  border: 1px solid rgba(15, 17, 21, .08);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 17, 21, .04), 0 12px 32px -12px rgba(15, 17, 21, .14);
  padding: 14px 16px 16px 0;
}

/* channel label above a feed: "# options-flow" (no client chrome) */
.tve-chan { display: flex; align-items: center; gap: 6px; padding: 0 0 2px 16px; color: var(--tve-muted);
  font-size: 14px; line-height: 18px; font-weight: 600; }
.tve-chan svg { width: 16px; height: 16px; flex: 0 0 16px; display: block; }
.tve--card .tve-chan { padding-bottom: 10px; margin-bottom: 0; border-bottom: 1px solid rgba(151, 151, 159, .2); margin-left: 16px; padding-left: 0; }

/* cozy message (Discord metrics: 72px content indent, 40px avatar at 16px, 2px vertical padding, 17px group gap) */
.tve-msg { position: relative; padding: 2px 0 2px 72px; min-height: 22px; }
.tve-msg.is-start { min-height: 44px; }
.tve-msg.is-start + .tve-msg.is-start, .tve-msg + .tve-msg.is-start { margin-top: 17px; }
.tve-chan + .tve-msg.is-start { margin-top: 8px; }
.tve--card .tve-chan + .tve-msg.is-start { margin-top: 14px; }
.tve-av { position: absolute; left: 16px; top: 4px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #111214; }
.tve-av img { width: 100%; height: 100%; object-fit: contain; padding: 3px; display: block; }
.tve-msg.has-reply .tve-av { top: 26px; }

.tve-head { display: block; line-height: 22px; min-height: 22px; white-space: nowrap; }
.tve-name { color: var(--tve-strong); font-size: 16px; line-height: 22px; font-weight: 500; vertical-align: baseline; }
.tve-tag { display: inline-flex; align-items: center; height: 15px; padding: 0 4.4px; margin-left: 4px; border-radius: 4px;
  background: var(--tve-brand); color: #fff; font-size: 10px; line-height: 15px; font-weight: 600; text-transform: uppercase;
  vertical-align: top; position: relative; top: 4.8px; letter-spacing: .02em; }
.tve-time { margin-left: 4px; color: var(--tve-time); font-size: 12px; line-height: 22px; font-weight: 500; vertical-align: baseline; }
.tve-side-time { position: absolute; left: 0; top: 2px; width: 56px; text-align: right; color: var(--tve-time);
  font-size: 11px; line-height: 22px; font-weight: 500; opacity: 0; }
.tve-text { color: var(--tve-text); font-size: 16px; line-height: 22px; white-space: pre-wrap; overflow-wrap: break-word; }

/* accessories (embeds / attachments): Discord's grid, 4px apart, 2px block padding */
.tve-acc { display: grid; grid-auto-flow: row; row-gap: 4px; padding: 2px 0; justify-items: start; }
.tve-acc > * { max-width: 100%; margin-top: 0 !important; }
.tve-acc a { margin-bottom: 0 !important; }
.tve-acc > [data-dc="accessory"]:has([data-dc="thumbnail"]) { justify-self: stretch; } /* thumbnail is pinned right: give the embed its full 520 */
.tve-acc [data-dc="image"] { border-radius: 8px; max-width: 100%; height: auto; }
/* transparent bot charts drawn for Discord dark (white text): show them on the dark embed colour they were made for */
.tve-acc img.tve-darkimg { background: #2b2d31; }
.tve-acc img.tve-darkglyph { background: #2b2d31; padding: 4px; box-sizing: border-box; object-fit: contain; }
.tve-acc [data-dc="thumbnail"].tve-darkglyph, .tve-acc [data-dc="thumbnail"] .tve-darkglyph { padding: 12px; border-radius: 8px; }
/* markdown headings inside embeds: Discord's sizes (h1 1.5rem, h2 1.25rem, h3 1rem, bold, 1.375em), shielded from page h1-h3 rules */
.tve .tve-acc :is(h1, h2, h3, h4) { display: block; font-family: inherit !important; font-size: 16px !important; line-height: 1.375em !important; letter-spacing: normal !important;
  text-transform: none !important; border: 0 !important; padding: 0 !important; background: none !important; gap: normal !important; }
.tve .tve-acc h1 { font-size: 24px !important; } .tve .tve-acc h2 { font-size: 20px !important; }
.tve .tve-acc p { font-family: inherit; letter-spacing: normal; text-transform: none; }
/* Discord spaces embed sections with .embedMargin (8px) and sets titles 16/22; the docs builder used 4px/2px and 16/20 */
.tve [data-dc="accessory"] > div > * + * { margin-top: 8px !important; }
.tve [data-dc="author"] { margin-bottom: 0 !important; min-height: 24px !important; }
.tve [data-dc="title"] { margin-bottom: 0 !important; line-height: 22px !important; }

/* interaction line: "trader used /flow" with the curved spine into the avatar */
.tve-reply { position: relative; display: flex; align-items: center; height: 18px; margin-bottom: 4px; color: var(--tve-muted);
  font-size: 14px; line-height: 18px; white-space: nowrap; }
.tve-reply::before { content: ""; position: absolute; left: -36px; top: 8px; width: 32px; height: 14px;
  border-left: 2px solid var(--tve-spine); border-top: 2px solid var(--tve-spine); border-top-left-radius: 6px; }
.tve-rav { width: 16px; height: 16px; border-radius: 50%; margin-right: 4px; background: var(--tve-brand); color: #fff;
  font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 0 0 16px; }
.tve-ruser { color: var(--tve-strong); font-weight: 500; margin-right: 4px; opacity: .64; }
.tve-rused { margin-right: 4px; }
.tve-rcmd { color: var(--tve-link); font-weight: 500; }

/* compact: the embed alone (no avatar, name row or interaction line), flush left */
.tve--compact .tve-msg { padding-left: 0; min-height: 0; }
.tve--compact.tve--card { padding: 14px 16px 16px; }
