/* The beta testers' chat in the Typing Racer 2.0 chat column (js/racer/betachat.js, games/typing-racer.php #bchat).
   One dark look in every theme, like the column's header (css/_u_trg.css #chatHead). */
#bchat{--bcBg:#12161d; --bcText:#dbe2ea; --bcSoft:#8b96a3; --bcLine:#232a35; --bcBlurple:#5865f2;
	position:absolute; inset:0; display:flex; flex-direction:column; margin:0; background:var(--bcBg); color:var(--bcText);
	font:14.5px/1.42 Lato, 'Open Sans', sans-serif; text-align:left;}
#bchat *{margin:0; box-sizing:border-box;}
#bchat .bcList{flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:10px 0 6px; scrollbar-width:thin; scrollbar-color:#2c3542 transparent;}
#bchat .bcState, #bchat .bcEmptyNote{position:absolute; top:0; left:0; right:0; padding:16px; color:var(--bcSoft); font-size:13.5px; pointer-events:none;}
#bchat .bcState{z-index:1; background:var(--bcBg);}
#bchat .bcState[hidden]{display:none;}
#bchat .bcEmptyNote{display:none;}
#bchat.bcIsEmpty .bcEmptyNote{display:block;}

/* a message: picture, name and time, then the text; the same person again soon after sits under it */
#bchat .bcMsg{position:relative; display:flex; gap:10px; padding:6px 12px 2px 12px; overflow-wrap:anywhere;}
#bchat .bcMsg.bcGrouped{padding-top:1px; padding-left:54px;}
#bchat .bcMsg:hover{background:rgba(255,255,255,.035);}
#bchat .bcMsg.bcAtMe{background:rgba(250,168,26,.08); box-shadow:inset 2px 0 0 #faa81a;}
#bchat .bcAv{flex:none; width:32px; height:32px; margin-top:2px; border-radius:50%; background:#232a35; object-fit:cover;}
#bchat .bcMain{flex:1 1 auto; min-width:0;}
#bchat .bcHead{display:flex; align-items:baseline; flex-wrap:wrap; gap:0 6px;}
#bchat .bcName{font-weight:700; color:#f2f5f8;}
#bchat button.bcNameBtn{margin:0; padding:0; border:0; background:none; font:inherit; font-weight:700; line-height:inherit; color:#f2f5f8; cursor:pointer;}		/* opens their racer card (owner, 2026-12-02) */
#bchat button.bcNameBtn:hover{text-decoration:underline;}
#bchat button.bcNameBtn:focus-visible{outline:2px solid #3fd0ff; outline-offset:2px; border-radius:3px;}
#bchat .bcTag{padding:0 4px; border-radius:3px; background:var(--bcBlurple); color:#fff; font-size:10px; font-weight:700; line-height:15px; letter-spacing:.03em;}
#bchat .bcTime{color:var(--bcSoft); font-size:11.5px; white-space:nowrap;}
#bchat .bcSide{position:absolute; left:10px; top:4px; width:40px; text-align:right; font-size:10px; opacity:0;}
#bchat .bcMsg:hover .bcSide{opacity:1;}
#bchat .bcText{color:var(--bcText); white-space:normal;}
#bchat .bcText a, #bchat .bcFile{color:#3fd0ff; text-decoration:none;}
#bchat .bcText a:hover, #bchat .bcFile:hover{text-decoration:underline;}
#bchat .bcText a.bcDcLink{padding:0 3px; border-radius:3px; background:rgba(88,101,242,.22); color:#c9cdfb; font-weight:600;}
#bchat .bcEdited{margin-left:5px; color:var(--bcSoft); font-size:10.5px;}
#bchat .bcRe{display:block; max-width:100%; margin:1px 0 2px; padding:0; border:0; background:none; color:var(--bcSoft); font:12.5px/1.4 Lato, 'Open Sans', sans-serif;
	text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
#bchat .bcRe::before{content:'\21AA'; margin-right:5px;}
#bchat .bcRe b{color:#c8d0da;}
#bchat button.bcRe{cursor:pointer;}
#bchat button.bcRe:hover{color:#c8d0da;}
#bchat button.bcRe:hover b{color:#fff;}

