/* All selectors belong to the optional screen sharing module. */
.ov-screen-overlay[hidden], .ov-screen-requests[hidden], .ov-screen-toast[hidden] { display: none !important; }
.ov-screen-overlay { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 17, 27, .84); }
.ov-screen-panel { box-sizing: border-box; width: min(1100px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; border: 1px solid #415267; border-radius: 18px; color: #f7fbff; background: #142030; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.ov-screen-title { margin: 0 0 8px; font-size: 1.4rem; }
.ov-screen-peer { margin: 0 0 8px; overflow-wrap: anywhere; }
.ov-screen-status, .ov-screen-hint { margin: 10px 0; color: #d0dfec; }
.ov-screen-hint { font-size: .9rem; }
.ov-screen-video { display: block; width: 100%; max-height: 65vh; min-height: 180px; background: #080d14; border-radius: 10px; object-fit: contain; }
.ov-screen-preview { object-fit: contain !important; }
.ov-screen-call-panel[hidden], .ov-screen-call-view[hidden] { display: none !important; }
.ov-screen-call-panel { padding: 12px; margin: 12px 0; border: 1px solid var(--border, #415267); border-radius: 12px; background: var(--panel, #142030); }
.ov-screen-call-title { margin: 0 0 6px; font-size: 1rem; }
.ov-screen-call-hint { margin: 0 0 8px; font-size: .85rem; color: var(--muted, #c0d0df); }
.ov-screen-call-views { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 8px; }
.ov-screen-call-views.ov-screen-call-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-screen-call-view { margin: 0; min-width: 0; }
.ov-screen-call-view figcaption { margin: 0 0 5px; font-size: .85rem; }
.ov-screen-call-video { display: block; width: 100%; max-height: min(26vh, 240px); background: #080d14; border-radius: 8px; object-fit: contain; }
.ov-screen-call-expanded .ov-screen-call-video { max-height: 50vh; }
.ov-screen-call-controls { position: sticky; bottom: 0; z-index: 6; padding-block: 10px; background: var(--panel, #142030); }
/* Only while an auxiliary screen is shown in a voice call: keep audio elements alive and compact their empty video area. */
.ov-screen-voice-active .callVideos { min-height: 0; margin-top: 10px; border: 0; background: transparent; }
.ov-screen-voice-active .callVideos > video { position: absolute; inset: 0 auto auto 0; width: 0 !important; height: 0 !important; min-height: 0 !important; opacity: 0; border: 0; pointer-events: none; }
.ov-screen-voice-active .callTranslationPanel { position: relative; inset: auto; max-height: 140px; padding: 10px; }
.ov-screen-voice-active .ov-screen-call-panel { margin: 8px 0; padding: 10px; }
.ov-screen-voice-active .ov-screen-call-video { max-height: min(20vh, 140px); }
.ov-screen-voice-active .ov-screen-call-expanded .ov-screen-call-video { max-height: 50vh; }
.ov-screen-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ov-screen-button { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 9px; border: 1px solid #56d7c4; cursor: pointer; background: #56d7c4; color: #092c32; }
.ov-screen-button:disabled { cursor: default; opacity: .6; }
.ov-screen-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ov-screen-secondary { background: transparent; color: #f7fbff; border-color: #879bac; }
.ov-screen-danger { background: #bc394b; border-color: #e66e7e; color: #fff; }
.ov-screen-requests { position: fixed; z-index: 1600; right: 20px; top: 20px; width: min(380px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: auto; }
.ov-screen-request { margin-bottom: 10px; border-radius: 14px; border: 1px solid #56d7c4; padding: 16px; background: #142030; color: #f7fbff; box-shadow: 0 10px 35px rgba(0, 0, 0, .3); }
.ov-screen-request p { margin: 0; overflow-wrap: anywhere; }
.ov-screen-toast { position: fixed; z-index: 1700; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 40px)); padding: 14px 20px; border: 1px solid #8ea4b5; border-radius: 12px; color: #fff; background: #192b3e; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); pointer-events: none; }
.ov-screen-panel:fullscreen { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
.ov-screen-panel:fullscreen .ov-screen-video { max-height: calc(100vh - 180px); }
@media (max-width: 720px) { .ov-screen-overlay { padding: 10px; } .ov-screen-panel { padding: 14px; max-height: calc(100vh - 20px); } }

/* The call keeps its controls while the separate viewer owns only muted video previews. */
.ov-screen-window-open .ov-screen-call-views, .ov-screen-window-open .ov-screen-video { display: none; }
.ov-screen-window-body { margin: 0; background: #080d14; color: #f7fbff; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ov-screen-window-body *, .ov-screen-window-body *::before, .ov-screen-window-body *::after { box-sizing: border-box; }
.ov-screen-window { height: 100vh; min-height: 320px; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ov-screen-window-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ov-screen-window-title { margin: 0; font-size: 1.15rem; }
.ov-screen-window-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ov-screen-window-select { max-width: 100%; font: inherit; padding: 10px 12px; color: #f7fbff; background: #142030; border: 1px solid #879bac; border-radius: 9px; }
.ov-screen-window-select:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ov-screen-window-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow: hidden; background: #080d14; }
.ov-screen-window-stage.ov-screen-window-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-screen-window-view { margin: 0; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
.ov-screen-window-view[hidden], .ov-screen-window-status[hidden] { display: none !important; }
.ov-screen-window-view figcaption { margin: 0; font-size: .9rem; color: #d0dfec; }
.ov-screen-window-video { display: block; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; background: #000; border: 1px solid #415267; border-radius: 8px; }
.ov-screen-window-hint, .ov-screen-window-status { margin: 0; font-size: .85rem; color: #d0dfec; }
.ov-screen-window-stage:fullscreen { width: 100vw; height: 100vh; padding: 14px; background: #080d14; }
@media (max-width: 720px) { .ov-screen-window { padding: 10px; } .ov-screen-window-stage.ov-screen-window-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); } }
/* A local preview is opt-in; these rules never change or stop its media tracks. */
video.ov-screen-local-preview-hidden { visibility: hidden !important; }
.ov-screen-video.ov-screen-local-preview-hidden { display: none !important; }
.ov-screen-preview-controls { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ov-screen-preview-controls[hidden], .ov-screen-preview-toggle[hidden], .ov-screen-preview-notice[hidden],
.ov-screen-window-video[hidden], .ov-screen-window-local-status[hidden] { display: none !important; }
.ov-screen-preview-notice { margin: 0; font-size: .85rem; color: #d0dfec; flex: 1 1 260px; }
.ov-screen-window-local-status { margin: 0; padding: 24px; display: grid; align-content: center; text-align: center; min-height: 0; color: #d0dfec; border: 1px solid #415267; border-radius: 8px; background: #142030; }
