/* V58.26 | cinema social inteligente, leve e sem novas consultas Firebase. */
/* Ultimas 3 mensagens: discretas, à esquerda e acima das legendas tradicionais. */
body:has(#roomColumns) #roomColumns#roomColumns.v52-clean-immersive.v53-clean-immersive.v54-room-stage.v54-theater-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v27ChatFeed.v27-visible{
 display:flex!important;visibility:visible!important;opacity:1!important;
 position:absolute!important;z-index:218!important;pointer-events:none!important;
 left:clamp(10px,2.1vw,22px)!important;right:auto!important;
 bottom:clamp(58px,16dvh,116px)!important;
 width:min(350px,52vw)!important;max-width:52vw!important;max-height:52dvh!important;
 gap:5px!important;flex-direction:column!important;align-items:flex-start!important;
 overflow:hidden!important;
}
body:has(#roomColumns) #roomColumns#roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v27ChatFeed.v27-visible>.v27-chat-line{
 display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
 box-sizing:border-box!important;max-width:100%!important;width:auto!important;min-width:0!important;
 border-radius:13px!important;padding:5px 8px!important;
 background:rgba(17,9,30,.67)!important;border:1px solid rgba(196,149,232,.28)!important;
 box-shadow:0 4px 13px #0006!important;backdrop-filter:blur(8px);
 font-size:clamp(10px,1.35vw,13px)!important;line-height:1.23!important;
 text-shadow:0 1px 3px #000!important;
}
#roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #v27ChatFeed .v43-feed-words{
 display:flex!important;align-items:baseline!important;flex-wrap:wrap!important;gap:3px 6px!important;
 min-width:0!important;overflow:hidden!important;max-height:3.1em!important;
}
#roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #v27ChatFeed .v43-feed-words>span{
 display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
 overflow:hidden!important;overflow-wrap:anywhere!important;line-height:1.25!important;
}
#roomColumns.v54-room-stage.v27-mode-overlay.v58-hide-feed:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v27ChatFeed,
#roomColumns.v54-room-stage.v27-mode-overlay.v43-chat-muted:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v27ChatFeed{
 display:none!important;visibility:hidden!important;opacity:0!important;
}
/* Botão compacto, acima da camada de toques do YouTube e abaixo da barra de opções. */
#roomColumns.v54-room-stage #videoWrap>#v5826ChatPeek{display:none!important;visibility:hidden!important}
#roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v5826ChatPeek{
 display:inline-flex!important;visibility:visible!important;position:absolute!important;
 z-index:280!important;right:clamp(10px,1.5vw,18px)!important;
 bottom:clamp(52px,13dvh,92px)!important;gap:6px!important;align-items:center!important;
 min-height:35px!important;min-width:60px!important;width:auto!important;max-width:130px!important;
 padding:6px 10px!important;margin:0!important;
 color:#fff!important;background:rgba(22,13,39,.83)!important;
 border:1px solid rgba(197,137,236,.7)!important;border-radius:20px!important;
 box-shadow:0 4px 16px #000b!important;backdrop-filter:blur(9px);
 font:700 12px system-ui,sans-serif!important;cursor:pointer!important;touch-action:manipulation!important;
}
#roomColumns.v54-room-stage #videoWrap>#v5826ChatPeek .v5826-chat-unread:not([hidden]){
 display:grid!important;place-items:center!important;min-width:19px!important;height:19px!important;
 padding:0 4px!important;border-radius:15px!important;background:#26ac7c!important;
 color:#031d15!important;font:800 10px system-ui,sans-serif!important;
}
#roomColumns.v54-room-stage #videoWrap>#v5826ChatPeek .v5826-chat-unread[hidden]{display:none!important}
#roomColumns.v54-room-stage #videoWrap>#v5826ChatPeek.v5826-chat-open{
 background:rgba(14,91,64,.93)!important;border-color:#50e8ad!important;
}
#roomColumns.v54-room-stage #videoWrap>#v5826ChatPeek:focus-visible,
#roomColumns.v54-room-stage #v5826CloseSide:focus-visible{outline:2px solid #c3ffd9!important;outline-offset:2px!important}
/* O chat lateral ocupa aproximadamente 35% do fullscreen, sem cortar ou esticar o player. */
@media (orientation:landscape){
 body:has(#roomColumns) #roomColumns#roomColumns.v54-room-stage.v27-mode-side:is(:fullscreen,.v26-pseudo-stage){
  display:grid!important;grid-template-columns:minmax(0,65fr) minmax(210px,35fr)!important;
  grid-template-rows:minmax(0,1fr)!important;gap:0!important;
 }
 body:has(#roomColumns) #roomColumns.v54-room-stage.v27-mode-side>.cinema-chat-panel{
  display:flex!important;position:relative!important;grid-column:2!important;grid-row:1!important;
  overflow:hidden!important;min-width:0!important;height:100%!important;
  border-left:1px solid rgba(194,137,235,.4)!important;background:#100b1b!important;
 }
}
/* Recolher o painel opcionalmente, sem sair da tela cheia. */
#roomColumns.v54-room-stage #v5826CloseSide{display:none!important}
#roomColumns.v54-room-stage.v27-mode-side:is(:fullscreen,.v26-pseudo-stage) #v5826CloseSide{
 display:inline-flex!important;flex:0 0 auto!important;align-self:flex-end!important;
 z-index:100!important;min-height:28px!important;padding:5px 10px!important;
 margin:4px 8px!important;order:-1!important;border:1px solid #a77bc2!important;
 border-radius:11px!important;color:#e8daf1!important;background:#3b2851!important;
 font:600 11px system-ui,sans-serif!important;
}
@media (orientation:portrait){
 #roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v27ChatFeed.v27-visible{
  left:10px!important;bottom:clamp(82px,15dvh,135px)!important;width:min(65vw,340px)!important;max-width:65vw!important;
 }
 #roomColumns.v54-room-stage.v27-mode-overlay:is(:fullscreen,.v26-pseudo-stage) #videoWrap>#v5826ChatPeek{
  right:10px!important;bottom:clamp(75px,13dvh,120px)!important;
 }
}
@media (prefers-reduced-motion:reduce){
 #roomColumns #v27ChatFeed{transition:none!important}
}