/* replying: each message's Reply button (on hover), the message being answered, the one a reply points at (lit a moment) */
#bchat .bcReplyBtn{position:absolute; top:-11px; right:10px; z-index:1; display:grid; place-items:center; width:28px; height:24px; padding:0; border:1px solid #2a3240;
	border-radius:6px; background:#1b212b; color:#b5bfcb; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .1s;}
#bchat .bcReplyBtn svg{width:16px; height:16px; fill:currentColor;}
#bchat .bcMsg:hover .bcReplyBtn, #bchat .bcReplyBtn:focus-visible{opacity:1; pointer-events:auto;}
#bchat .bcReplyBtn:hover{background:#262e3a; color:#fff;}
@media (hover: none){ #bchat .bcReplyBtn{opacity:.75; pointer-events:auto;} }
#bchat .bcMsg.bcReplyingTo{background:rgba(88,101,242,.12); box-shadow:inset 2px 0 0 var(--bcBlurple);}
#bchat .bcMsg.bcLit{animation:bcLit 1.8s ease-out;}
@keyframes bcLit{0%, 35%{background:rgba(88,101,242,.3);} 100%{background:transparent;}}
#bchat .bcAt{padding:0 2px; border-radius:3px; background:rgba(88,101,242,.3); color:#c9cdfb; font-weight:600;}
#bchat .bcAt.bcAtYou{background:rgba(250,168,26,.25); color:#ffd27a;}
#bchat .bcEmo{width:22px; height:22px; vertical-align:-6px; object-fit:contain;}
#bchat code{padding:1px 4px; border-radius:4px; background:#1e252f; font:13px/1.3 Consolas, 'Courier New', monospace;}
#bchat .bcCode{margin:3px 0; padding:7px 9px; border-radius:6px; background:#1a2029; border:1px solid var(--bcLine); font:12.5px/1.4 Consolas, 'Courier New', monospace; white-space:pre-wrap;}
#bchat .bcQuote{display:block; padding-left:8px; border-left:3px solid #4e5866;}
#bchat .bcH{display:block; margin:4px 0 2px; color:#f2f5f8; font-weight:800; line-height:1.25;}
#bchat .bcH1{font-size:18px;} #bchat .bcH2{font-size:16px;} #bchat .bcH3{font-size:15px;}
#bchat .bcSub{display:block; color:var(--bcSoft); font-size:12px;}
#bchat .bcLi{display:block; position:relative; padding-left:14px;}
#bchat .bcLi::before{content:''; position:absolute; left:4px; top:.62em; width:4px; height:4px; border-radius:50%; background:currentColor; opacity:.8;}
#bchat .bcSpoil{padding:0 2px; border-radius:3px; background:#202630; color:transparent; cursor:pointer;}
#bchat .bcSpoil.bcShown{background:rgba(255,255,255,.08); color:inherit; cursor:auto;}
#bchat .bcWhen{padding:0 2px; border-radius:3px; background:rgba(255,255,255,.07);}
#bchat .bcImg{display:block; width:max-content; margin:4px 0 2px; border-radius:6px; overflow:hidden; line-height:0;}
#bchat .bcImg img{display:block; max-width:100%; height:auto; background:#1a2029;}
#bchat .bcFile{display:inline-block; margin:3px 0; padding:4px 8px; border-radius:6px; background:#1a2029; border:1px solid var(--bcLine); font-size:13px;}
#bchat .bcSticker{color:var(--bcSoft); font-style:italic; font-size:13px;}
#bchat .bcMsg:last-child{padding-bottom:6px;}

/* "New messages" when you scrolled up to read */
#bchat .bcNew{position:absolute; left:50%; bottom:78px; transform:translateX(-50%); z-index:2; padding:5px 13px; border:0; border-radius:999px;
	background:var(--bcBlurple); color:#fff; font:700 12.5px Lato, sans-serif; cursor:pointer; box-shadow:0 3px 10px rgba(0,0,0,.4);}
#bchat .bcNew:hover{background:#4752c4;}
#bchat .bcNew[hidden]{display:none;}

/* writing */
#bchat .bcForm{flex:none; padding:8px 10px 10px; border-top:1px solid var(--bcLine); background:#10141b;}
#bchat .bcRow{display:flex; align-items:flex-end; gap:7px; padding:5px 5px 5px 11px; border:1px solid #2a3240; border-radius:10px; background:#1b212b;}
#bchat .bcRow:focus-within{border-color:var(--bcBlurple);}
#bchat .bcReplying{display:flex; align-items:center; gap:8px; margin:0 0 -1px; padding:5px 6px 6px 11px; border:1px solid #2a3240; border-bottom:0;
	border-radius:10px 10px 0 0; background:#161b23; color:var(--bcSoft); font-size:12.5px;}
#bchat .bcReplying[hidden]{display:none;}
#bchat .bcReplyWho{flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
#bchat .bcReplyWho b{color:#dbe2ea;}
#bchat .bcReplyX{flex:none; display:grid; place-items:center; width:22px; height:22px; padding:0; border:0; border-radius:50%; background:#2a3240; color:#dbe2ea;
	font-size:11px; line-height:1; cursor:pointer;}
