/* =====================================================================================
   WifiCord — Chamadas (Mesa de som)
   Superfície de chamada 1:1, chamada em grupo/canal, apresentação, painéis, chamada recebida.
   Carregue DEPOIS de style.css. Todas as regras vivem sob .wc-call / .wc-incoming para não
   vazar para o resto do app. As classes de estado (.sharing, .remote-sharing, .audio-call,
   .stage-circles, .stage-grid, .has-remote-video, .call-group…) vêm do call.js.
   ===================================================================================== */

.wc-call, .wc-incoming, .wc-call * { box-sizing: border-box; }

.wc-call {
  --wc-bg: #070a10;
  --wc-panel: rgba(12, 16, 24, .96);
  --wc-key-top: #1b2331;
  --wc-key-bot: #121925;
  --wc-edge: rgba(255, 255, 255, .07);
  --wc-edge-2: rgba(255, 255, 255, .13);
  --wc-ink: #eef2f9;
  --wc-dim: #8b96ab;
  --wc-faint: #5b667b;
  --wc-sig: #2fdcec;
  --wc-sig-soft: rgba(47, 220, 236, .16);
  --wc-ok: #38e08c;
  --wc-warn: #ffbf47;
  --wc-bad: #ff5470;
  --wc-mono: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  --wc-sans: var(--font-body, "Inter", system-ui, sans-serif);
  --wc-ease: cubic-bezier(.2, .7, .2, 1);

  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  margin: 8px 10px 0;
  color: var(--wc-ink);
  font-family: var(--wc-sans);
  background: var(--wc-bg);
  border: 1px solid var(--wc-edge-2);
  border-radius: 16px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: wcCallIn .32s var(--wc-ease) both;
}
.wc-call.hidden { display: none !important; }
@keyframes wcCallIn { from { opacity: 0; transform: translateY(-6px) scale(.992); } to { opacity: 1; transform: none; } }

.wc-call :is(button, input, label) { font-family: inherit; }
.wc-call button { color: inherit; cursor: pointer; }
.wc-call button:focus-visible, .wc-call input:focus-visible, .wc-incoming button:focus-visible {
  outline: 2px solid var(--wc-sig); outline-offset: 2px;
}
.wc-call .icon-svg, .wc-call svg { flex: 0 0 auto; }
.wc-call .hidden { display: none !important; }

/* ------------------------------------------------------------------ palco ---------- */
.wc-stage {
  position: relative;
  height: clamp(300px, 46vh, 540px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 15px 15px 0 0;
  background:
    radial-gradient(rgba(255, 255, 255, .034) 1px, transparent 1.2px) 0 0 / 22px 22px,
    radial-gradient(120% 90% at 50% -10%, #152033 0%, #0a0f18 55%, #06080d 100%);
}
.wc-call.sharing .wc-stage,
.wc-call.remote-sharing .wc-stage,
.wc-call.group-presenting .wc-stage { height: clamp(340px, 60vh, 780px); }

/* ------------------------------------------------------------------ cabeçalho ------ */
.wc-head {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 18px;
  background: linear-gradient(180deg, rgba(5, 7, 11, .88), rgba(5, 7, 11, 0));
  pointer-events: none;
}
.wc-head > * { pointer-events: auto; }
.wc-min {
  width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--wc-edge); border-radius: 9px;
  transition: background .15s, border-color .15s;
}
.wc-min:hover { background: rgba(255, 255, 255, .11); border-color: var(--wc-edge-2); }
.wc-min svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wc-ident { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.wc-led {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block;
  background: var(--wc-faint); box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
}
.wc-led-red { background: var(--wc-bad); box-shadow: 0 0 0 3px rgba(255, 84, 112, .18), 0 0 10px rgba(255, 84, 112, .7); animation: wcBlink 1.6s ease-in-out infinite; vertical-align: middle; }
.wc-call[data-conn="connected"] .wc-ident .wc-led { background: var(--wc-ok); box-shadow: 0 0 0 3px rgba(56, 224, 140, .15), 0 0 10px rgba(56, 224, 140, .6); }
.wc-call[data-conn="connecting"] .wc-ident .wc-led { background: var(--wc-warn); animation: wcBlink 1s ease-in-out infinite; }
.wc-call[data-conn="reconnecting"] .wc-ident .wc-led { background: var(--wc-warn); animation: wcBlink .5s steps(2) infinite; }
.wc-call[data-conn="failed"] .wc-ident .wc-led { background: var(--wc-bad); }
@keyframes wcBlink { 50% { opacity: .35; } }

.wc-ident-text { min-width: 0; }
.wc-title {
  display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw;
}
.wc-meta {
  display: flex; align-items: center; gap: 7px; margin-top: 2px;
  font: 500 10.5px/1.2 var(--wc-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--wc-dim);
  white-space: nowrap; overflow: hidden;
}
.wc-sep { color: var(--wc-faint); }
.wc-timer { font-variant-numeric: tabular-nums; color: var(--wc-ink); }
#call-connection-status[data-state="connected"] { color: var(--wc-ok); }
#call-connection-status[data-state="connecting"], #call-connection-status[data-state="reconnecting"], #call-connection-status[data-state="ringing"] { color: var(--wc-warn); }
#call-connection-status[data-state="failed"] { color: var(--wc-bad); }

.wc-peerbox { display: flex; align-items: center; gap: 6px; min-width: 0; position: relative; }
.wc-peer { font: 600 11px/1 var(--wc-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wc-dim); max-width: 22vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-vol { position: relative; display: inline-flex; }
.wc-iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto;
  background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--wc-dim);
  transition: background .15s, color .15s, border-color .15s;
}
.wc-iconbtn:hover { background: rgba(255, 255, 255, .07); color: var(--wc-ink); }
.wc-iconbtn[aria-expanded="true"] { background: var(--wc-sig-soft); border-color: rgba(47, 220, 236, .35); color: var(--wc-sig); }
.wc-iconbtn .icon-svg { width: 19px; height: 19px; }
.wc-iconbtn:disabled { opacity: .4; cursor: not-allowed; }

.wc-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--wc-edge); border-radius: 999px;
  transition: background .15s, border-color .15s;
}
.wc-link:hover { background: rgba(255, 255, 255, .1); border-color: var(--wc-edge-2); }
.wc-link .call-quality-dot { display: none; }
.wc-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.wc-bars i { width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .18); transition: background .25s; }
.wc-bars i:nth-child(1) { height: 4px; } .wc-bars i:nth-child(2) { height: 7px; }
.wc-bars i:nth-child(3) { height: 10px; } .wc-bars i:nth-child(4) { height: 13px; }
.wc-link[data-grade="excellent"] .wc-bars i { background: var(--wc-ok); }
.wc-link[data-grade="good"] .wc-bars i:nth-child(-n+3) { background: var(--wc-ok); }
.wc-link[data-grade="fair"] .wc-bars i:nth-child(-n+2) { background: var(--wc-warn); }
.wc-link[data-grade="poor"] .wc-bars i:nth-child(1) { background: var(--wc-bad); }
.wc-rtt { font: 600 10.5px/1 var(--wc-mono); letter-spacing: .02em; color: var(--wc-dim); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

/* menu de volume do 1:1 e menus de dispositivo */
.wc-call .call-device-menu {
  position: absolute; z-index: 60; min-width: 230px; max-width: min(340px, 82vw); max-height: 280px; overflow: auto;
  padding: 6px; background: var(--wc-panel); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--wc-edge-2); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  bottom: calc(100% + 10px); left: 0; top: auto; right: auto;
}
.wc-call .call-volume-menu { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; min-width: 200px; }
.wc-call .call-device-menu button {
  display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--wc-ink); text-align: left; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-call .call-device-menu button:hover { background: rgba(255, 255, 255, .08); }
