/* PIVU v7 | Full-height calls, adaptive role editor, no application title strip */
.window-bar{display:none!important}
.app-shell{height:100dvh;min-height:0}
.workspace{height:100%;min-height:0;flex:1;overflow:hidden}
.main-panel{min-height:0;overflow:hidden}
.chat-header{flex-shrink:0}
/* A call is one viewport, never a document requiring vertical page scroll. */
.main-panel:has(.call-experience){overflow:hidden}
.main-panel:has(.call-experience) .call-experience{
  flex:1 1 auto;min-height:0;max-height:100%;overflow:hidden!important;
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;
  gap:10px;padding:12px clamp(10px,2vw,22px) 10px;
  align-items:stretch;align-content:stretch;
}
.main-panel:has(.call-experience) .call-topbar{padding:0;min-height:0;display:flex;align-items:center;gap:8px}
.call-topbar h2{font-size:clamp(14px,1.4vw,18px)!important;margin:0!important}
.call-topbar p,.call-kicker{display:none}
.call-people-title{display:none!important}
/* when a stream is focused, the stage receives flexible height and participants form a thumbnail strip */
.call-experience:has(.call-stage){grid-template-rows:auto minmax(0,1fr) auto auto!important}
.call-experience:has(.call-stage) .call-stage{
  width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;
  margin:0!important;display:flex;flex-direction:column;overflow:hidden;grid-row:2;
}
.call-stage-top{flex:0 0 auto;min-height:35px}
.call-stage .stage-video{flex:1 1 0;min-height:0;height:100%;max-height:100%;width:100%;object-fit:contain}
.call-stage-bottom{flex:0 0 auto;padding:3px 8px;font-size:10px}
.call-experience:has(.call-stage) .call-people{
  grid-row:3;display:flex!important;min-width:0;min-height:0;height:clamp(64px,14dvh,120px);
  overflow-x:auto;overflow-y:hidden;gap:7px;margin:0!important;padding:0 0 4px;
}
.call-experience:has(.call-stage) .call-people>.call-tile{width:clamp(100px,15vw,190px);min-width:100px;height:100%!important;flex:none!important;border-radius:8px}
.call-experience:not(:has(.call-stage)) .call-people{
  grid-row:2;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;
  margin:0!important;padding:2px;display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));
  grid-auto-rows:minmax(0,1fr);align-content:stretch;gap:10px;overflow:hidden!important;
}
.call-experience:not(:has(.call-stage)) .call-tile{height:100%!important;max-height:100%;min-height:0}
.call-experience .call-bottom{
  grid-row:-2/-1;min-height:0;max-height:clamp(75px,17dvh,137px);
  margin:0!important;padding:0!important;display:flex;align-items:center;justify-content:center;
  overflow:visible;
}
.call-bottom .call-footnote{display:none}
.dc-call-area{width:100%;gap:3px!important}
.dc-call-identity{display:none}
.dc-call-toolbar{padding:0!important;min-height:0!important;flex-wrap:nowrap!important;gap:clamp(3px,1vw,9px)!important;max-width:100%!important}
.dc-call-group{gap:clamp(2px,.6vw,8px)}
.dc-call-button{min-width:clamp(40px,5vw,63px);min-height:clamp(43px,7dvh,66px);border-radius:9px;padding:5px 6px}
.dc-call-combo .dc-call-button{min-width:clamp(36px,4.8vw,61px)}
.dc-call-label{font-size:10px}
.dc-combo-arrow{height:auto;align-self:stretch}
.call-tile{min-height:0}
.call-tile .tile-surface{height:calc(100% - 33px)!important;min-height:0}
.call-tile .tile-footer{height:33px!important;min-height:33px}
.call-tile .tile-avatar{max-height:90%;max-width:90%}
@media (max-height:680px){.main-panel:has(.call-experience) .call-experience{gap:5px;padding-top:6px;padding-bottom:5px}.call-experience:has(.call-stage) .call-people{height:clamp(54px,12dvh,78px)}.dc-call-label{display:none}.dc-call-button{min-height:39px}.call-experience .call-bottom{max-height:66px}.call-stage-bottom{display:none}}
@media (max-width:820px){.dc-call-separator{display:none}.dc-call-toolbar{gap:3px!important}.dc-call-button{min-width:36px;padding:6px 5px}.dc-call-label{font-size:9px}.dc-call-group{gap:3px}.main-panel:has(.call-experience) .call-experience{padding:9px 8px}}
@media (max-width:560px){.main-panel:has(.call-experience) .call-experience{gap:5px}.call-experience:has(.call-stage) .call-people{height:75px}.call-experience:not(:has(.call-stage)) .call-people{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.call-experience .call-bottom{max-height:60px}.dc-call-icon svg{width:18px;height:18px}.dc-call-label{display:none}.dc-call-button{min-width:31px!important;min-height:42px;padding:5px 4px}.dc-call-button.dc-disconnect{min-width:42px!important}.dc-combo-arrow{width:14px!important}.dc-call-combo .dc-call-button{min-width:32px!important}.dc-call-toolbar{justify-content:space-evenly}}
@media (max-width:370px){.dc-call-group{gap:1px}.dc-call-toolbar{gap:1px!important}.dc-call-button{min-width:28px!important;padding:3px}.dc-combo-arrow{width:12px!important}}
/* Roles redesign: compact Discord-like three-column settings without oversized checkbox cards. */
.v7-role-workspace{display:grid;grid-template-columns:minmax(185px,225px) minmax(0,1fr);gap:22px;align-items:start}
.v7-role-side{padding:7px;min-width:0;border:1px solid #383a40;border-radius:8px;background:#222329;display:flex;flex-direction:column;gap:3px}
.v7-role-side-head{display:flex;align-items:center;justify-content:space-between;color:#a9abb8;padding:6px 7px;font-size:11px}
.v7-icon-button{display:grid;place-items:center;width:28px;height:28px;border:0;background:transparent;color:#bec1cd;cursor:pointer;border-radius:6px}
.v7-icon-button:hover{background:#42444b;color:white}
.v7-role-menu-wrap{display:flex;align-items:center;position:relative;min-width:0}
.v7-role-menu-row{display:flex;align-items:center;text-align:left;width:100%;min-width:0;min-height:41px;gap:10px;padding:7px 9px;border:0;border-radius:5px;background:transparent;color:#e4e5ed;cursor:pointer;font-size:12px}
.v7-role-menu-row>span:last-child{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.v7-role-menu-row small{display:block;color:#8b8e99;font-size:10px;font-weight:450;margin-top:2px}
.v7-role-menu-row:hover,.v7-role-menu-row.is-active{background:#3b3d46;color:#fff}
.v7-role-menu-row.is-active{box-shadow:inset 2px 0 #747cf5}
.v7-role-dot{width:11px;height:11px;min-width:11px;border-radius:50%;display:inline-block;vertical-align:middle}
.v7-position{display:none;gap:0}.v7-role-menu-wrap:hover .v7-position{display:flex}.v7-position button{padding:3px;background:#454752;border:0;color:#fff;border-radius:4px;cursor:pointer}
.v7-create-role{margin:8px 2px 2px;justify-content:center}
.v7-role-content{min-width:0;max-width:730px}
.v7-editor-form{gap:0!important}
.v7-editor-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 0 15px}
.v7-editor-top>div>span{font-size:10px;color:#9498a6;font-weight:780}
.v7-editor-top h2{font-size:18px;margin:5px 0 0;letter-spacing:-.2px}
.v7-editor-top p{font-size:12px;color:#999da9;line-height:1.45}
.v7-role-tabs{display:flex;gap:8px;border-bottom:1px solid #45464d;overflow-x:auto;scrollbar-width:none}
.v7-role-tabs button{flex:0 0 auto;background:transparent;color:#aeb1be;border:0;cursor:pointer;padding:11px 10px;font-size:12px;font-weight:650;border-bottom:2px solid transparent;white-space:nowrap}
.v7-role-tabs button.selected{color:#fff;border-color:#7b83ff}.v7-role-tabs button:hover{color:#fff}
.v7-role-tab-body{min-width:0;padding:22px 0 8px;display:grid;gap:16px}
.v7-role-tab-body[hidden]{display:none!important}
.v7-role-color-input{display:flex;align-items:center;gap:12px;color:#9fa3af;text-transform:none;letter-spacing:normal;font-size:12px;font-weight:400}
.v7-role-color-input input{width:65px;height:43px;border:1px solid #454850;background:transparent;border-radius:7px;padding:3px}
.v7-role-preview{border-radius:7px;padding:14px 15px;background:#25262b;display:grid;gap:15px}
.v7-role-preview strong{font-size:11px;color:#a8aab5}.v7-role-preview>div{display:flex;align-items:center;gap:10px;font-size:13px}.v7-role-preview small{color:#868b94}
.v7-perm-row{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between;gap:14px!important;padding:17px 0!important;border-bottom:1px solid #3e4048;cursor:pointer;text-transform:none!important;letter-spacing:normal!important}
.v7-perm-row>span{display:grid;gap:5px;flex:1}.v7-perm-row strong{font-size:13px;color:#eeeef3}.v7-perm-row small{font-size:11px;font-weight:400;color:#9ca0ad;line-height:1.4}
.v7-perm-row input{appearance:none;-webkit-appearance:none;width:38px;height:22px;min-width:38px;border-radius:30px;border:0;background:#4b4d55;position:relative;cursor:pointer;transition:background .12s}
.v7-perm-row input:before{content:'';position:absolute;top:4px;left:4px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .12s}
.v7-perm-row input:checked{background:#5865f2}.v7-perm-row input:checked:before{transform:translateX(16px)}.v7-perm-row input:disabled{opacity:.4;cursor:not-allowed}
.v7-perm-title h3{font-size:15px;margin:0 0 5px}.v7-perm-title small{font-size:11px;color:#949ba4}
.v7-role-person{display:flex!important;flex-direction:row!important;align-items:center;gap:11px!important;border-bottom:1px solid #3e4048;padding:12px 4px!important;text-transform:none!important;letter-spacing:normal!important}
.v7-role-person>span:nth-child(2){display:grid;gap:3px;flex:1;min-width:0}.v7-role-person strong{font-size:12px}.v7-role-person small{font-size:11px;font-weight:400;color:#9397a5}
.v7-role-person>input{width:17px;height:17px;accent-color:#5865f2}
.v7-people-toolbar{display:flex;flex-direction:column;gap:4px}.v7-people-toolbar strong{font-size:13px}.v7-people-toolbar span{font-size:11px;color:#989baa}
.v7-role-members{max-height:380px;overflow:auto}
.v7-role-save{position:sticky;bottom:0;display:flex;align-items:center;gap:12px;margin-top:10px;padding:14px 0;background:#313338;z-index:3;border-top:1px solid #44464e}
.v7-role-save small{font-size:11px;color:#9296a5}
.pivu-quick-roles{display:flex;flex-wrap:wrap;gap:6px;padding:10px 0}
.pivu-quick-button{font-size:11px;color:#e1e3f1;background:#363840;border:1px solid #484b54;border-radius:5px;padding:6px 8px;cursor:pointer}
.pivu-quick-button:hover{background:#505460}
.pivu-roles-dialog{width:min(380px,100%)}.pivu-role-check{display:flex;align-items:center;gap:10px;padding:10px;border-radius:6px}.pivu-role-check:hover{background:#343740}.pivu-role-check input{accent-color:#5865f2}.pivu-role-check>span{flex:1}
@media(max-width:800px){.v7-role-workspace{grid-template-columns:160px minmax(0,1fr);gap:12px}.v7-role-menu-row{font-size:11px}.v7-role-tabs button{font-size:11px;padding:9px 7px}}
@media(max-width:600px){.v7-role-workspace{grid-template-columns:1fr;gap:8px}.v7-role-side{max-height:170px;overflow:auto}.v7-role-content{min-width:0}.v7-role-tab-body{padding-top:12px}.v7-role-save{padding:8px 0}}
@media(prefers-reduced-motion:reduce){.v7-perm-row input,.v7-perm-row input:before{transition:none}}
.pivu-member-row{display:flex;align-items:center;position:relative;border-radius:5px;gap:3px}
.pivu-member-row:hover{background:#33363e}.pivu-member-row>.member-entry{flex:1;min-width:0}
.pivu-member-role-trigger{border:0;background:#41434b;color:#c9ced8;width:24px;height:24px;border-radius:5px;display:grid;place-items:center;cursor:pointer;opacity:0;flex:none;margin-right:4px}
.pivu-member-row:hover .pivu-member-role-trigger,.pivu-member-role-trigger:focus-visible{opacity:1}
.pivu-member-role-trigger:hover{background:#5865f2;color:#fff}
.pivu-mic-pane{display:grid;gap:10px;padding:12px 0 19px}
.pivu-mic-pane>label{font-size:12px;font-weight:730;color:#dee0e7}
.pivu-mic-pane select{background:#1e1f22;color:#fff;border:1px solid #41444f;border-radius:5px;padding:11px;min-height:42px;width:min(100%,480px)}
.pivu-mic-test-line{display:flex;align-items:center;gap:13px;max-width:480px}
.pivu-mic-track{height:9px;border-radius:40px;background:#1b1e24;flex:1;overflow:hidden;border:1px solid #474951}
.pivu-mic-track>div{height:100%;width:0;background:linear-gradient(90deg,#2bb873,#a6cb67);border-radius:40px;transition:width 50ms linear}
.pivu-mic-pane small{color:#a7acba;line-height:1.5;max-width:560px}
@media(hover:none){.pivu-member-role-trigger{opacity:1}}


/* v7.1 — Role switches: override generic .v5-form input rule, which turned
   checkboxes into full-width text fields and broke the permission editor. */
#v6-role-form.v5-form label.v7-perm-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
  width: 100%;
  min-width: 0;
  min-height: 69px;
  padding: 14px 12px !important;
  margin: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid #41434d;
  border-radius: 5px;
  box-sizing: border-box;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  transition: background-color 120ms ease, border-color 120ms ease;
}
#v6-role-form.v5-form label.v7-perm-row:hover { background: rgba(255,255,255,.035); }
#v6-role-form.v5-form label.v7-perm-row:has(input:checked) {
  background: rgba(88,101,242,.065);
  border-bottom-color: #565c88;
}
#v6-role-form.v5-form label.v7-perm-row:has(input:focus-visible) {
  outline: 2px solid #9ba4ff;
  outline-offset: -2px;
}
#v6-role-form.v5-form .pivu-perm-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: flex-start;
  text-align: left;
}
#v6-role-form.v5-form .pivu-perm-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  color: #f0f1f6;
  white-space: normal;
  overflow-wrap: anywhere;
}
#v6-role-form.v5-form .pivu-perm-copy small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: #abb0bd;
  white-space: normal;
  overflow-wrap: anywhere;
}
#v6-role-form.v5-form .pivu-switch-control {
  display: inline-flex;
  flex: 0 0 146px;
  width: 146px;
  min-width: 146px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 550;
}
/* These overrides MUST outrank .v5-form input:not([type=file]):not([type=color]). */
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  position: relative !important;
  box-sizing: border-box !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #747782 !important;
  border-radius: 20px !important;
  background: #464951 !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 130ms ease, border-color 130ms ease;
}
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]::before {
  content: '';
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f5f6f9;
  box-shadow: 0 1px 2px #0005;
  transform: translateX(0);
  transition: transform 130ms ease;
}
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]:checked {
  background: #5865f2 !important;
  border-color: #8e96ff !important;
}
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]:checked::before {
  transform: translateX(18px);
}
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]:focus-visible {
  outline: 2px solid #abb6ff !important;
  outline-offset: 3px;
}
#v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}
#v6-role-form.v5-form .pivu-switch-status {
  display: block;
  width: 84px;
  text-align: left;
  font-size: 11px;
  color: #afb2bd;
  font-weight: 650;
  line-height: 1.5;
}
#v6-role-form.v5-form .pivu-state-enabled { display: none; color: #a4b0ff; }
#v6-role-form.v5-form .pivu-switch-control:has(input:checked) .pivu-state-enabled { display: inline; }
#v6-role-form.v5-form .pivu-switch-control:has(input:checked) .pivu-state-disabled { display: none; }
#v6-role-form.v5-form .pivu-switch-control:has(input:disabled) .pivu-switch-status { opacity: .6; }
/* Checkbox in member assignment was also affected by the broad input style. */
#v6-role-form.v5-form .v7-role-person > input[type="checkbox"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  flex: 0 0 17px !important;
  width: 17px !important;
  min-width: 17px !important;
  max-width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  max-height: 17px !important;
  padding: 0 !important;
  margin: 0 !important;
  accent-color: #5865f2;
  border: 0 !important;
  background: transparent !important;
}
#v6-role-form.v5-form label.v7-role-person {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}
@media (max-width: 700px) {
  #v6-role-form.v5-form label.v7-perm-row { gap: 12px !important; padding: 12px 7px !important; }
  #v6-role-form.v5-form .pivu-switch-control { flex: 0 0 122px; min-width: 122px; width: 122px; gap: 7px; }
  #v6-role-form.v5-form .pivu-switch-status { width: 71px; font-size: 10px; }
}
@media (max-width: 420px) {
  #v6-role-form.v5-form label.v7-perm-row { flex-wrap: wrap !important; }
  #v6-role-form.v5-form .pivu-switch-control { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #v6-role-form.v5-form label.v7-perm-row,
  #v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"],
  #v6-role-form.v5-form .pivu-switch-control input.pivu-role-switch[type="checkbox"]::before {
    transition: none !important;
  }
}

/* v7.2: consistent enabled/disabled contrast even with legacy form styles. */
#v6-role-form.v5-form label.v7-perm-row .pivu-switch-control {padding:0!important;background:transparent!important;border:0!important;}
#v6-role-form.v5-form label.v7-perm-row .pivu-role-switch:checked {background:#5865f2!important;}
#v6-role-form.v5-form label.v7-perm-row .pivu-role-switch:not(:checked) {background:#454751!important;}
#v6-role-form.v5-form label.v7-perm-row {max-width:100%;} 

.pivu-vanity-input{display:flex;align-items:center;min-width:0;gap:0!important;background:#191a20;border:1px solid #41434d;border-radius:7px;overflow:hidden;margin-top:7px}
.pivu-vanity-input>span{padding:11px 10px;background:#272931;color:#b7b9c6;white-space:nowrap;font:500 12px/1.4 system-ui,sans-serif;text-transform:none;letter-spacing:normal;flex:0 1 auto;max-width:55%;overflow:hidden;text-overflow:ellipsis}
.pivu-vanity-form.v5-form .pivu-vanity-input>input[name=slug]{width:100%!important;flex:1 1 auto!important;min-width:90px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;padding:11px!important;font-size:14px}
.pivu-vanity-preview{display:flex;align-items:center;gap:10px;background:#292d3c;border:1px solid #565f92;color:#dde1ff;padding:12px 14px;margin-bottom:15px;border-radius:7px;font-size:13px;overflow-wrap:anywhere}
.pivu-vanity-preview span{min-width:0;word-break:break-word}
.pivu-vanity-form .v5-actions{flex-wrap:wrap!important}
@media(max-width:530px){.pivu-vanity-input{flex-wrap:wrap}.pivu-vanity-input>span{max-width:100%;width:100%;box-sizing:border-box}.pivu-vanity-form.v5-form .pivu-vanity-input>input[name=slug]{min-width:100%!important}.pivu-switch-status{font-size:10px!important}}