#bchat .bcReplyX:hover{background:#3a4454; color:#fff;}
#bchat.bcIsReplying .bcRow{border-top-left-radius:0; border-top-right-radius:0;}
#bchat .bcBox{flex:1 1 auto; min-width:0; height:30px; max-height:120px; padding:5px 0; border:0; outline:0; resize:none; background:transparent;
	color:#eef2f6; font:14.5px/1.4 Lato, 'Open Sans', sans-serif;}
#bchat .bcBox::placeholder{color:#717c89;}
#bchat .bcBox:disabled{opacity:.6;}
#bchat .bcSend{flex:none; display:grid; place-items:center; width:32px; height:30px; padding:0; border:0; border-radius:7px; background:var(--bcBlurple); color:#fff; cursor:pointer;}
#bchat .bcSend:hover:not(:disabled){background:#4752c4;}
#bchat .bcSend:disabled{opacity:.45; cursor:default;}
#bchat .bcSend svg{width:16px; height:16px; fill:currentColor;}
#bchat .bcSend:focus-visible, #bchat .bcNew:focus-visible, #bchat .bcSpoil:focus-visible, #bchat .bcReplyBtn:focus-visible, #bchat .bcReplyX:focus-visible,
	#bchat button.bcRe:focus-visible{outline:2px solid #fff; outline-offset:2px;}
#bchat .bcUnder{display:flex; justify-content:space-between; gap:8px; min-height:16px; padding:3px 2px 0; font-size:11.5px; color:var(--bcSoft);}
#bchat .bcNote.bad, #bchat .bcCount.bad{color:#ff8a8a;}

/* the header's "Open in Discord" (beside the title, as the public chat's "Full server") */
#chatHead #bchatOpen{flex:none; display:flex; align-items:center; gap:6px; height:28px; margin:0; padding:0 11px; border-radius:14px; background:#5865F2;
	color:#fff; font:bold 12.5px Lato, sans-serif; text-decoration:none; white-space:nowrap;}
#chatHead #bchatOpen:hover{background:#4752c4;}
#chatHead #bchatOpen:focus-visible{outline:3px solid #fff; outline-offset:2px;}

/* new messages while the chat is hidden: a count on its tab */
#chatTab .bcDot{display:grid; place-items:center; min-width:20px; height:20px; margin:0; padding:0 5px; border-radius:10px; background:#f23f43; color:#fff;
	font:700 11.5px/1 Lato, sans-serif; writing-mode:horizontal-tb; transform:none; letter-spacing:0;}

/* deleting your own message (Nov 23 2026): a bin beside Reply, which moves over; the first click turns it into "Delete?" */
#bchat .bcCanDel .bcReplyBtn{right:42px;}
#bchat .bcDelBtn{position:absolute; top:-11px; right:10px; z-index:1; display:grid; place-items:center; width:28px; height:24px; padding:0; border:1px solid #2a3240;
	border-radius:6px; background:#1b212b; color:#b5bfcb; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .1s;}
