/* OverLive16 / live surfaces. Existing layout, media pixels, hidden states,
   seat/camera sizing, background animation and action ownership are unchanged.
   Reference influence is limited to dark plates, fine rules and warm actions. */

/* The live title is its own compact plate; visitor and minimize geometry stay
   with live-header-v1 and the meeting controller. */
body #liveRoom #roomsPanel .room-header>div{
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12));
 border-radius:14px;box-shadow:0 4px 16px rgb(0 0 0 / .12);
}
body #liveRoom #roomsPanel #sharedRoomTitle{color:var(--ref-ink,#f5f1f6)!important;font-size:14px;font-weight:650;letter-spacing:-.15px;}
body #liveRoom #roomsPanel :is(.room-setup,.room-recovery,#sharedAudioUnlock,#sharedMicRecovery){
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border-color:var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:14px;box-shadow:0 6px 20px rgb(0 0 0 / .14);
}
body #liveRoom #roomsPanel :is(.room-primary-actions>.btn,.room-more>summary,.presence-trigger,#sharedMinimize){
 background:var(--ref-control,rgb(22 24 37 / .96))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:14px;box-shadow:0 3px 10px rgb(0 0 0 / .12)!important;
}
body #liveRoom #roomsPanel :is(#sharedMic,#sharedCamera)[aria-pressed='true']{
 background:var(--ref-accent,#ff9b45)!important;color:var(--ref-on-accent,#261609)!important;
 border-color:var(--ref-accent,#ff9b45)!important;box-shadow:none!important;
}
body #liveRoom #roomsPanel #sharedOptions .room-more-menu,
body #liveRoom #roomsPanel .presence-menu{
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:18px;box-shadow:0 12px 32px rgb(0 0 0 / .28);
}
body #liveRoom #roomsPanel #sharedOptions .room-more-menu>.btn,
body #liveRoom #roomsPanel .presence-menu>button{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;border-color:var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:12px;box-shadow:none!important;font-size:13px;
}
body #liveRoom #roomsPanel #sharedOptions #sharedLeave,
body #liveRoom #roomsPanel #sharedScreenIndicator{
 background:rgb(59 20 30 / .94)!important;color:#fff0f3!important;
 border-color:rgb(239 99 121 / .5)!important;border-radius:12px;
}

