.icon-remote-control {
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M9 18H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h15a2 2 0 0 1 2 2v6M7 22h4M9 18v4m5-12 8 6-4 1-2 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M9 18H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h15a2 2 0 0 1 2 2v6M7 22h4M9 18v4m5-12 8 6-4 1-2 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.participant-remote-control-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

.participant-remote-control-button .button-icon { flex: 0 0 17px; }
.participant-remote-control-button.is-active { color: var(--green); }
@media (min-width: 761px) {
  .participant-popover {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    transform: translateY(calc(-50% + var(--participant-popover-shift, 0px)));
  }
}

.remote-control-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 24px 100px #0008;
}

.remote-control-dialog::backdrop { background: #030810b3; backdrop-filter: blur(5px); }
.remote-control-dialog-heading { display: flex; align-items: center; gap: 14px; }
.remote-control-dialog-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--info-line); border-radius: 14px; background: var(--info-bg); color: var(--blue); }
.remote-control-dialog-icon .button-icon { width: 24px; height: 24px; }
.remote-control-eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.remote-control-dialog h2 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
#remote-control-description { margin: 20px 0 16px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.remote-control-helper-status { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.remote-control-helper-status::before { content: ""; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.remote-control-helper-status.is-ready { color: var(--green); }
.remote-control-helper-status.is-ready::before { background: var(--green); }
.remote-control-share-warning, .remote-control-permission { padding: 12px; border: 1px solid var(--warning-line); border-radius: 10px; color: var(--amber); background: var(--warning-bg); font-size: 13px; line-height: 1.6; }
.remote-control-monitor-label { display: grid; gap: 8px; margin-top: 18px; font-size: 13px; }
.remote-control-monitor { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-strong); color: var(--text); font: inherit; }
.remote-control-monitor-label small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.remote-control-install { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.remote-control-download { display: inline-flex; text-decoration: none; padding: 11px 16px; border-radius: 9px; font-size: 13px; }
.remote-control-install-note, .remote-control-helper-message { font-size: 13px; line-height: 1.55; color: var(--muted); }
.remote-control-install-note:empty { display: none; }
.remote-control-recheck { font-size: 12px; padding: 7px 10px; }
.remote-control-scope { margin: 20px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.remote-control-scope kbd { font: inherit; color: var(--text); white-space: nowrap; }
.remote-control-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 17px; border-top: 1px solid var(--line-soft); }
.remote-control-dialog-actions button { min-height: 42px; padding: 10px 18px; border-radius: 9px; }

.remote-control-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 120px);
  padding: 5px 6px 5px 9px;
  border: 1px solid #26d07c80;
  border-radius: 24px;
  color: var(--text);
  background: #111c20e8;
  box-shadow: 0 3px 14px #0004;
  pointer-events: auto;
  font-size: 11px;
  line-height: 1.4;
}

.remote-control-badge > .button-icon { width: 17px; height: 17px; flex: 0 0 17px; color: var(--green); }
.remote-control-avatar { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; overflow: hidden; border-radius: 50%; background: var(--panel-strong); color: var(--text); font-size: 11px; font-weight: 600; }
.remote-control-avatar img { width: 100%; height: 100%; object-fit: cover; }
.remote-control-badge-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-control-stop { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; padding: 5px; border: 0; border-radius: 50%; background: #ffffff12; color: var(--text); cursor: pointer; }
.remote-control-stop:hover { color: var(--red); background: var(--danger-bg); }
.remote-control-stop .button-icon { width: 14px; height: 14px; }
.is-remote-controlled { outline: 1px solid #26d07c90; outline-offset: -1px; }
.is-remote-controller video { object-fit: contain !important; cursor: crosshair; touch-action: none; }
.is-remote-controller video:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.is-remote-controller .screen-annotation-root, .is-remote-controller .screen-annotation-button, .is-remote-controller .screen-annotation-tool-rail { display: none !important; }
.video-tile.is-pip .remote-control-badge { top: 6px; left: 6px; max-width: calc(100% - 44px); gap: 4px; padding: 3px 4px 3px 6px; }
.video-tile.is-pip .remote-control-badge-label { display: none; }
.video-tile.is-pip .remote-control-avatar { width: 20px; height: 20px; flex-basis: 20px; }
.video-tile.is-pip .remote-control-stop { width: 23px; height: 23px; flex-basis: 23px; }
.remote-control-notice { position: fixed; z-index: 12000; left: 50%; bottom: 92px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 13px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-strong); color: var(--text); box-shadow: var(--shadow); font-size: 13px; line-height: 1.5; pointer-events: none; }
@media (max-width: 600px) {
  .remote-control-dialog { padding: 22px; }
  .remote-control-badge { max-width: calc(100% - 86px); }
  .remote-control-dialog-actions button { padding-inline: 12px; }
}
