/* Add-on for js/block-chan-fill.js: the new-block channel (JD, 2026-12-03). All classes start blk-. */

/* ---- sidebar button: gold with a shine and a soft glow until you open it once ---- */
.chans button.blk-chan { position: relative; overflow: hidden; color: #F4D58D; font-weight: 600; border: 1px solid var(--gold-line); border-radius: var(--r-sm);
  background: linear-gradient(100deg, #D9A44114 0%, #D9A4412E 50%, #D9A44114 100%); animation: blk-glow 2.4s ease-in-out infinite; margin: 2px 0 4px }
.chans button.blk-chan::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, #FFE7A855 47%, #FFF3D0AA 50%, #FFE7A855 53%, transparent 70%); background-size: 250% 100%; animation: blk-shine 3.2s linear infinite }
.chans button.blk-chan > i, .chans button.blk-chan > span:not(.count):not(.blk-in) { display: none }
.chans button.blk-chan .blk-in { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0 }
.blk-emoji { font-size: 15px; line-height: 1 }
.blk-h { font-family: var(--font-mono); letter-spacing: .02em; flex: 1; text-align: left; white-space: nowrap }
.blk-tag { font: 700 10px var(--font-display); letter-spacing: .12em; color: #1a1305; background: linear-gradient(180deg, #F6D27A, #D9A441); border-radius: var(--r-round); padding: 2px 7px }
.chans button.blk-chan.on { background: linear-gradient(100deg, #D9A44126 0%, #D9A44147 50%, #D9A44126 100%); border-color: var(--gold) }
/* Opened once: quiet, so the next shine means a new block. */
.chans button.blk-chan.blk-seen { animation: none; background: none; border-color: var(--line-strong); color: var(--text) }
.chans button.blk-chan.blk-seen::after { display: none }
.chans button.blk-chan.blk-seen .blk-tag { background: none; color: var(--gold); border: 1px solid var(--gold-line); padding: 1px 6px }
.chans button.blk-chan.blk-seen.on { background: var(--surface-2); border-color: var(--gold-line) }
@keyframes blk-shine { 0% { background-position: 150% 0 } 100% { background-position: -100% 0 } }
@keyframes blk-glow { 0%, 100% { box-shadow: 0 0 0 0 #D9A44100 } 50% { box-shadow: 0 0 14px 1px #D9A44155 } }

/* ---- pinned card at the top of the channel ---- */
.blk-pin { position: relative; z-index: 2; margin: 0 0 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, #2a2111 0%, #17140d 55%, #141414 100%); box-shadow: 0 8px 24px #0008, inset 0 1px 0 #ffe7a81f; overflow: hidden }
@media (min-height: 760px) { .blk-pin { position: sticky; top: 0 } }
.blk-pin::before { content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, #FFE7A82e 50%, transparent 65%); background-size: 260% 100%; animation: blk-shine 4.5s linear infinite }
.blk-pin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px }
.blk-pinned { font: 600 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold) }
.blk-st { font-size: var(--fs-label); border-radius: var(--r-round); padding: 2px 9px; color: var(--text-muted); background: var(--surface-2) }
.blk-st.ok { color: var(--success); background: var(--success-wash) } .blk-st.paid { color: var(--gold); background: var(--gold-wash) } .blk-st.bad { color: var(--danger); background: var(--danger-wash) }
.blk-pin-main { display: flex; align-items: center; gap: 12px; margin-bottom: 12px }
.blk-pin-k { font-size: var(--fs-small); color: var(--text-muted) }
.blk-pin-h { font: 600 26px var(--font-mono); color: #F4D58D; text-decoration: none; text-shadow: 0 0 18px #D9A44166 }
.blk-pin-h small { font-size: 14px; color: var(--gold) } a.blk-pin-h:hover { text-decoration: underline }
.blk-pin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0 }
.blk-pin-grid dt { font: 500 10.5px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px }
.blk-pin-grid dd { margin: 0; color: var(--text); font-size: var(--fs-small); overflow-wrap: anywhere } .blk-pin-grid dd.mono { font-family: var(--font-mono); font-weight: 500 }
.blk-pin-grid small { color: var(--text-muted) } .blk-pin-grid small.gold { color: var(--gold) }
.blk-mode { font-size: var(--fs-label); border: 1px solid var(--line-strong); border-radius: var(--r-round); padding: 1px 9px; color: var(--text) }
.blk-mode.solo { border-color: var(--gold-line); color: var(--gold) }
.blk-pin-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid #D9A44133; font-size: var(--fs-label); color: var(--text-muted) }
@media (max-width: 900px) { .blk-pin-grid { grid-template-columns: 1fr 1fr } .blk-pin-h { font-size: 22px } }

/* ---- popup: shows for everyone when a block arrives, no reload ---- */
.blk-toast { position: fixed; left: 50%; top: 76px; z-index: 80; display: flex; align-items: center; gap: 12px; width: min(460px, 92vw); padding: 12px 14px;
  border-radius: var(--r-md); border: 1px solid var(--gold); background: linear-gradient(160deg, #2c2210, #171410); box-shadow: 0 12px 40px #000a, 0 0 30px #D9A44144;
  transform: translate(-50%, -160%); opacity: 0; transition: transform .5s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; pointer-events: none }
.blk-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto }
.blk-toast-ic { font-size: 26px; animation: blk-pop 1.2s ease-in-out infinite }
@keyframes blk-pop { 0%, 100% { transform: rotate(-8deg) scale(1) } 50% { transform: rotate(8deg) scale(1.12) } }
.blk-toast-tx { flex: 1; min-width: 0; display: flex; flex-direction: column }
.blk-toast-tx b { color: #F4D58D; font: 600 15px var(--font-display) } .blk-toast-tx span { color: var(--text-muted); font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.blk-toast-go { background: linear-gradient(180deg, #F6D27A, #D9A441); color: #1a1305; border: 0; border-radius: var(--r-sm); padding: 7px 14px; font-weight: 600; cursor: pointer }
.blk-toast-x { background: none; border: 0; color: var(--text-muted); font-size: 14px; cursor: pointer; padding: 4px }

.blk-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 79; overflow: hidden }
.blk-confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: .95; animation: blk-fall linear forwards }
@keyframes blk-fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9 } }
@media (prefers-reduced-motion: reduce) { .chans button.blk-chan, .chans button.blk-chan::after, .blk-pin::before, .blk-toast-ic { animation: none } }
