/* Channel media picker (template link items) and the scroll-to-latest arrow. */
.tgagg .channel-picker-modal{display:flex;flex-direction:column;width:min(520px,96vw);height:min(86vh,760px);max-height:calc(var(--app-height,100vh) - 24px);padding:0;overflow:hidden}
.tgagg .channel-picker-modal .modal-head{flex:0 0 auto}
.tgagg .channel-picker-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:6px;padding:12px 10px 9px;background:linear-gradient(rgba(167,198,217,.88),rgba(167,198,217,.88));-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
.tgagg .channel-picker-note{align-self:center;text-align:center;padding:8px 12px;margin:4px 0;border-radius:999px;background:rgba(0,0,0,.18);color:#fff;font-size:12.5px}
.tgagg .channel-item{display:flex;align-items:flex-end;gap:8px;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:14px;padding:2px 4px}
.tgagg .channel-item.selected{background:rgba(51,144,236,.22)}
.tgagg .channel-check{flex:0 0 auto;width:22px;height:22px;margin-bottom:6px;border-radius:50%;border:2px solid rgba(255,255,255,.9);background:rgba(0,0,0,.12);color:#fff;font-size:14px;line-height:18px;text-align:center;font-weight:800}
.tgagg .channel-item.selected .channel-check{background:#3390ec;border-color:#3390ec}
.tgagg .channel-bubble{position:relative;max-width:min(340px,78%);padding:3px;border-radius:13px;border-bottom-left-radius:4px;background:var(--incoming,#fff);box-shadow:0 1px 1px rgba(0,0,0,.08)}
.tgagg .channel-thumb{position:relative;overflow:hidden;border-radius:11px;background:#111;min-width:160px;min-height:100px;max-height:340px}
.tgagg .channel-thumb img{display:block;width:100%;max-height:340px;object-fit:cover}
.tgagg .channel-thumb-empty{width:100%;height:160px;background:#222}
.tgagg .channel-play{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;border-radius:50%;background:rgba(0,0,0,.5)}
.tgagg .channel-play::after{content:"";position:absolute;left:21px;top:16px;border-style:solid;border-width:11px 0 11px 18px;border-color:transparent transparent transparent #fff}
.tgagg .channel-play.small{width:28px;height:28px;margin:-14px 0 0 -14px}
.tgagg .channel-play.small::after{left:11px;top:8px;border-width:6px 0 6px 10px}
.tgagg .channel-meta{position:absolute;left:8px;top:8px;padding:2px 7px;border-radius:999px;background:rgba(0,0,0,.5);color:#fff;font-size:11.5px;font-weight:700}
.tgagg .channel-caption{padding:5px 7px 0;font-size:14px;line-height:1.35;white-space:pre-wrap;word-break:break-word}
.tgagg .channel-time{padding:2px 7px 2px;text-align:right;font-size:11px;color:#7f8c99}
.tgagg .channel-picker-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid rgba(0,0,0,.08);background:#fff}
.tgagg .channel-picker-count{font-weight:700;color:#334155}
.tgagg .channel-picker-foot .btn[disabled]{opacity:.45;pointer-events:none}
.tgagg .channel-preview-item{position:relative}
.tgagg .channel-preview-item img{display:block;width:100%;height:100%;object-fit:cover}
.tgagg .channel-preview-play{position:absolute;right:2px;bottom:2px;z-index:2;width:24px;height:24px;border:2px solid #fff;border-radius:50%;background:#2f8cf0;box-shadow:0 1px 4px rgba(0,0,0,.35);cursor:pointer;padding:0}
.tgagg .channel-preview-play::after{content:"";position:absolute;left:7px;top:4px;border-left:7px solid #fff;border-top:5px solid transparent;border-bottom:5px solid transparent}
.tgagg .channel-preview-remove{position:absolute;right:2px;top:2px;width:20px;height:20px;border:0;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:14px;line-height:18px;cursor:pointer;padding:0}
.tgagg .scroll-down-btn{position:absolute;right:14px;bottom:90px;z-index:7;width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:50%;background:#fff;color:#707579;box-shadow:0 2px 8px rgba(0,0,0,.22);cursor:pointer;opacity:0;transform:translateY(10px) scale(.9);pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.tgagg .scroll-down-btn.show{opacity:1;transform:none;pointer-events:auto}
