/* Shared live controls: three actions and an integrated conversation. */
body.immersive-live { --live-chat-height:clamp(140px,28dvh,260px); --live-avatar-size:clamp(64px,19vw,88px); }
body.immersive-live .shell { display:block; }
body.immersive-live :is(.side,.topbar,.nav) { display:none !important; }
body.immersive-live .main { width:100%; height:100dvh; margin:0; position:relative; }
body.immersive-live .content { height:100%; padding:0 !important; overflow:hidden; }
body.immersive-live #liveRoom { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; gap:0; }
body.immersive-live #roomsPanel { position:relative; width:100%; height:100%; margin:0; padding:0; border:0; border-radius:0; background:transparent; overflow:hidden; isolation:isolate; }
body.immersive-live #roomsPanel::before { content:''; position:absolute; inset:0; z-index:0; background:linear-gradient(180deg,#16090733,transparent 35%,#10080b33 65%,#0b070bcc); pointer-events:none; }
body.immersive-live #sharedRoomSession:not(.hidden) { position:absolute; inset:0; display:block; }
body.immersive-live .room-header { position:absolute; z-index:25; left:14px; top:max(16px,env(safe-area-inset-top)); max-width:calc(100% - 120px); display:flex; align-items:center; gap:10px; margin:0; }
body.immersive-live .room-header :is(.eyebrow,.room-status) { display:none; }
body.immersive-live #sharedRoomTitle { max-width:min(48vw,440px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0; font-size:13px; line-height:1.4; color:#ffe4cb; text-shadow:0 1px 6px #000; }
.live-minimize { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; border:1px solid #fff2; background:#080608bb; color:#ffe5cc; font:30px/1 system-ui; }
body.immersive-live #roomsPanel .room-bottom-tools { position:absolute; z-index:40; top:max(12px,env(safe-area-inset-top)); right:14px; min-height:38px; margin:0; padding:0; }
body.immersive-live #sharedDirectoryState { display:none; }
body.immersive-live #roomsPanel .presence-trigger { min-height:38px; border-radius:24px; padding:7px 10px; background:#080608bb; color:#ffe5cc; border-color:#fff2; }
body.immersive-live .presence-menu { top:calc(100% + 8px); bottom:auto; left:auto; right:0; max-height:50dvh; }
body.immersive-live #roomsPanel .room-primary-actions { position:absolute; z-index:35; left:14px; right:14px; bottom:calc(var(--live-chat-height) + 28px + var(--chat-keyboard-inset,0px) + env(safe-area-inset-bottom)); display:flex !important; justify-content:flex-end; gap:8px; min-height:42px; margin:0; padding:0; max-width:none; }
body.immersive-live #roomsPanel .room-primary-actions > .btn, body.immersive-live #roomsPanel .room-more > summary { width:auto; min-height:42px; padding:8px 16px; border:1px solid #ffe2c844; border-radius:24px; background:#24120bdd; color:#ffe4cb; font-size:11px; backdrop-filter:blur(12px); }
body.immersive-live #roomsPanel :is(#sharedMic,#sharedCamera)[aria-pressed='true'] { background:#f87526e6; color:#2a1108; border-color:#ffbf7d; }
body.immersive-live #roomsPanel .room-more { flex:0 0 auto; }
body.immersive-live #roomsPanel .room-more > summary { min-width:46px; padding:5px 12px; font-size:23px; line-height:1; }
body.immersive-live .room-more-menu { top:auto; bottom:calc(100% + 9px); z-index:80; max-height:min(480px,55dvh); background:#26130bf5; backdrop-filter:blur(16px); }
body.immersive-live #sharedChatDock { position:absolute; z-index:30; left:12px; right:12px; width:auto; bottom:calc(12px + var(--chat-keyboard-inset,0px) + env(safe-area-inset-bottom)); height:var(--live-chat-height); min-height:0; }
body.immersive-live #sharedChatDock .overlive-chat-embedded { height:100%; max-height:100%; justify-content:flex-end; background:linear-gradient(transparent,#140a0952); border:0; }
body.immersive-live #sharedChatDock .overlive-chat-messages { flex:1 1 auto; max-height:none; }
body.immersive-live .overlive-chat-form:has(textarea:placeholder-shown) .chat-send { display:none; }
body.immersive-live #sharedAudioUnlock { position:absolute; z-index:36; left:14px; right:14px; bottom:calc(var(--live-chat-height) + 80px + var(--chat-keyboard-inset,0px)); margin:0; background:#45200ef2; font-size:11px; }
body.immersive-live #sharedRoomNotice { position:absolute; z-index:32; left:14px; right:14px; bottom:calc(var(--live-chat-height) + 82px + var(--chat-keyboard-inset,0px)); max-height:60px; margin:0; padding:7px 10px; background:#1e100bd9; color:#ffd2ad; border:0; border-radius:12px; opacity:0; pointer-events:none; transition:opacity .2s; }
body.immersive-live #sharedRoomNotice[data-fresh='true'] { opacity:1; }
body.immersive-live #roomsPanel:has(#sharedAudioUnlock:not(.hidden)) #sharedRoomNotice { opacity:0; }
body.immersive-live .room-layout { position:absolute; inset:0; display:block; overflow:hidden; }
body.immersive-live .room-stage { width:100%; height:100%; min-height:0 !important; border:0; border-radius:0; background:transparent; }
body.immersive-audio .room-layout { display:none; }
body.immersive-live #sharedSeats { position:absolute; z-index:10; top:calc(88px + env(safe-area-inset-top)); left:50%; transform:translateX(-50%); width:min(540px,calc(100% - 28px)); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px 10px; margin:0; padding:0; }
body.immersive-live #sharedSeats > .room-seat:nth-child(5) { grid-column:2 / span 2; justify-self:center; width:calc((100% - 10px)/2); }
body.immersive-live #sharedSeats .room-seat { position:relative; padding:0; min-height:0; min-width:0; border:0; border-radius:0; background:transparent; text-align:center; box-shadow:none; }
body.immersive-live #sharedSeats .seat-number { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
body.immersive-live #sharedSeats .seat-avatar { position:relative; display:grid; place-items:center; width:var(--live-avatar-size); height:var(--live-avatar-size); margin:0 auto 8px; padding:0; border:2px solid #ffbe8c55; border-radius:50%; background:#28140c88; color:#ffab60; font-size:28px; }
body.immersive-live #sharedSeats .seat-name { display:table; max-width:100%; min-height:0; margin:0 auto; padding:2px 7px; border-radius:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; background:#ffdfbd1c; color:#ffe3ca; font-size:11px; line-height:1.45; }
body.immersive-live #sharedSeats .seat-mic { position:absolute; top:calc(var(--live-avatar-size) - 19px); right:calc((100% - var(--live-avatar-size))/2 - 1px); z-index:3; display:grid; place-items:center; width:23px; height:23px; margin:0; border:2px solid #25140c; border-radius:50%; background:#ffead6; color:#4a2312; font-size:0; pointer-events:none; }
body.immersive-live #sharedSeats .seat-mic::after { content:'🎙'; font-size:15px; line-height:1; }
body.immersive-live #sharedSeats .room-seat[data-mic='false'] .seat-mic { opacity:.48; }
body.immersive-live #sharedSeats .room-seat[data-occupied='false'] .seat-mic { display:none; }
body.immersive-live #sharedSeats .room-seat > .btn { position:absolute; top:0; left:50%; transform:translateX(-50%); width:var(--live-avatar-size); height:var(--live-avatar-size); min-height:44px; padding:0 !important; border:0; border-radius:50%; background:transparent !important; color:transparent !important; font-size:0 !important; box-shadow:none !important; }
body.immersive-live #sharedSeats .room-seat > .btn:focus-visible { outline:2px solid #ffbe78 !important; outline-offset:4px; }
body.immersive-live #sharedSeats .room-seat.speaker-active { border:0 !important; box-shadow:none !important; }
body.immersive-live #sharedSeats .room-seat.speaker-active::after { top:0; left:50%; right:auto; bottom:auto; width:var(--live-avatar-size); height:var(--live-avatar-size); border-radius:50%; animation:immersive-voice-glitch 3.1s linear infinite; }
body.immersive-live .room-seat-release { display:none; }
body.immersive-live .seats-open .room-seat-release { display:grid; place-items:center; z-index:5; top:-7px; right:0; width:28px; height:28px; background:#5b2317; color:#ffe7d0; }
body.immersive-live:not(.immersive-audio) #sharedSeats { display:none; }
body.immersive-live:not(.immersive-audio) .seats-open #sharedSeats { display:grid; padding:16px 10px; width:min(540px,calc(100% - 24px)); border:1px solid #ff9f4d55; border-radius:22px; background:#1d100bec; backdrop-filter:blur(16px); }
body.immersive-live .camera-tile-label { top:12px; bottom:auto; right:auto; max-width:calc(100% - 20px); padding:3px 8px; border-radius:14px; background:#0008; }
body.immersive-live .camera-mosaic > .camera-tile:nth-child(-n+2) .camera-tile-label { top:70px; }
.camera-tile.speaker-active { outline:2px solid var(--speaker-color); outline-offset:-2px; box-shadow:inset 0 0 25px color-mix(in srgb,var(--speaker-color) 70%,transparent); }
body.immersive-stage .room-youtube { inset:70px 0 calc(var(--live-chat-height) + 75px); height:auto; border-radius:0; }
body.immersive-stage .room-stage > #sharedStageVideo { inset:70px 0 calc(var(--live-chat-height) + 75px); width:100%; height:calc(100% - var(--live-chat-height) - 145px); object-fit:contain; }
body.immersive-stage .camera-mosaic { top:80px; right:12px; bottom:auto; left:auto; width:min(36%,190px); height:24dvh; border:1px solid #ffad6966; border-radius:12px; }
body.immersive-stage .camera-mosaic .camera-tile-label { top:4px !important; left:3px; padding:1px 3px; font-size:8px; }
body.immersive-live.chat-keyboard-open { --live-chat-height:min(38dvh,210px); }
body.immersive-live.chat-keyboard-open #roomsPanel .room-primary-actions, body.immersive-live.chat-keyboard-open #sharedRoomNotice { display:none !important; }
@keyframes immersive-voice-glitch { 0%,87%,94%,100% { opacity:0; transform:translateX(-50%); } 89%,91% { opacity:.8; transform:translateX(calc(-50% + 2px)); } 92% { opacity:.4; transform:translateX(calc(-50% - 2px)); } }
@media(min-width:761px) { body.immersive-live #sharedChatDock { left:18px; right:auto; width:min(420px,calc(100% - 36px)); } body.immersive-live #roomsPanel .room-primary-actions { left:auto; right:18px; bottom:18px; } body.immersive-live #sharedRoomNotice,body.immersive-live #sharedAudioUnlock { left:18px; right:auto; max-width:460px; } }
@media(prefers-reduced-motion:reduce) { body.immersive-live #sharedSeats .room-seat.speaker-active::after { animation:none; opacity:0; } }