.wc-call .call-device-menu button.active, .wc-call .call-device-menu button[aria-checked="true"] { color: var(--wc-sig); }
.wc-call .call-volume-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12px; color: var(--wc-dim); white-space: nowrap; }
.wc-call .call-volume-row input[type="range"] { flex: 1; accent-color: var(--wc-sig); }
.wc-call #call-remote-volume-value { min-width: 36px; text-align: right; font: 600 11px var(--wc-mono); color: var(--wc-ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ vídeo 1:1 ------ */
.wc-remote, .wc-local {
  position: absolute; inset: 0; width: 100%; height: 100%; display: none;
  object-fit: cover; background: #05070b;
}
.wc-remote { z-index: 1; }
.wc-call.has-remote-video:not(.call-group) .wc-remote { display: block; }
.wc-call.remote-sharing:not(.call-group) .wc-remote,
.wc-call.sharing:not(.call-group) .wc-remote { object-fit: contain; }
.wc-call.audio-call:not(.has-remote-video) .wc-remote { display: none; }
.wc-local.is-screen-preview { display: block; z-index: 2; object-fit: contain; }
.wc-call.sharing:not(.presentation-only) .wc-local.is-screen-preview { cursor: zoom-in; }
.wc-call.sharing.call-group .wc-local.is-screen-preview { inset: 0 188px 0 0; width: calc(100% - 188px); }
.wc-call.sharing .wc-local.is-screen-preview.hidden { display: none !important; }
.wc-remote.wc-video-zoom, .wc-local.wc-video-zoom { object-fit: contain; }

.wc-call #remote-audio, .wc-call #remote-screen-audio {
  position: absolute !important; width: 1px !important; height: 1px !important; left: -9px !important; top: -9px !important;
  opacity: .001 !important; pointer-events: none !important; display: block !important;
}

/* câmeras sobrepostas durante a apresentação */
.wc-call #remote-camera-pip {
  position: absolute; left: 14px; bottom: 14px; z-index: 12;
  width: clamp(128px, 18%, 220px); height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--wc-edge-2); background: #05070b; box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}
.wc-call #local-camera-pip { display: none !important; }

/* ------------------------------------------------------------------ avatares 1:1 --- */
.wc-avatar {
  --av: clamp(92px, 19vh, 148px);
  --lvl: 0;
  position: absolute; z-index: 4; top: 50%; left: 50%;
  width: var(--av); height: var(--av); border-radius: 50%;
  transform: translate(-50%, -54%);
  background: #0e1420;
  box-shadow: 0 0 0 1px var(--wc-edge-2), 0 0 0 calc(2px + var(--lvl) * 8px) rgba(56, 224, 140, calc(var(--lvl) * .38)), 0 18px 44px rgba(0, 0, 0, .55);
  transition: box-shadow .12s linear, transform .3s var(--wc-ease), opacity .25s;
}
.wc-avatar > :not(.wc-avatar-tag) { border-radius: 50%; }
.wc-avatar img, .wc-avatar .call-avatar-fallback, .wc-avatar > span {
  width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; border-radius: 50%;
  font-size: calc(var(--av) * .38); font-weight: 800; color: #fff; background: linear-gradient(135deg, #0aa7b6, #5a49d8);
}
.wc-avatar::before, .wc-avatar::after { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; text-align: center; pointer-events: none; }
.wc-avatar::before {
  content: attr(data-name); top: calc(100% + 12px); max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  font-weight: 700; font-size: 14px; color: var(--wc-ink); text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}
.wc-avatar::after {
  content: attr(data-state); top: calc(100% + 34px);
  font: 500 10px/1 var(--wc-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wc-dim);
}
.wc-avatar.speaking { transform: translate(-50%, -54%) scale(1.04); }
.wc-avatar-remote.speaking, .wc-avatar-local.speaking { box-shadow: 0 0 0 2px rgba(56, 224, 140, .75), 0 0 0 calc(4px + var(--lvl) * 8px) rgba(56, 224, 140, .22), 0 18px 44px rgba(0, 0, 0, .55); }

/* duas pessoas lado a lado enquanto ninguém tem câmera */
.wc-call:not(.call-group) .wc-avatar-remote { left: calc(50% - clamp(88px, 14vw, 150px)); }
.wc-call:not(.call-group) .wc-avatar-local  { left: calc(50% + clamp(88px, 14vw, 150px)); --av: clamp(80px, 16vh, 124px); }

/* câmera ligada em algum lado: o avatar remoto só aparece se ELE não tem vídeo */
.wc-call.stage-grid:not(.stage-grid-remote-on):not(.sharing):not(.remote-sharing):not(.call-group) .wc-avatar-remote { left: 50%; }
.wc-call.stage-grid:not(.sharing):not(.remote-sharing) .wc-avatar-local { display: none; }
.wc-call.stage-grid.stage-grid-remote-on .wc-avatar-remote { display: none; }
.wc-call.has-remote-video .wc-avatar-remote,
.wc-call.sharing .wc-avatar, .wc-call.remote-sharing .wc-avatar { display: none; }
.wc-call.call-group .wc-avatar { display: none; }
.wc-call.audio-call.has-remote-video .wc-avatar-remote { display: block; }