#bchat .bcDelBtn svg{width:15px; height:15px; fill:currentColor;}
#bchat .bcMsg:hover .bcDelBtn, #bchat .bcDelBtn:focus-visible, #bchat .bcDelBtn.bcArmed{opacity:1; pointer-events:auto;}
#bchat .bcDelBtn:hover{background:#3a1d22; border-color:#5a2a31; color:#ff8a8a;}
#bchat .bcDelBtn.bcArmed{width:auto; padding:0 9px; border-color:#da373c; background:#da373c; color:#fff; font:700 12px/1 Lato, sans-serif;}
#bchat .bcDelBtn:disabled{opacity:.6; cursor:default;}
#bchat .bcDelBtn:focus-visible{outline:2px solid #fff; outline-offset:2px;}
@media (hover: none){ #bchat .bcDelBtn{opacity:.75; pointer-events:auto;} }

/* emoji as you type :name (Nov 23 2026): the list sits above the box */
#bchat .bcForm{position:relative;}
#bchat .bcEmoPick{position:absolute; left:10px; right:10px; bottom:calc(100% - 4px); z-index:3; max-height:290px; overflow-y:auto; padding:6px;
	border:1px solid #2a3240; border-radius:10px; background:#1b212b; box-shadow:0 -8px 24px rgba(0,0,0,.45); scrollbar-width:thin;}
#bchat .bcEmoPick[hidden]{display:none;}
#bchat .bcEmoHead{padding:2px 6px 6px; color:var(--bcSoft); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
	white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
#bchat .bcEmoOpt{display:flex; align-items:center; gap:10px; width:100%; padding:4px 8px; border:0; border-radius:6px; background:transparent;
	color:#c9d1db; font:14px/1.3 Lato, 'Open Sans', sans-serif; text-align:left; cursor:pointer;}
#bchat .bcEmoOpt.bcOn{background:#2b3442; color:#fff;}
#bchat .bcEmoFace{flex:none; width:26px; font-size:21px; line-height:26px; text-align:center;}
#bchat .bcEmoFace .bcEmo{width:22px; height:22px; margin:0; vertical-align:middle;}
#bchat .bcEmoName{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}

/* reactions (Nov 23 2026): a row of pills under the message (yours lit in blurple), a + after them and a smiley
   beside Reply on hover; the smiley or the + opens the list to pick one */
#bchat .bcReactBtn{position:absolute; top:-11px; right:42px; z-index:1; display:grid; place-items:center; width:28px; height:24px; padding:0; border:1px solid #2a3240;
	border-radius:6px; background:#1b212b; color:#b5bfcb; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .1s;}
#bchat .bcReactBtn svg{width:16px; height:16px; fill:currentColor;}
#bchat .bcCanDel .bcReactBtn{right:74px;}
#bchat .bcMsg:hover .bcReactBtn, #bchat .bcReactBtn:focus-visible{opacity:1; pointer-events:auto;}
#bchat .bcReactBtn:hover{background:#262e3a; color:#fff;}
@media (hover: none){ #bchat .bcReactBtn{opacity:.75; pointer-events:auto;} }
#bchat .bcRx{display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:4px 0 2px;}
#bchat .bcRxPill{display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 8px 0 6px; border:1px solid transparent; border-radius:8px;
	background:#1e252f; color:#b5bfcb; font:700 12.5px/1 Lato, 'Open Sans', sans-serif; cursor:pointer; transition:background .1s, border-color .1s;}
#bchat .bcRxPill:hover{border-color:#3a4454; background:#252d38;}
#bchat .bcRxPill.bcRxMine{border-color:var(--bcBlurple); background:rgba(88,101,242,.2); color:#dee0fc;}
#bchat .bcRxPill.bcRxMine:hover{background:rgba(88,101,242,.3);}
#bchat .bcRxPill.bcBusy{opacity:.55; cursor:progress;}
#bchat .bcRxFace{font-size:16px; line-height:1;}
#bchat .bcRxFace .bcEmo{width:17px; height:17px; vertical-align:-3px;}
#bchat .bcRxN{min-width:7px; text-align:center;}
#bchat .bcRxAdd{display:inline-flex; align-items:center; height:24px; padding:0 6px; border:1px solid transparent; border-radius:8px; background:#1e252f; color:#8b96a3;
	cursor:pointer; opacity:0; transition:opacity .1s;}
#bchat .bcRxAdd svg{width:15px; height:15px; fill:currentColor;}
#bchat .bcRxAdd b{margin-left:1px; font:700 12px/1 Lato, sans-serif;}
#bchat .bcMsg:hover .bcRxAdd, #bchat .bcRxAdd:focus-visible{opacity:1;}
#bchat .bcRxAdd:hover{border-color:#3a4454; color:#fff;}
@media (hover: none){ #bchat .bcRxAdd{opacity:.75;} }
#bchat .bcReactBtn:focus-visible, #bchat .bcRxPill:focus-visible, #bchat .bcRxAdd:focus-visible{outline:2px solid #fff; outline-offset:2px;}
#bchat .bcRxPick{position:absolute; right:10px; z-index:4; width:min(300px, calc(100% - 20px)); padding:8px; border:1px solid #2a3240; border-radius:10px;
	background:#1b212b; box-shadow:0 8px 28px rgba(0,0,0,.55);}
#bchat .bcRxPick[hidden]{display:none;}
#bchat .bcRxFind{display:block; width:100%; height:32px; padding:0 10px; border:1px solid #2a3240; border-radius:7px; outline:0; background:#12161d; color:#eef2f6;
	font:14px Lato, 'Open Sans', sans-serif;}
#bchat .bcRxFind:focus{border-color:var(--bcBlurple);}
#bchat .bcRxFind::placeholder{color:#717c89;}
#bchat .bcRxGrid{display:grid; grid-template-columns:repeat(8, 1fr); gap:2px; max-height:200px; margin-top:7px; overflow-y:auto; scrollbar-width:thin;}
#bchat .bcRxOpt{display:grid; place-items:center; aspect-ratio:1; padding:0; border:0; border-radius:6px; background:transparent; font-size:21px; line-height:1; cursor:pointer;}
#bchat .bcRxOpt.bcOn{background:#2b3442;}
#bchat .bcRxOpt .bcEmo{width:24px; height:24px; vertical-align:middle;}
#bchat .bcRxNone{grid-column:1 / -1; padding:10px 4px; color:var(--bcSoft); font-size:13px;}
#bchat .bcRxHint{min-height:17px; padding:5px 2px 0; color:var(--bcSoft); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
html.trgCalm #bchat .bcRxPill, html.trgCalm #bchat .bcRxAdd, html.trgCalm #bchat .bcReactBtn{transition:none;}

/* a Legendary or Mythic title someone just earned (js/racer/betachat.js TitleCard; Nov 29 2026) */
#bchat .bcTitle{position:relative; display:flex; gap:11px; align-items:center; margin:10px 12px 12px 14px; padding:11px 12px; border-radius:12px; isolation:isolate; text-align:left;
	background:radial-gradient(130% 150% at 0% 0%, rgba(255,180,58,.22), transparent 60%), rgba(22,16,4,.96); box-shadow:0 0 18px rgba(255,180,58,.25);}
