/* Trending (see public/js/trending.js): ticker flames, the rail box with photos, the profile's "Trending now" section */

/* Ticker */
.tk-item.hot { background: color-mix(in srgb, #ff6a2b 16%, transparent); border-radius: 999px; padding: 0 12px; }
.tk-fire { font-size: 15px; animation: trn-flick 1.4s ease-in-out infinite; display: inline-block; }
.tk-why { margin-left: 8px; font-size: 12px; font-weight: 600; color: #ffb38a; white-space: nowrap; }
@keyframes trn-flick { 50% { transform: scale(1.18) rotate(-6deg); } }

/* Rail box */
.trn-rail { border: 1px solid color-mix(in srgb, #ff6a2b 45%, transparent); box-shadow: 0 0 26px -10px #ff6a2b, var(--shadow); }
.trn-list { display: grid; gap: 4px; }
.trn-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s; }
.trn-item:hover { background: var(--surface-2); }
.trn-item img, .trn-item .ph-fallback { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; box-shadow: 0 0 0 2px var(--c, var(--line)), 0 0 14px -4px var(--c, transparent); }
.trn-item[data-b="left"] { --c: var(--left); } .trn-item[data-b="right"] { --c: var(--right); } .trn-item[data-b="center"] { --c: var(--center); }
.trn-txt { display: grid; gap: 1px; min-width: 0; }
.trn-txt b { font-size: 15px; }
.trn-txt small { font-size: 12px; color: var(--ink-2); }
.trn-txt em { font-style: normal; font-size: 12px; font-weight: 600; color: #ff8a4c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-up { font-style: normal; font-weight: 800; color: #3ddc84; font-family: var(--mono); }

/* Profile section */
.trn-box { display: grid; gap: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, #ff6a2b 14%, var(--surface)), var(--surface) 60%);
  border: 1px solid color-mix(in srgb, #ff6a2b 45%, transparent); box-shadow: 0 0 30px -12px #ff6a2b; }
.trn-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.trn-flame { font-size: 34px; animation: trn-flick 1.4s ease-in-out infinite; }
.trn-head h3 { margin: 0; font-size: 22px; }
.trn-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.trn-spark { width: 92px; height: 34px; }
.trn-spark rect { fill: color-mix(in srgb, var(--ink-2) 50%, transparent); }
.trn-spark rect.now { fill: #ff6a2b; }
.trn-box h4 { margin: 0 0 6px; font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.trn-why p { margin: 0 0 8px; font-size: 16px; line-height: 1.45; }
.trn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trn-chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, #ff6a2b 50%, transparent); background: color-mix(in srgb, #ff6a2b 12%, transparent); color: var(--ink); font-weight: 700; cursor: pointer; }
.trn-chip:hover { background: color-mix(in srgb, #ff6a2b 24%, transparent); }
.trn-bar { display: flex; height: 30px; border-radius: 999px; overflow: hidden; margin-bottom: 10px; font: 700 12px/30px var(--mono); color: #fff; }
.trn-bar i { font-style: normal; text-align: center; white-space: nowrap; overflow: hidden; min-width: 34px; }
.trn-bar i[data-b="left"] { background: var(--left); } .trn-bar i[data-b="center"] { background: var(--center); } .trn-bar i[data-b="right"] { background: var(--right); }
.trn-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .trn-cols { grid-template-columns: 1fr; } }
.trn-col { display: grid; align-content: start; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); border-top: 4px solid var(--c); }
.trn-col[data-b="left"] { --c: var(--left); } .trn-col[data-b="center"] { --c: var(--center); } .trn-col[data-b="right"] { --c: var(--right); }
.trn-col h5 { margin: 0; font-size: 14px; display: flex; justify-content: space-between; }
.trn-col h5 span { font-family: var(--mono); color: var(--ink-2); }
.trn-frame { margin: 0; font-size: 13px; font-style: italic; color: var(--ink-2); }
.trn-story { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; text-decoration: none; color: var(--ink); min-height: 44px; }
.trn-story img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.trn-story span { display: grid; gap: 2px; grid-column: -2 / -1; }
.trn-story b { font-size: 13px; line-height: 1.3; }
.trn-story small { font-size: 11px; color: var(--ink-2); }
.trn-outlets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.trn-outlets a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; background: var(--surface-2); border-left: 3px solid var(--c); }
.trn-outlets a[data-b="left"] { --c: var(--left); } .trn-outlets a[data-b="center"] { --c: var(--center); } .trn-outlets a[data-b="right"] { --c: var(--right); }
.trn-go { display: flex; flex-wrap: wrap; gap: 8px; }
.trn-go .btn { min-height: 44px; flex: 1 1 220px; justify-content: center; }
.trn-fine { margin: 0; font-size: 12px; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .tk-fire, .trn-flame { animation: none; } }
/* Inside the profile panel there's no room for 3 columns: stack the sides, stories as image + headline rows */
.drawer-panel .trn-cols { grid-template-columns: 1fr; }
.trn-story { grid-template-columns: minmax(0, 1fr); }
.trn-story:has(img) { grid-template-columns: 72px minmax(0, 1fr); }
.trn-story img { width: 72px; height: 56px; }
.trn-story span { grid-column: auto; }
.trn-story b { font-size: 14px; }
.trn-head { padding-right: 48px; }   /* room for the panel's close button */