/* atmosfera atrás dos avatares (toque / conectando) */
.wc-empty { position: absolute; left: 50%; top: 46%; width: 0; height: 0; z-index: 0; pointer-events: none; }
.wc-empty::before, .wc-empty::after {
  content: ""; position: absolute; left: -130px; top: -130px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(47, 220, 236, .35); opacity: 0;
}
.wc-call.is-ringing .wc-empty::before, .wc-call[data-conn="connecting"] .wc-empty::before { animation: wcRing 2.6s ease-out infinite; }
.wc-call.is-ringing .wc-empty::after, .wc-call[data-conn="connecting"] .wc-empty::after { animation: wcRing 2.6s ease-out 1.3s infinite; }
@keyframes wcRing { 0% { transform: scale(.45); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.wc-call.sharing .wc-empty, .wc-call.remote-sharing .wc-empty, .wc-call.has-remote-video .wc-empty, .wc-call.call-group .wc-empty { display: none; }

/* etiqueta "apresentando" */
.wc-live-label {
  position: absolute; z-index: 25; top: 54px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  font: 600 10.5px/1 var(--wc-mono); letter-spacing: .1em; color: var(--wc-ink);
  background: rgba(8, 11, 17, .78); backdrop-filter: blur(10px); border: 1px solid var(--wc-edge-2); border-radius: 999px; white-space: nowrap;
}

/* ------------------------------------------------------------------ prévia própria - */
#call-self-preview {
  position: absolute; right: 14px; bottom: 14px; z-index: 12;
  width: clamp(128px, 18%, 220px); aspect-ratio: 16 / 10; overflow: hidden; cursor: grab; touch-action: none;
  background: #0b0f17; border: 1px solid var(--wc-edge-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  transition: box-shadow .15s, border-color .15s;
}
#call-self-preview[hidden] { display: none !important; }
#call-self-preview:active { cursor: grabbing; }
#call-self-preview.is-speaking { border-color: rgba(56, 224, 140, .7); box-shadow: 0 0 0 1px rgba(56, 224, 140, .3), 0 10px 30px rgba(0, 0, 0, .6); }
#call-self-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
#call-self-preview.is-mirrored video { transform: scaleX(-1); }
#call-self-preview[data-media="live"] video { opacity: 1; }
.call-self-avatar { position: absolute; inset: 0; display: grid; place-items: center; }
.call-self-avatar > * { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #0aa7b6, #5a49d8); color: #fff; }
#call-self-preview[data-media="live"] .call-self-avatar { display: none; }
.call-self-status { position: absolute; left: 8px; right: 8px; top: 8px; font: 500 10px/1.3 var(--wc-mono); color: var(--wc-dim); text-align: center; text-shadow: 0 1px 6px #000; }
.call-self-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 7px; font-size: 11px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#call-self-preview .wc-meter-h { position: absolute; right: 7px; bottom: 8px; }
.call-self-expand {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(5, 7, 11, .7); border: 1px solid var(--wc-edge); border-radius: 7px; opacity: 0; transition: opacity .15s;
}
.call-self-expand .icon-svg { width: 14px; height: 14px; }
#call-self-preview:hover .call-self-expand, #call-self-preview:focus-within .call-self-expand { opacity: 1; }
#call-self-preview.is-expanded { left: 14px !important; right: 14px !important; top: 56px !important; bottom: 14px !important; width: auto; aspect-ratio: auto; cursor: default; z-index: 35; }
#call-self-preview.is-expanded video { object-fit: contain; background: #05070b; }
/* 1:1 sem nenhuma câmera: os dois avatares já representam as pessoas */
.wc-call:not(.call-group).stage-circles #call-self-preview,
.wc-call.presentation-only #call-self-preview,
.wc-call.stage-immersive #call-self-preview { display: none; }
.wc-call:not(.call-group)[class*="audio-call"]:not(.stage-grid):not(.sharing):not(.remote-sharing) #call-self-preview[data-media="off"] { display: none; }

/* ------------------------------------------------------------------ medidores ------ */
.wc-meter { display: inline-flex; gap: 2px; }
.wc-meter i { display: block; border-radius: 1px; background: rgba(255, 255, 255, .16); transition: background .08s linear; }
.wc-meter-h { align-items: flex-end; height: 11px; }
.wc-meter-h i { width: 3px; height: 100%; }
.wc-meter-v { position: absolute; left: 8px; top: 10px; bottom: 44px; flex-direction: column-reverse; width: 4px; z-index: 5; }
.wc-meter-v i { width: 4px; flex: 1 1 0; }
.wc-meter i.on { background: var(--wc-ok); }
.wc-meter i:nth-child(n+9).on { background: var(--wc-warn); }
.wc-meter i:nth-child(n+12).on { background: var(--wc-bad); }
.wc-meter-v i:nth-child(n+9).on { background: var(--wc-warn); }
.wc-meter-v i:nth-child(n+11).on { background: var(--wc-bad); }

/* ------------------------------------------------------------------ grade de grupo - */
.wc-grid {
  --cols: 2;
  position: absolute; inset: 54px 12px 12px; z-index: 3;
  display: grid; gap: 10px; align-content: stretch;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr);
}
.wc-grid.hidden { display: none; }
.wc-grid[data-count="0"], .wc-grid[data-count="1"] { --cols: 1; }
.wc-grid[data-count="1"] { inset: 54px 12px 12px; }
.wc-grid[data-count="3"], .wc-grid[data-count="4"] { --cols: 2; }
.wc-grid[data-count="5"], .wc-grid[data-count="6"], .wc-grid[data-count="7"], .wc-grid[data-count="8"], .wc-grid[data-count="9"] { --cols: 3; }
.wc-grid:is([data-count="10"], [data-count="11"], [data-count="12"], [data-count="13"], [data-count="14"], [data-count="15"], [data-count="16"]) { --cols: 4; }

.wc-tile {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  background: linear-gradient(180deg, #111826, #0b0f17); border: 1px solid var(--wc-edge); border-radius: 12px;
  transition: box-shadow .14s, border-color .14s;
}
.wc-tile.is-speaking { border-color: rgba(56, 224, 140, .75); box-shadow: 0 0 0 1px rgba(56, 224, 140, .35), 0 0 26px rgba(56, 224, 140, .18); }
.wc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #05070b; cursor: zoom-in; }
.wc-tile.is-presenting video { object-fit: contain; }
.wc-tile video.hidden { display: none; }
.wc-tile-avatar { position: absolute; left: 50%; top: 44%; width: clamp(48px, 34%, 92px); aspect-ratio: 1; transform: translate(-50%, -50%); }
.wc-tile-avatar > * { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0aa7b6, #5a49d8); }
.wc-tile.has-video .wc-tile-avatar { display: none; }
.call-bot-monogram { font-size: 28px; }
.wc-plate {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 8px; padding: 18px 12px 9px 16px;
  background: linear-gradient(transparent, rgba(3, 5, 9, .82)); pointer-events: none;
}
.wc-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wc-tag {
  font: 600 9px/1 var(--wc-mono); letter-spacing: .1em; padding: 3px 6px; border-radius: 5px; flex: 0 0 auto;
  color: var(--wc-sig); background: var(--wc-sig-soft); border: 1px solid rgba(47, 220, 236, .3);
}
.wc-tag:empty { display: none; }
.wc-state { margin-left: auto; font: 500 9.5px/1 var(--wc-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wc-dim); white-space: nowrap; }
.wc-tile[data-connection="connected"] .wc-state { color: var(--wc-faint); }
.wc-tile[data-connection="reconnecting"] .wc-state, .wc-tile[data-connection="connecting"] .wc-state { color: var(--wc-warn); }
.wc-tile[data-connection="failed"] .wc-state { color: var(--wc-bad); }
.wc-tile.is-bot { background: linear-gradient(180deg, #14192c, #0b0f1a); }
.call-music-title { position: absolute; top: 9px; left: 22px; right: 12px; z-index: 4; font-size: 11.5px; font-weight: 600; color: var(--wc-sig); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-music-title:empty { display: none; }

.wc-tile-volwrap {
  position: absolute; top: 8px; right: 8px; z-index: 6; display: flex; align-items: center; gap: 7px; padding: 5px 9px;
  background: rgba(5, 7, 11, .8); backdrop-filter: blur(8px); border: 1px solid var(--wc-edge-2); border-radius: 999px;
  opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .15s; pointer-events: none;
}
.wc-tile:hover .wc-tile-volwrap, .wc-tile:focus-within .wc-tile-volwrap { opacity: 1; transform: none; pointer-events: auto; }
.wc-tile-volwrap .call-volume-label { font: 500 9px/1 var(--wc-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wc-dim); }
.wc-tile-volume { width: 86px; accent-color: var(--wc-sig); }
@media (hover: none) { .wc-tile-volwrap { display: none; } }

.call-audio-unlock {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; padding: 9px 16px;
  font-size: 12.5px; font-weight: 700; color: #02161a; background: var(--wc-sig); border: 0; border-radius: 999px; box-shadow: 0 8px 24px rgba(47, 220, 236, .35);
}
.wc-waiting {
  grid-column: 1 / -1; display: grid; place-content: center; text-align: center; gap: 5px; padding: 24px;
  border: 1px dashed var(--wc-edge-2); border-radius: 14px; background: rgba(255, 255, 255, .02);
}
.wc-waiting strong { font-size: 16px; font-weight: 700; }
.wc-waiting span { font: 500 11px/1.4 var(--wc-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--wc-dim); }

/* destaque (clique no tile) e apresentação em grupo: palco grande + trilho lateral */
.wc-grid.has-spotlight, .wc-call.group-remote-presenting .wc-grid {
  --others: 1;
  grid-template-columns: minmax(0, 1fr) 176px; grid-template-rows: repeat(var(--others), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr);
}
.wc-grid.has-spotlight .wc-tile.is-spotlight,
.wc-call.group-remote-presenting .wc-grid .wc-tile.is-presenting { grid-column: 1; grid-row: 1 / span var(--others); }
/* trilho com muita gente: só nome, sem avatar grande */
.wc-grid.rail-dense.has-spotlight .wc-tile:not(.is-spotlight) :is(.wc-tile-avatar, .wc-state, .wc-tag, .wc-meter-v),
.wc-call.group-remote-presenting .wc-grid.rail-dense .wc-tile:not(.is-presenting) :is(.wc-tile-avatar, .wc-state, .wc-tag, .wc-meter-v) { display: none; }
.wc-grid.rail-dense.has-spotlight .wc-tile:not(.is-spotlight) .wc-plate,
.wc-call.group-remote-presenting .wc-grid.rail-dense .wc-tile:not(.is-presenting) .wc-plate { padding: 0 10px; height: 100%; align-items: center; background: none; }
.wc-grid.has-spotlight .wc-tile:not(.is-spotlight) { grid-column: 2; }
.wc-call.group-remote-presenting .wc-grid:not(.has-spotlight) .wc-tile:not(.is-presenting) { grid-column: 2; }
.wc-call.group-remote-presenting .wc-grid:not(.has-spotlight) .wc-tile:not(.is-presenting) .wc-tile-avatar { width: 40%; }
/* quando EU apresento, o grupo vira um trilho sobre a lateral da prévia */
.wc-call.sharing.call-group .wc-grid { inset: 54px 12px 12px auto; width: 164px; --cols: 1; grid-auto-rows: 96px; align-content: start; overflow-y: auto; z-index: 6; scrollbar-width: thin; }
.wc-call.sharing.call-group .wc-tile-volwrap { display: none; }

/* ------------------------------------------------------------------ extras de palco - */
.wc-present-only {
  position: absolute; right: 12px; top: 54px; z-index: 28; display: none; padding: 7px 11px;
  font: 600 10px/1 var(--wc-mono); letter-spacing: .08em; text-transform: uppercase;
  background: rgba(8, 11, 17, .78); backdrop-filter: blur(10px); border: 1px solid var(--wc-edge-2); border-radius: 8px; color: var(--wc-ink);
}
.wc-present-only:hover { background: rgba(255, 255, 255, .12); }
.wc-call:is(.sharing, .remote-sharing, .group-presenting) .wc-present-only { display: block; }
.wc-call.presentation-only .wc-present-only { top: 12px; }
.wc-call.call-group.group-remote-presenting .wc-present-only { left: 26px; right: auto; top: 74px; }
.wc-call.group-remote-presenting #call-self-preview { right: 198px; bottom: 24px; }
.wc-tile.is-presenting .wc-meter-v { display: none; }

.wc-immersive {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 26; width: 38px; height: 20px; display: none; place-items: center;
  background: rgba(8, 11, 17, .72); border: 1px solid var(--wc-edge); border-radius: 10px; color: var(--wc-dim);
}
.wc-immersive svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.wc-immersive:hover { color: var(--wc-ink); }
.wc-call:is(.sharing, .remote-sharing) .wc-immersive { display: grid; }
.wc-call.stage-immersive .wc-immersive svg { transform: rotate(180deg); }
.wc-call.stage-immersive :is(#remote-camera-pip, .wc-grid, .wc-live-label) { opacity: 0; pointer-events: none; }

.wc-notice {
  position: absolute; z-index: 31; left: 50%; top: 52px; transform: translateX(-50%); max-width: calc(100% - 28px);
  padding: 8px 14px; font: 600 11px/1.3 var(--wc-mono); letter-spacing: .04em; text-align: center;
  background: rgba(8, 11, 17, .9); backdrop-filter: blur(10px); border: 1px solid var(--wc-edge-2); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
  animation: wcNotice .25s var(--wc-ease);
}
.wc-notice[data-kind="cpu"] { border-color: rgba(255, 191, 71, .5); color: var(--wc-warn); }
.wc-notice[data-kind="ok"] { border-color: rgba(56, 224, 140, .45); color: var(--wc-ok); }
@keyframes wcNotice { from { opacity: 0; transform: translate(-50%, -6px); } }
.wc-call.sharing.preview-paused .wc-local.is-screen-preview { opacity: .35; }

/* reconexão: veste o palco com uma película âmbar */
.wc-call.call-reconnecting .wc-stage::after {
  content: "RECONECTANDO…"; position: absolute; inset: 0; z-index: 29; display: grid; place-items: center;
  font: 700 12px/1 var(--wc-mono); letter-spacing: .3em; color: var(--wc-warn); background: rgba(5, 7, 11, .55); backdrop-filter: blur(2px); pointer-events: none;
}

/* ------------------------------------------------------------------ painéis -------- */
.wc-panel {
  position: absolute; z-index: 40; top: 52px; right: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 64px); overflow: auto;
  padding: 12px 14px 14px; background: var(--wc-panel); backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid var(--wc-edge-2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  scrollbar-width: thin; animation: wcPanel .18s var(--wc-ease);
}
.wc-panel.hidden { display: none; }
#call-quality-panel { width: min(380px, calc(100% - 24px)); }
@keyframes wcPanel { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.wc-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wc-panel h3 { margin: 0; font: 700 11px/1 var(--wc-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--wc-ink); }
.wc-x { width: 26px; height: 26px; font-size: 18px; line-height: 1; background: transparent; border: 0; border-radius: 7px; color: var(--wc-dim); }
.wc-x:hover { background: rgba(255, 255, 255, .08); color: var(--wc-ink); }
.wc-sec { padding: 11px 0; border-top: 1px solid var(--wc-edge); }
.wc-sec:first-of-type { border-top: 0; padding-top: 2px; }
.wc-label { display: block; margin-bottom: 8px; font: 600 9.5px/1 var(--wc-mono); letter-spacing: .14em; color: var(--wc-faint); }
.wc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 12px; }
.wc-row span { color: var(--wc-dim); flex: 0 0 auto; }
.wc-row b { font: 500 11.5px/1.35 var(--wc-mono); text-align: right; color: var(--wc-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wc-row b.warn { color: var(--wc-warn); }
.wc-hint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--wc-dim); }
.wc-fine { margin: 6px 0 0; font: 500 10px/1.45 var(--wc-mono); color: var(--wc-faint); letter-spacing: .02em; }

.wc-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wc-seg-opt { position: relative; display: block; cursor: pointer; }
.wc-seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.wc-seg-opt span {
  display: grid; gap: 3px; padding: 9px 8px; text-align: center; border: 1px solid var(--wc-edge); border-radius: 10px; background: rgba(255, 255, 255, .03);
  transition: background .15s, border-color .15s;
}
.wc-seg-opt b { font-size: 12.5px; }
.wc-seg-opt small { font: 500 9.5px/1.2 var(--wc-mono); color: var(--wc-dim); }
.wc-seg-opt:hover span { background: rgba(255, 255, 255, .07); }
.wc-seg-opt input:checked + span { background: var(--wc-sig-soft); border-color: rgba(47, 220, 236, .6); }
.wc-seg-opt input:checked + span b { color: var(--wc-sig); }
.wc-seg-opt input:focus-visible + span { outline: 2px solid var(--wc-sig); outline-offset: 2px; }

.wc-switch { display: flex; align-items: flex-start; gap: 11px; padding: 7px 0; cursor: pointer; }
.wc-switch span { display: grid; gap: 3px; min-width: 0; }
.wc-switch b { font-size: 12.5px; }
.wc-switch small { font-size: 11px; line-height: 1.4; color: var(--wc-dim); }
.wc-switch input {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; position: relative; width: 34px; height: 20px; margin: 1px 0 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid var(--wc-edge-2); cursor: pointer; transition: background .15s;
}
.wc-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dfe6f2; transition: transform .16s var(--wc-ease), background .15s; }
.wc-switch input:checked { background: rgba(47, 220, 236, .55); border-color: rgba(47, 220, 236, .8); }
.wc-switch input:checked::after { transform: translateX(14px); background: #fff; }

.call-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 2px; font-size: 13px; }
.call-person strong { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-person span { font: 500 10px/1 var(--wc-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wc-dim); white-space: nowrap; }
.call-person-volume { display: grid; gap: 4px; padding: 2px 0 9px; border-bottom: 1px solid var(--wc-edge); font-size: 11px; color: var(--wc-dim); }
.call-person-volume input { width: 100%; accent-color: var(--wc-sig); }

/* ------------------------------------------------------------------ console -------- */
.wc-console {
  position: relative; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 12px 14px 8px; border-top: 1px solid var(--wc-edge); border-radius: 0 0 15px 15px;
  background: linear-gradient(180deg, #0d121b, #090c12);
}
.wc-zone { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.wc-zone-l { justify-content: flex-start; }
.wc-zone-r { justify-content: flex-end; }
.wc-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; max-width: 100%;
  font: 600 10px/1 var(--wc-mono); letter-spacing: .1em; color: var(--wc-dim);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--wc-edge); border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s, border-color .15s;
}
.wc-pill:hover { background: rgba(255, 255, 255, .09); color: var(--wc-ink); }
.wc-pill[aria-expanded="true"] { background: var(--wc-sig-soft); border-color: rgba(47, 220, 236, .4); color: var(--wc-sig); }
.wc-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wc-sig); box-shadow: 0 0 8px var(--wc-sig); flex: 0 0 auto; }

.wc-keys { display: flex; align-items: flex-start; justify-content: center; gap: 9px; flex-wrap: wrap; }
.wc-keygroup { position: relative; display: inline-flex; align-items: flex-start; }
.wc-key {
  position: relative; width: 56px; height: 44px; margin-bottom: 17px; display: grid; place-items: center; padding: 0;
  color: var(--wc-ink); background: linear-gradient(180deg, var(--wc-key-top), var(--wc-key-bot));
  border: 1px solid var(--wc-edge-2); border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 0 #04060a, 0 7px 14px rgba(0, 0, 0, .4);
  transition: transform .08s, background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.wc-key::after {
  content: attr(data-label); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font: 600 8.5px/1 var(--wc-mono); letter-spacing: .12em; color: var(--wc-faint); white-space: nowrap; pointer-events: none; transition: color .15s;
}
.wc-key:hover { background: linear-gradient(180deg, #232d3f, #151c29); border-color: rgba(255, 255, 255, .22); }
.wc-key:hover::after { color: var(--wc-dim); }
.wc-key:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 0 #04060a, 0 3px 8px rgba(0, 0, 0, .4); }
.wc-key .icon-svg, .wc-key > svg { width: 21px; height: 21px; }
.wc-key:disabled { opacity: .45; cursor: not-allowed; }
.wc-keygroup > .wc-key { border-radius: 11px 0 0 11px; }
.wc-keyarrow {
  width: 22px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--wc-dim);
  background: linear-gradient(180deg, #151c29, #0f1520); border: 1px solid var(--wc-edge-2); border-left: 0; border-radius: 0 11px 11px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 0 #04060a, 0 7px 14px rgba(0, 0, 0, .4); transition: background .15s, color .15s;
}
.wc-keyarrow:hover { background: #222c3d; color: var(--wc-ink); }
.wc-keyarrow svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* mic/câmera desligados: vermelho + risco */
.wc-key.call-btn-off { color: #ff9aab; background: linear-gradient(180deg, #2c141b, #1d0e13); border-color: rgba(255, 84, 112, .45); }
.wc-key.call-btn-off::after { color: #ff7d92; }
#call-toggle-mic.call-btn-off::before, #call-toggle-cam.call-btn-off::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 2px; background: currentColor; border-radius: 2px;
  transform: translate(-50%, -50%) rotate(-45deg); box-shadow: 0 0 0 2px #1d0e13;
}
/* ligado/ativo: filete luminoso em cima */
.wc-key.call-btn-active, .wc-key[aria-pressed="true"]:not(#call-toggle-mic):not(#call-toggle-cam):not(#call-toggle-deafen) {
  color: var(--wc-sig); background: linear-gradient(180deg, #11323a, #0b2027); border-color: rgba(47, 220, 236, .5);
}
.wc-key.call-btn-active::after { color: var(--wc-sig); }
.wc-key.call-btn-active::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--wc-sig); box-shadow: 0 0 10px var(--wc-sig); }
.wc-key[data-media-state="loading"] { color: var(--wc-warn); animation: wcBlink 1s ease-in-out infinite; }
#call-toggle-deafen.call-btn-off { color: #ff9aab; background: linear-gradient(180deg, #2c141b, #1d0e13); border-color: rgba(255, 84, 112, .45); }
.wc-key-end {
  width: 66px; color: #fff; background: linear-gradient(180deg, #ff5f79, #d92f4d); border-color: rgba(255, 150, 165, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 0 #7c1427, 0 8px 18px rgba(217, 47, 77, .35);
}
.wc-key-end::after { color: #ff8a9d; }
.wc-key-end:hover { background: linear-gradient(180deg, #ff7288, #e63a58); border-color: rgba(255, 190, 200, .6); }
.wc-key-end:hover::after { color: #ffb3c0; }
.wc-morekey { display: none; }

/* bandeja de filtros e menus que abrem para cima */
.wc-call .call-filters-tray { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); z-index: 70; }
.wc-call .wc-keygroup .call-device-menu { bottom: calc(100% + 12px); left: 0; }

/* ------------------------------------------------------------------ "somente transmissão" e tela cheia */
.wc-call.presentation-only, .wc-call.wc-pseudo-fullscreen, .wc-call:fullscreen {
  position: fixed; inset: 0; z-index: 1000; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; border-radius: 0; border: 0;
}
.wc-call:fullscreen, .wc-call.presentation-only, .wc-call.wc-pseudo-fullscreen { background: #000; }
.wc-call:fullscreen .wc-stage, .wc-call.presentation-only .wc-stage, .wc-call.wc-pseudo-fullscreen .wc-stage { flex: 1 1 auto; height: auto; border-radius: 0; }
.wc-call:fullscreen .wc-console, .wc-call.wc-pseudo-fullscreen .wc-console { border-radius: 0; }
.wc-call.presentation-only .wc-console { display: none; }
.wc-call.presentation-only .wc-head { opacity: 0; transition: opacity .2s; }
.wc-call.presentation-only .wc-head:hover, .wc-call.presentation-only .wc-head:focus-within { opacity: 1; }
.wc-call.presentation-only :is(.wc-grid, #remote-camera-pip, .wc-live-label, .wc-immersive) { display: none; }

/* ------------------------------------------------------------------ chamada recebida */
.modal.wc-incoming, div#modal-incoming-call.wc-incoming {
  --wc-sig: #2fdcec; --wc-ok: #38e08c; --wc-bad: #ff5470; --wc-mono: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  position: relative; width: min(360px, calc(100vw - 32px)); max-width: none; padding: 34px 26px 22px; overflow: hidden; text-align: center; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 0%, #162236 0%, #0b1018 62%) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important; border-radius: 22px !important; clip-path: none !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  animation: wcIncIn .34s cubic-bezier(.2, .8, .2, 1);
}
@keyframes wcIncIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.wc-incoming.hidden { display: none !important; }
.wc-inc-rings { position: absolute; left: 50%; top: 96px; width: 0; height: 0; z-index: -1; }
.wc-inc-rings i { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(47, 220, 236, .45); opacity: 0; animation: wcRing 3s ease-out infinite; }
.wc-inc-rings i:nth-child(2) { animation-delay: 1s; } .wc-inc-rings i:nth-child(3) { animation-delay: 2s; }
.wc-incoming .incoming-call-avatar-wrap { margin-bottom: 26px; }
.wc-incoming .incoming-call-avatar { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 0 0 6px rgba(47, 220, 236, .12), 0 16px 36px rgba(0, 0, 0, .55); }
.wc-inc-kind { margin: 0 0 6px; font: 600 10px/1 var(--wc-mono); letter-spacing: .24em; color: var(--wc-sig); }
.wc-incoming h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; text-transform: none !important; }
.wc-incoming #incoming-call-text { margin: 0 0 26px; font-size: 13px; color: #8b96ab; }
.wc-incoming .incoming-call-actions { display: flex; justify-content: center; gap: 34px; }
.wc-incoming .incoming-call-btn {
  position: relative; width: 62px; height: 62px; margin-bottom: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  transition: transform .12s, filter .15s;
}
.wc-incoming .incoming-call-btn::after { content: attr(data-label); position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); font: 600 9px/1 var(--wc-mono); letter-spacing: .14em; color: #8b96ab; white-space: nowrap; }
.wc-incoming .incoming-call-reject { background: linear-gradient(180deg, #ff5f79, #d92f4d); box-shadow: 0 10px 26px rgba(217, 47, 77, .4); }
.wc-incoming .incoming-call-accept { background: linear-gradient(180deg, #46eb9c, #1fb86f); box-shadow: 0 10px 26px rgba(31, 184, 111, .4); }
.wc-incoming .incoming-call-accept .icon-svg, .wc-incoming .incoming-call-accept svg { animation: wcNudge 1.8s ease-in-out infinite; transform-origin: 50% 60%; }
.wc-incoming .incoming-call-btn:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.08); }
.wc-incoming .incoming-call-btn:active { transform: scale(.94); }
.wc-incoming .incoming-call-btn .icon-svg, .wc-incoming .incoming-call-btn svg { width: 26px; height: 26px; }
@keyframes wcNudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-8deg); } 86% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
.wc-inc-hint { margin: 0; font: 500 10px/1 var(--wc-mono); letter-spacing: .06em; color: #5b667b; }
.wc-inc-hint kbd { padding: 2px 5px; font: inherit; border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px; color: #8b96ab; }

/* ------------------------------------------------------------------ modal de compartilhamento */
.share-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.share-mode-opt { position: relative; display: block !important; cursor: pointer; }
.share-mode-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.share-mode-opt span { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--bg-hover, #1f2333); border-radius: 10px; background: var(--bg-dark, #0a0c16); transition: border-color .15s, background .15s; }
.share-mode-opt b { font-size: 13px; color: var(--text-primary, #f5f6fc); }
.share-mode-opt small { font-size: 11px; color: var(--text-muted, #6e7590); }
.share-mode-opt input:checked + span { border-color: #02d2e3; background: rgba(2, 210, 227, .1); }
.share-mode-opt input:focus-visible + span { outline: 2px solid #02d2e3; outline-offset: 2px; }

/* ------------------------------------------------------------------ menu de contexto da chamada */
.call-context-menu { background: rgba(12, 16, 24, .97) !important; backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .14) !important; border-radius: 12px !important; box-shadow: 0 18px 44px rgba(0, 0, 0, .6) !important; }
.call-context-menu .call-volume-row input[type="range"] { accent-color: #2fdcec; }

/* ------------------------------------------------------------------ responsivo ----- */
@media (max-width: 1180px) {
  .wc-title { max-width: 30vw; }
  .wc-peerbox { display: none; }
  /* faixa de baixo: teclas em cima, perfil/painéis embaixo */
  .wc-console { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding-bottom: 6px; }
  .wc-keys { grid-column: 1 / -1; grid-row: 1; }
  .wc-zone-l { grid-row: 2; grid-column: 1; min-height: 34px; }
  .wc-zone-r { grid-row: 2; grid-column: 2; min-height: 34px; }
}
@media (max-width: 680px), (max-height: 500px) and (orientation: landscape) {
  .wc-call:not(.hidden) { position: fixed; inset: 0; z-index: 5000; width: 100%; height: 100vh; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .wc-stage, .wc-call.sharing .wc-stage, .wc-call.remote-sharing .wc-stage, .wc-call.group-presenting .wc-stage { flex: 1 1 auto; min-height: 0; height: auto; border-radius: 0; }
  .wc-head { padding: calc(env(safe-area-inset-top, 0px) + 10px) 10px 16px; gap: 8px; }
  .wc-meta > :nth-last-child(-n+2) { display: none; }
  .wc-title { max-width: 44vw; font-size: 13.5px; }
  .wc-link { padding: 6px 8px; } .wc-rtt { display: none; }
  .wc-avatar { --av: clamp(76px, 15vh, 112px); }
  .wc-call:not(.call-group) .wc-avatar-remote { left: calc(50% - 64px); }
  .wc-call:not(.call-group) .wc-avatar-local { left: calc(50% + 64px); --av: clamp(64px, 12vh, 92px); }
  .wc-avatar::before { font-size: 12.5px; max-width: 120px; }
  .wc-grid { inset: calc(env(safe-area-inset-top, 0px) + 56px) 8px 8px; gap: 7px; --cols: 2; }
  .wc-grid[data-count="1"] { --cols: 1; }
  .wc-grid.has-spotlight, .wc-call.group-remote-presenting .wc-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: minmax(64px, 1fr); }
  .wc-grid.has-spotlight .wc-tile.is-spotlight, .wc-call.group-remote-presenting .wc-grid .wc-tile.is-presenting { grid-column: 1; grid-row: 1 / span 1; }
  .wc-grid.has-spotlight .wc-tile:not(.is-spotlight), .wc-call.group-remote-presenting .wc-grid:not(.has-spotlight) .wc-tile:not(.is-presenting) { display: none; }
  .wc-call.sharing.call-group .wc-grid { display: none; }
  .wc-call.sharing.call-group .wc-local.is-screen-preview { inset: 0; width: 100%; }
  #call-self-preview, .wc-call #remote-camera-pip { width: clamp(96px, 30%, 150px); right: 8px; bottom: 8px; }
  .wc-call #remote-camera-pip { right: auto; left: 8px; }
  .wc-panel { top: calc(env(safe-area-inset-top, 0px) + 52px); right: 8px; width: calc(100% - 16px); max-height: calc(100% - 64px); }
  .wc-console { padding: 10px max(8px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom, 0px) + 6px) max(8px, env(safe-area-inset-left)); border-radius: 0; }
  .wc-pill { max-width: 52vw; }
  .wc-keys { gap: 6px; }
  .wc-key { width: 48px; height: 42px; } .wc-keyarrow { width: 18px; height: 42px; } .wc-key-end { width: 56px; }
  .wc-key::after { font-size: 7.5px; letter-spacing: .08em; }
  .wc-extra { display: none; }
  .wc-call.controls-more .wc-extra { display: inline-flex; }
  .wc-morekey { display: grid; }
  .wc-present-only { top: calc(env(safe-area-inset-top, 0px) + 88px); right: 10px; }
  .wc-live-label { top: calc(env(safe-area-inset-top, 0px) + 52px); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
  .wc-incoming { padding: 30px 18px 18px; }
}
@media (max-width: 380px) {
  .wc-key { width: 43px; } .wc-keys { gap: 4px; } .wc-key-end { width: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .wc-call, .wc-incoming, .wc-panel, .wc-notice, .wc-led, .wc-led-red, .wc-empty::before, .wc-empty::after, .wc-inc-rings i, .wc-incoming .incoming-call-accept svg { animation: none !important; }
  .wc-call * { transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ integração com o app */
body.call-ui-active .pingo-root, body.call-ui-active .pingo-bubble, body.call-ui-active .pingo-menu { visibility: hidden; pointer-events: none; }
body.call-ui-active #mobile-menu-btn { display: none !important; }

/* ================================================================ correções de palco (transmissão + câmeras) ====== */
.wc-call { --rail-w: clamp(188px, 17vw, 264px); --rail-gap: 12px; }

/* "Voltar à chamada": no modo só-transmissão o cabeçalho (invisível, mas clicável) ficava POR CIMA do botão. Agora o
   botão vive no centro do topo, acima de tudo, onde o cabeçalho não tem nada. */
.wc-call.presentation-only .wc-present-only { top: 12px; left: 50%; right: auto; transform: translateX(-50%); z-index: 60; background: rgba(8, 11, 17, .86); }

/* prévia oculta quando a tela INTEIRA é compartilhada (evita o efeito espelho) */
.wc-share-mask {
  position: absolute; inset: 0; z-index: 3; display: none; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #0d141f, #05070b 70%);
}
.wc-share-mask strong { font-size: 15px; font-weight: 700; color: var(--wc-ink); }
.wc-share-mask span { max-width: 380px; font: 500 11.5px/1.5 var(--wc-mono); letter-spacing: .02em; color: var(--wc-dim); }
.wc-share-mask button {
  margin-top: 4px; padding: 8px 14px; font: 600 11px/1 var(--wc-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--wc-ink); background: rgba(255, 255, 255, .07); border: 1px solid var(--wc-edge-2); border-radius: 8px;
}
.wc-share-mask button:hover { background: rgba(255, 255, 255, .14); }
.wc-call.sharing.preview-masked .wc-share-mask { display: grid; }
.wc-call.sharing.preview-masked .wc-local.is-screen-preview { visibility: hidden; }
.wc-call.sharing.preview-masked.has-rail .wc-share-mask { right: calc(var(--rail-w) + var(--rail-gap) * 2); }
.wc-call.presentation-only .wc-share-mask { right: 0; }

/* faixa lateral de câmeras (durante transmissão) */
.wc-rail-toggle {
  position: absolute; top: 54px; right: 12px; z-index: 27; display: none; padding: 6px 10px;
  font: 600 9.5px/1 var(--wc-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--wc-dim);
  background: rgba(8, 11, 17, .78); backdrop-filter: blur(10px); border: 1px solid var(--wc-edge); border-radius: 8px;
}
.wc-rail-toggle:hover { color: var(--wc-ink); border-color: var(--wc-edge-2); }
.wc-call.rail-capable .wc-rail-toggle { display: block; }
.wc-call.rail-capable .wc-rail-toggle { right: var(--rail-gap); top: 54px; z-index: 40; }
.wc-call.rail-capable:not(.presentation-only) .wc-present-only { right: 138px; }

/* 1:1: câmera dela e a minha empilhadas à direita, em tamanho legível */
.wc-call.has-rail:not(.call-group) #remote-camera-pip {
  left: auto; bottom: auto; right: var(--rail-gap); top: 90px; width: var(--rail-w); z-index: 12;
}
.wc-call.has-rail:not(.call-group) #call-self-preview {
  right: var(--rail-gap); left: auto; bottom: auto; width: var(--rail-w); z-index: 12;
  top: calc(88px + var(--rail-w) * .625 + 10px);
}
.wc-call.has-rail:not(.call-group):not(.stage-immersive) #call-self-preview[data-media="off"] { display: none; }
.wc-call.has-rail:not(.call-group).sharing .wc-local.is-screen-preview,
.wc-call.has-rail:not(.call-group).remote-sharing:not(.sharing) .wc-remote {
  inset: 0 calc(var(--rail-w) + var(--rail-gap) * 2) 0 0; width: calc(100% - var(--rail-w) - var(--rail-gap) * 2);
}
/* a câmera (em tela cheia/imersivo) continua sumindo quando o palco fica imersivo, mas nunca no modo só-transmissão */

/* grupo: trilho com tiles legíveis (proporção fixa), em vez de miniaturas espremidas */
.wc-call.sharing.call-group .wc-grid { width: var(--rail-w); grid-auto-rows: calc(var(--rail-w) * .625); gap: 8px; inset: 88px var(--rail-gap) var(--rail-gap) auto; }
.wc-call.sharing.call-group.has-rail .wc-local.is-screen-preview { inset: 0 calc(var(--rail-w) + var(--rail-gap) * 2) 0 0; width: calc(100% - var(--rail-w) - var(--rail-gap) * 2); }
.wc-call.sharing.call-group:not(.has-rail) .wc-grid { display: none; }
.wc-call.sharing.call-group:not(.has-rail) .wc-local.is-screen-preview { inset: 0; width: 100%; }
.wc-call.group-remote-presenting .wc-grid, .wc-grid.has-spotlight { grid-template-columns: minmax(0, 1fr) var(--rail-w); }
.wc-call.group-remote-presenting .wc-grid:not(.has-spotlight) {
  grid-template-rows: repeat(var(--others), minmax(0, calc(var(--rail-w) * .625))) minmax(0, 1fr);
  align-content: start;
}
.wc-call.group-remote-presenting .wc-grid:not(.has-spotlight) .wc-tile.is-presenting { grid-row: 1 / -1; }
.wc-call.group-remote-presenting:not(.has-rail) .wc-grid:not(.has-spotlight) { grid-template-columns: minmax(0, 1fr); }
.wc-call.group-remote-presenting:not(.has-rail) .wc-grid:not(.has-spotlight) .wc-tile:not(.is-presenting) { display: none; }
@media (max-width: 680px) {
  .wc-call { --rail-w: clamp(112px, 30vw, 150px); --rail-gap: 8px; }
  .wc-call.has-rail:not(.call-group) #remote-camera-pip { top: calc(env(safe-area-inset-top, 0px) + 96px); }
  .wc-call.has-rail:not(.call-group) #call-self-preview { top: calc(env(safe-area-inset-top, 0px) + 96px + var(--rail-w) * .625 + 8px); }
  .wc-rail-toggle { top: calc(env(safe-area-inset-top, 0px) + 88px); }
}

/* com a faixa de câmeras ligada, as câmeras NÃO somem quando o palco entra no modo imersivo (só o "chrome" some) */
.wc-call.stage-immersive.has-rail :is(#remote-camera-pip, .wc-grid) { opacity: 1; pointer-events: auto; }
.wc-call.stage-immersive.has-rail:not(.call-group) #call-self-preview[data-media="live"] { display: block; }
/* enquanto EU transmito (1:1), a câmera dela vive só na faixa — o <video> principal não pode vazar por trás da prévia/aviso */
.wc-call.sharing:not(.remote-sharing):not(.call-group) .wc-remote { visibility: hidden; }
.wc-call.call-group.group-remote-presenting:not(.presentation-only) .wc-present-only { right: auto; left: 26px; top: 94px; }
.wc-call.group-remote-presenting.rail-capable .wc-grid { inset: 88px 12px 12px; }
.wc-call.group-remote-presenting.has-rail #call-self-preview { right: var(--rail-gap); bottom: var(--rail-gap); left: auto; top: auto; width: var(--rail-w); }