#bchat .bcTitle::before{content:''; position:absolute; inset:0; border-radius:inherit; padding:1.5px; z-index:-1; background:linear-gradient(120deg, #ffcf5a, #ff9f1c, #ffcf5a);
	-webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);}
#bchat .bcTitle.bcTitleMythic{background:radial-gradient(130% 150% at 0% 0%, rgba(255,70,110,.25), transparent 60%), rgba(30,6,14,.97); box-shadow:0 0 18px rgba(255,70,110,.3);}
#bchat .bcTitle.bcTitleMythic::before{background:linear-gradient(120deg, #ff6b8b, #ffa24a, #ff6b8b);}
#bchat .bcTitleIco{flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; font-size:18px; color:#1b1300; background:linear-gradient(135deg, #ffcf5a, #ff9f1c);}
#bchat .bcTitleMythic .bcTitleIco{background:linear-gradient(135deg, #ff6b8b, #ffa24a);}
#bchat .bcTitleBody{flex:1 1 auto; min-width:0;}
#bchat .bcTitleTop{font:400 9px/1 'Russo One', sans-serif; letter-spacing:.14em; text-transform:uppercase; color:#ffcf5a; padding-right:56px;}
#bchat .bcTitleMythic .bcTitleTop{color:#ff8fa6;}
#bchat .bcTitleLine{margin-top:4px; font-size:13px; line-height:1.35; color:#e6e9f0;}
#bchat .bcTitleLine b{color:#fff;}
#bchat .bcTitleLine .racerName{display:inline;}
#bchat .bcTitleLine .racerTitle{font-size:16px;}
#bchat .bcTitleRule{margin-top:2px; font-size:11px; line-height:1.3; color:#a7afbf;}
#bchat .bcTitleTime{position:absolute; right:10px; top:9px; font-size:10px; color:#8790a3;}