/* Sent messages retain their measured log height and native history scrolling.
   Only message plates and composer controls receive the new visual system. */
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-form{
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid rgb(225 225 244 / .28)!important;border-radius:18px;
 box-shadow:0 4px 16px rgb(0 0 0 / .16);
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-form textarea{
 color:var(--ref-ink,#f5f1f6)!important;background:transparent!important;
 border-radius:12px;font-size:16px;
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-form textarea::placeholder{color:var(--ref-muted,#b1afc0)!important;}
body #liveRoom #roomsPanel #sharedChatDock :is(.chat-gif-toggle,.chat-emoji-toggle,.chat-send,.chat-gifs-close){
 background:var(--ref-control,rgb(22 24 37 / .96))!important;
 color:var(--ref-ink,#f5f1f6)!important;border-color:var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:12px;box-shadow:none!important;
}
body #liveRoom #roomsPanel #sharedChatDock :is(.chat-gif-toggle,.chat-emoji-toggle)[aria-expanded='true'],
body #liveRoom #roomsPanel #sharedChatDock .chat-send:not(:disabled){
 background:var(--ref-accent,#ff9b45)!important;color:var(--ref-on-accent,#261609)!important;
 border-color:var(--ref-accent,#ff9b45)!important;
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-message{
 background:rgb(11 13 22 / .88)!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:16px!important;
 box-shadow:none!important;
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-message.mine{
 background:rgb(34 26 30 / .94)!important;border-color:rgb(255 155 69 / .24)!important;
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-chat-message p{font-size:13px;line-height:1.4;}
body #liveRoom #roomsPanel #sharedChatDock .chat-user-open{color:var(--ref-accent,#ff9b45)!important;}
body #liveRoom #roomsPanel #sharedChatDock .overlive-gif-tray{
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:18px;box-shadow:0 10px 28px rgb(0 0 0 / .24);
}
body #liveRoom #roomsPanel #sharedChatDock .overlive-mood-toolbar{background:var(--ref-panel,rgb(11 13 22 / .94))!important;}
body #liveRoom #roomsPanel #sharedChatDock .overlive-mood-choice{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;
 border-color:var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:12px;
}
body #liveRoom #roomsPanel #sharedChatDock :is(.overlive-mood-search input,.reddit-link-input){
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid rgb(225 225 244 / .56)!important;border-radius:12px;font-size:16px;
}

/* Real music controls keep their existing positions, seek/volume semantics,
   percentages and import flow; no new audio control is introduced. */
body #overliveMusicBubbles #roomMusicControls{
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;
 border-radius:18px;box-shadow:0 12px 30px rgb(0 0 0 / .28);
}
body #overliveMusicBubbles :is(#roomMusicOpen,#roomMusicToggle,.music-volume-step,#roomMusicClose,#roomMusicImport){
 background:var(--ref-control,rgb(22 24 37 / .96))!important;color:var(--ref-ink,#f5f1f6)!important;
 border-color:var(--ref-line,rgb(255 255 255 / .12))!important;box-shadow:none!important;
}
body #overliveMusicBubbles #roomMusicOpen[data-playing='true']{
 color:var(--ref-accent,#ff9b45)!important;border-color:rgb(255 155 69 / .5)!important;
}
body #overliveMusicBubbles #roomMusicControls .music-track-pill{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;
 border-color:var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:12px;
}
body #overliveMusicBubbles #roomMusicTrack{font-size:12px;line-height:1.4;color:var(--ref-ink,#f5f1f6);}
body #overliveMusicBubbles #roomMusicTime{font-size:11px;color:var(--ref-muted,#b1afc0);}
body #overliveMusicBubbles #roomMusicSeek{accent-color:var(--ref-accent,#ff9b45);}
body #overliveMusicBubbles #roomMusicNotice{background:rgb(47 25 33 / .94)!important;color:#ffe6eb!important;border:1px solid rgb(239 99 121 / .32);}

/* Prelaunch: retain the true photo/title/access/seat controls and cover editor. */
body #studio.prelive-simple[data-prelive='true'] .prelive-card{
 background:rgb(11 13 22 / .88)!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:18px;
 box-shadow:none;
}
body #studio.prelive-simple[data-prelive='true'] #liveTitle{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid rgb(225 225 244 / .3)!important;border-radius:14px;
}
body #studio.prelive-simple[data-prelive='true'] .live-cover-thumbnail{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:16px;
}
body #studio.prelive-simple[data-prelive='true'] :is(.prelive-cover-add,.prelive-settings select){
 background:var(--ref-control,rgb(22 24 37 / .96))!important;
 color:var(--ref-ink,#f5f1f6)!important;border:1px solid rgb(225 225 244 / .56)!important;
}
body #studio.prelive-simple[data-prelive='true'] .prelive-settings select{border-radius:12px;}
body #studio.prelive-simple[data-prelive='true'] #startSession{
 background:var(--ref-accent,#ff9b45)!important;color:var(--ref-on-accent,#261609)!important;
 border-color:var(--ref-accent,#ff9b45)!important;border-radius:16px;box-shadow:none!important;
}

/* Match the legacy RGB prelaunch selector's full (2,6,1) specificity.
   The :is() arm containing .studio-launcher #startSession contributes its
   specificity to every matched field; a simple #liveTitle rule cannot win. */
body.rgb-theme.prelive-screen #studio.prelive-simple[data-prelive='true'] :is(#liveTitle,.prelive-settings select,.studio-launcher #startSession,.prelive-cover-add,#liveCoverRemove).rgb-surface{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;
 color:var(--ref-ink,#f5f1f6)!important;
 border-color:rgb(225 225 244 / .56)!important;
}
body.rgb-theme.prelive-screen #studio.prelive-simple[data-prelive='true'] .studio-launcher #startSession.rgb-surface{
 background:var(--ref-accent,#ff9b45)!important;
 color:var(--ref-on-accent,#261609)!important;
 border-color:var(--ref-accent,#ff9b45)!important;
}

/* App-owned viewing dialogs. :has scopes their detached modal roots to the
   actual live app, and beats readable-theme's later generic dialog rule. */
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel){
 background:var(--ref-panel,rgb(11 13 22 / .94))!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:18px;
 box-shadow:0 18px 48px rgb(0 0 0 / .36);
}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) :is(h2,h3){color:var(--ref-ink,#f5f1f6);letter-spacing:-.3px;}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) :is(input,select){
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid rgb(225 225 244 / .56)!important;border-radius:12px;font-size:16px;
}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) button{
 background:var(--ref-control,rgb(22 24 37 / .96))!important;color:var(--ref-ink,#f5f1f6)!important;
 border-color:var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:12px;
}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) .room-youtube-search-submit,
body:has(#roomsPanel) dialog.netflix-session-panel .video-source-choices button[aria-pressed='true']{
 background:var(--ref-accent,#ff9b45)!important;color:var(--ref-on-accent,#261609)!important;
 border-color:var(--ref-accent,#ff9b45)!important;
}
body:has(#roomsPanel) dialog.room-youtube-dialog .room-youtube-result{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;color:var(--ref-ink,#f5f1f6)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12))!important;border-radius:12px;box-shadow:none;
}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) :is(.room-youtube-channel,.room-youtube-search-status,#videoSourceStatus){color:var(--ref-muted,#b1afc0)!important;}
body:has(#roomsPanel) dialog.netflix-session-panel .netflix-availability{
 background:var(--ref-inset,rgb(16 18 29 / .94))!important;color:var(--ref-muted,#b1afc0)!important;
 border:1px solid var(--ref-line,rgb(255 255 255 / .12));border-radius:12px;
}
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel)::backdrop{background:rgb(3 5 11 / .68);}

/* Preserve an explicit, high-contrast keyboard focus on every styled control. */
body #liveRoom #roomsPanel :is(button,summary,input,textarea,select):focus-visible,
body #overliveMusicBubbles :is(button,input):focus-visible,
body #studio.prelive-simple[data-prelive='true'] :is(button,input,select):focus-visible,
body:has(#roomsPanel) dialog:is(.room-youtube-dialog,.netflix-session-panel) :is(button,input,select):focus-visible{
 outline:2px solid var(--ref-accent,#ff9b45)!important;outline-offset:2px;
}
