/* Chat Live loyalty UI. Never load third-party animation or media assets. */
.cl-join-banner{display:inline-flex!important;align-items:center;gap:9px;justify-content:center;
 max-width:min(94%,550px);padding:7px 15px;border:1px solid #48658d;
 border-radius:20px;background:linear-gradient(120deg,#193158ee,#1b274cee);
 color:#d9edff;font-size:12px;line-height:1.65;margin:8px auto;
 box-shadow:0 3px 12px #03091433;direction:rtl}
.cl-join-banner .cl-join-name{font-weight:850;color:#e9f7ff}
.cl-join-banner .cl-join-symbol{font-size:20px;display:inline-block;flex:none}
.cl-join-banner .cl-join-description{font-size:11px;color:#c5d7ee}
.cl-join-banner[data-tier=free]{border-color:#3a8198;background:linear-gradient(115deg,#123647,#142f58)}
.cl-join-banner[data-tier=pro]{border-color:#b68dcf;background:linear-gradient(110deg,#39305e,#241e52)}
.cl-join-banner[data-tier=max]{border-color:#d5b16d;background:linear-gradient(110deg,#594323,#382753)}
.cl-join-banner[data-tier=super_admin]{border-color:#5fe8e4;background:linear-gradient(115deg,#075869,#273d81)}
.cl-join-banner[data-tier=pro] .cl-join-symbol{animation:cl-join-wave 2s ease-in-out 2}
.cl-join-banner[data-tier=max] .cl-join-symbol{animation:cl-join-bounce 1.5s ease-out 2}
.cl-join-banner.cl-join-glow{box-shadow:0 0 20px #52e9f650;border-color:#73dffc}
.cl-join-banner.cl-join-glow .cl-join-symbol{animation:cl-join-bounce 1.7s ease-out 2}
@keyframes cl-join-bounce{0%,100%{transform:scale(1)}45%{transform:scale(1.4)}}
@keyframes cl-join-wave{0%,100%{transform:rotate(0)}50%{transform:rotate(15deg)}}
.cl-community-settings{border:1px solid #3c5d87;background:#12244c77;border-radius:13px;padding:14px;margin:14px 0}
.cl-community-form{display:flex;flex-direction:column;gap:8px}
.cl-community-row{display:grid;grid-template-columns:minmax(80px,1fr) repeat(2,minmax(110px,1fr));
 align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #314d71}
.cl-community-row select,.cl-community-options select{width:100%;min-height:40px;background:#172b4a;
 color:#e6f7ff;border:1px solid #4d729e;border-radius:9px;padding:8px}
.cl-community-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 0}
.cl-community-options label{font-size:12px;color:#b8d5e9}
.cl-coins-summary{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:13px 15px;
 color:#ffecb6;border:1px solid #96764d;border-radius:12px;background:linear-gradient(135deg,#3f3229,#19284e)}
.cl-reward-hint{font-size:12px;color:#bbd1ee;line-height:1.8}
.cl-reward-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}
.cl-reward-card{display:flex;flex-direction:column;gap:8px;border:1px solid #41689c;border-radius:13px;
 background:linear-gradient(145deg,#1b3160,#261f4b);padding:14px;min-width:0}
.cl-reward-card-title{font-weight:800;color:#f0f4ff}
.cl-reward-card small{color:#bdd1e8;font-size:11px}
.cl-reward-card button,.cl-reward-button{min-height:38px;padding:8px 12px;border-radius:9px;
 border:1px solid #6ca8d9;background:#2f4787;color:#f2f8ff;font-weight:750;cursor:pointer}
.cl-reward-card button:hover:not(:disabled),.cl-reward-button:hover{background:#3b66a4}
.cl-reward-card button:disabled{opacity:.47;cursor:not-allowed}
.cl-coin-history{display:flex;flex-direction:column;gap:3px;max-height:200px;overflow:auto}
.cl-coin-transaction{display:flex;justify-content:space-between;gap:14px;padding:7px 9px;
 border-bottom:1px solid #324363;font-size:12px}
.cl-coin-transaction strong{font-variant-numeric:tabular-nums;color:#ffdb80}
#cl-reward-store-button{padding:5px 10px;min-height:34px;border-radius:9px;
 border:1px solid #6a70ab;background:linear-gradient(120deg,#363269,#245c79);
 color:#e3f7ff;font-size:12px;cursor:pointer;white-space:nowrap}
#cl-reward-store-button:hover{border-color:#6ce5df;background:#3b508b}
.cl-admin-reward-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:10px}
.cl-admin-reward-item{padding:12px;border:1px solid #45648d;border-radius:11px;display:flex;flex-direction:column;gap:8px}
.cl-admin-reward-item input,.cl-admin-reward-item select,.cl-admin-coins-adjust input{
 width:100%;min-height:36px;border:1px solid #45648d;background:#102448;
 color:#f3f7ff;border-radius:8px;padding:7px}
.cl-admin-coins-adjust{display:grid;grid-template-columns:2fr 1fr 2fr auto;gap:8px;margin:14px 0}
@media(max-width:640px){
 .cl-join-banner{gap:5px;padding:5px 8px;font-size:11px}
 .cl-community-row{grid-template-columns:1fr 1fr}
 .cl-community-row strong{grid-column:1/-1}
 .cl-community-options{grid-template-columns:1fr}
 .cl-reward-grid{grid-template-columns:1fr}
 .cl-admin-coins-adjust{grid-template-columns:1fr}
 #cl-reward-store-button{font-size:0;min-width:33px;min-height:33px;padding:5px 8px}
 #cl-reward-store-button::after{content:'🎁';font-size:18px}
}
@media(prefers-reduced-motion:reduce){
 .cl-join-banner .cl-join-symbol{animation:none!important}
}


/* Rewards belong inside the existing focus control zone, never in an
   implicit second CSS-grid row of the room toolbar. */
.shell.cl-stream-layout .room-toolbar #cl-focus-side-controls #cl-reward-store-button{
 display:inline-flex;align-items:center;justify-content:center;
 flex:0 0 auto;min-height:33px;max-height:35px;
 width:auto;max-width:110px;margin:0;
}
@media(max-width:1100px){
 .shell.cl-stream-layout .room-toolbar #cl-focus-side-controls #cl-reward-store-button{
  font-size:0;min-width:34px;max-width:34px;width:34px;padding:4px;
 }
 .shell.cl-stream-layout .room-toolbar #cl-focus-side-controls #cl-reward-store-button::after{
  content:'🎁';font-size:17px;
 }
}
@media(min-width:821px) and (max-width:1000px){
 .shell.cl-stream-layout .room-toolbar .cl-room-center #discover-toggle{
  width:34px;min-width:34px;max-width:34px;
  padding:4px!important;justify-content:center;
 }
 .shell.cl-stream-layout .room-toolbar .cl-room-center #discover-toggle>span{
  display:none!important;
 }
}


/* Non-blocking room-event overlay: never part of the scrollable conversation.
   Each entry is removed by a JS timer (2/4/6/8 seconds by membership). */
.shell.cl-stream-layout #chat-area{
 position:relative;
}
.shell.cl-stream-layout #chat-area > .cl-room-event-popups{
 position:absolute;
 top:clamp(60px,11%,120px);
 left:clamp(10px,1.8vw,24px);
 right:auto;
 transform:none;
 display:flex;
 flex-direction:column;
 align-items:flex-start;
 gap:7px;
 width:min(36%,340px);
 max-height:min(54vh,360px);
 overflow:hidden;
 box-sizing:border-box;
 pointer-events:none;
 z-index:17;
}
/* New arrivals queue instead of being silently clipped or losing their
   tier duration. Keep the counter below the three currently visible cards. */
.shell.cl-stream-layout #chat-area > .cl-room-event-popups[data-waiting-label]::after{
 content:attr(data-waiting-label);
 align-self:flex-start;
 border:1px solid #6883ac99;
 background:#132a4cdd;
 color:#dbeafd;
 font-size:11px;
 font-weight:700;
 border-radius:9px;
 padding:4px 9px;
 line-height:1.4;
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup{
 display:inline-flex!important;
 flex:0 0 auto;
 align-items:center;
 justify-content:center;
 width:max-content;
 max-width:100%;
 box-sizing:border-box;
 min-height:38px;
 padding:8px 14px;
 margin:0!important;
 border-radius:12px!important;
 text-align:center;
 white-space:normal;
 overflow-wrap:anywhere;
 box-shadow:0 7px 24px #041028b3;
 pointer-events:none;
 animation:cl-room-popup-lifetime var(--cl-room-popup-duration,4000ms) ease-in-out forwards;
}
/* The notice remains fully readable until its final brief fade-out.
   Tier durations and queue ownership continue to be governed by JS. */
@keyframes cl-room-popup-lifetime{
 0%,90%{opacity:1;transform:translateY(0) scale(1)}
 100%{opacity:0;transform:translateY(-5px) scale(.99)}
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup{
 color:#f4fbff!important;
 background:#1c385bcc;
 text-shadow:0 1px 1px #031023b3;
 animation-timing-function:linear!important;
 box-shadow:0 5px 15px #030c21a3!important;
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup .cl-join-description{
 color:#d5eaff!important;
 opacity:1!important;
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup[data-tier="super_admin"]{
 background:#174b62f2!important;
 border-color:#64e3e8!important;
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup[data-tier="max"]{
 background:#413956f2!important;
 border-color:#d7b578!important;
}
.shell.cl-stream-layout #chat-area .cl-room-event-popup[data-tier="pro"]{
 background:#36355ef2!important;
 border-color:#ac96d6!important;
}
@media(max-width:590px){
 .shell.cl-stream-layout #chat-area > .cl-room-event-popups{
  top:54px;
  left:10px;
  right:auto;
  width:min(62%,280px);
 }
 .shell.cl-stream-layout #chat-area .cl-room-event-popup{
  padding:7px 9px;
  gap:5px;
  line-height:1.35;
 }
}
@media(prefers-reduced-motion:reduce){
 .shell.cl-stream-layout #chat-area .cl-room-event-popup{
  animation:none!important;
 }
}
