/* Room tools stay independent of the camera viewport and transfer batches. */
body[data-room-role=participant] .sender-only,body[data-room-role=participant] .receiver-only{display:initial}
body[data-room-role=participant] #declineRoomBtn,body[data-room-role=participant] #joinAsGrabberBtn{display:none!important}
body[data-room-role=participant] .camera-primary{display:flex!important;align-items:center;gap:10px;flex-wrap:wrap}
body[data-room-role=participant] .camera-self-name{margin-inline-end:auto}
body[data-room-role=participant] #addMoreBtn{display:inline-flex;align-items:center;border:1px solid #fffce1;background:#fffce1;color:#0c110e;border-radius:24px;padding:10px 16px;font-weight:700;cursor:pointer}
body[data-room-role=participant] #topBar{display:flex!important;flex-direction:column;align-items:stretch;gap:8px;height:auto!important;padding:14px 20px!important}
body[data-room-role=participant] .camera-code-line{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
body[data-room-role=participant] .camera-instruction{font-size:14px;line-height:1.5}
body[data-room-role=participant] #touchAddFilesBtn{display:none}
.transfer-indicator{gap:8px!important;white-space:nowrap}
.transfer-ring{--progress:0%;display:inline-grid;place-items:center;min-width:34px;height:34px;border-radius:50%;background:conic-gradient(#00dc49 var(--progress),#343434 0);font-size:10px;color:#fff;padding:4px;box-shadow:inset 0 0 0 4px #101010}
.room-transfer-dialog{width:min(820px,calc(100vw - 32px));max-width:calc(100vw - 32px)!important;max-height:88dvh;border:1px solid #556258;border-radius:20px;background:#101612;color:#fffce1;padding:24px;overflow:auto;margin:auto}
.room-transfer-dialog::backdrop{background:rgba(0,0,0,.85)}
.room-transfer-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:16px;position:sticky;top:-24px;background:#101612;padding-block:12px;z-index:1}
.room-transfer-dialog h2,.room-transfer-dialog h3{margin:0}.transfer-description{color:#bcc7bf;line-height:1.5;margin:12px 0 24px}
.room-transfer-list{display:grid;gap:20px}.room-transfer-batch{padding:18px;border:1px solid #354239;border-radius:12px}.room-transfer-batch h3{overflow-wrap:anywhere;font-size:17px}
.room-transfer-batch>p{font-size:14px;color:#bac7bd}.room-transfer-file{display:flex;gap:12px;align-items:center;padding-block:12px;border-top:1px solid #28372d}.room-transfer-file>div{min-width:0;flex:1}.room-transfer-file strong{display:block;overflow-wrap:anywhere;font-size:14px;font-weight:600}.room-transfer-file span{display:block;color:#bcc7bf;font-size:13px;margin-block:6px}.room-transfer-file progress{display:block;width:100%;height:8px;accent-color:#00dc49}.room-transfer-file button,.room-transfer-file a{flex:none;font-size:13px}
.room-transfer-dialog button:focus-visible,.room-transfer-dialog a:focus-visible{outline:2px solid #00dc49;outline-offset:3px}
body[data-room-role=participant] #fileChooserDialog{position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,.9)}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden!important}
@media(max-width:700px){
 body[data-room-role=participant] #topBar{padding:12px!important}
 body[data-room-role=participant] .camera-primary{gap:8px}
 body[data-room-role=participant] .camera-self-name{flex:1 0 calc(100% - 110px);font-size:17px}
 body[data-room-role=participant] .camera-primary>.language-picker{order:8;margin-inline-start:auto}
 body[data-room-role=participant] .camera-primary>#exitBtn{order:9}
 body[data-room-role=participant] #cameraCodeHint{font-size:12px}
 body[data-room-role=participant] #cameraCodeHint .code-arrow{display:none}
 .room-transfer-dialog{width:100vw;max-width:100vw!important;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:18px}
 .room-transfer-dialog>header{top:-18px}.room-transfer-file{align-items:flex-start;flex-wrap:wrap}.room-transfer-file>div{flex-basis:100%}
 .transfer-indicator{padding:6px 10px!important}.transfer-ring{min-width:28px;height:28px}
}
body[data-room-role=participant] .room-identity-row,body[data-room-role=participant] .room-tools-row{display:contents}
body[data-room-role=participant] .camera-primary .camera-self-name{order:0}
body[data-room-role=participant] .camera-primary #addMoreBtn{order:1}
body[data-room-role=participant] .camera-primary #stagedFilesBtn{order:2}
body[data-room-role=participant] .camera-primary #roomTransfersBtn{order:3}
body[data-room-role=participant] .camera-primary #cameraDeviceRoster{order:4}
body[data-room-role=participant] .camera-primary #headerTouchControlsBtn{order:5}
body[data-room-role=participant] .camera-primary .language-picker{order:6;margin-inline-start:0}
body[data-room-role=participant] .camera-primary #exitBtn{order:7}
body[data-room-role=participant] .stage #video{inset:var(--room-toolbar-height,150px) 0 0;height:calc(100% - var(--room-toolbar-height,150px))}
body[data-room-role=participant] .transfer-indicator{background:#080808!important;color:#fffce1!important;border:1px solid #258845!important}
@media(max-width:700px){
 body[data-room-role=participant] .camera-primary{display:flex!important;flex-direction:column;align-items:stretch}
 body[data-room-role=participant] .room-identity-row,body[data-room-role=participant] .room-tools-row{display:flex;align-items:center;gap:8px;min-width:0}
 body[data-room-role=participant] .room-identity-row .camera-self-name{flex:1;min-width:40px;font-size:14px}
 body[data-room-role=participant] .room-tools-row{flex-wrap:wrap}
 body[data-room-role=participant] .room-identity-row .language-picker summary{padding:7px;font-size:11px;gap:4px}
 body[data-room-role=participant] .room-identity-row .language-current{max-width:64px}
 body[data-room-role=participant] .room-identity-row #exitBtn{padding:7px 10px;font-size:12px}
 body[data-room-role=participant] #topBar{padding:0!important}
 body[data-room-role=participant] .camera-toolbar{padding:12px}
 body[data-room-role=participant] .camera-files{max-width:130px;overflow:hidden;text-overflow:ellipsis}
}
.room-transfer-dialog{width:100vw;max-width:100vw!important;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px max(24px,calc((100vw - 960px)/2));box-sizing:border-box}
.room-transfer-dialog>header{top:-24px;flex-wrap:wrap;min-height:70px}
.transfer-page-actions{display:flex;gap:10px;flex-wrap:wrap}
.transfer-page-actions button{min-height:44px;padding:10px 16px}
@media(max-width:600px){.room-transfer-dialog{padding:16px}.room-transfer-dialog>header{top:-16px}.room-transfer-dialog h2{font-size:24px}.transfer-page-actions button{padding:8px 12px;font-size:13px}}
body[data-room-role=participant] #senderProgress{display:none!important}
body[data-room-role=participant] .camera-controls{bottom:90px}
@media(max-width:700px){body[data-room-role=participant] .room-identity-row .camera-self-name{white-space:normal;overflow:visible;overflow-wrap:anywhere;line-height:1.3}}
.room-transfer-file [hidden]{display:none!important}

/* Keep transfer activity in the camera, away from its header controls. */
body[data-room-role=participant] #grabScreen>#roomTransfersBtn{position:absolute;left:20px;bottom:20px;z-index:45;display:flex;align-items:center;gap:12px!important;padding:14px 18px!important;min-height:76px;border-radius:18px;box-shadow:0 6px 28px #0008;text-align:left;max-width:calc(100% - 40px)}
.transfer-indicator-copy{display:grid;gap:5px}.transfer-indicator-copy strong{font-size:17px}.transfer-indicator-hint{font-size:12px;font-weight:500;color:#d5e5d9;white-space:normal;line-height:1.4}
#roomTransfersBtn .transfer-ring{position:relative;isolation:isolate;min-width:46px;width:46px;height:46px;box-sizing:border-box;font-size:12px}
#roomTransfersBtn.is-transferring .transfer-ring::after{content:'';position:absolute;inset:-4px;border:2px solid #414141;border-top-color:#00ef62;border-right-color:#00ef62;border-radius:50%;animation:room-transfer-spin 1s linear infinite}
@keyframes room-transfer-spin{to{transform:rotate(360deg)}}
#fileChooserDialog .invite-panel{position:relative}#fileChooserDialog .file-chooser-heading{display:block;padding-inline-end:36px}#fileChooserDialog #closeFileChooserBtn{position:absolute;top:12px;right:12px;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;margin:0}
@media(max-width:700px){body[data-room-role=participant] #grabScreen>#roomTransfersBtn{left:12px;bottom:14px;padding:10px 14px!important;min-height:68px;max-width:calc(100% - 24px)}.transfer-indicator-copy strong{font-size:15px}body[data-room-role=participant] .room-tools-row{justify-content:space-between}body[data-room-role=participant] .room-tools-row #cameraDeviceRoster{margin-inline-start:auto}#fileChooserDialog .invite-panel{padding:22px}#fileChooserDialog .file-chooser-heading h2{margin-top:0}}

body[data-room-role=participant] #gestureStatus{bottom:110px}body[data-room-role=participant] .camera-controls{bottom:170px}body[data-room-role=participant] .has-incoming-offer #gestureStatus{display:none}
.room-transfer-dialog>.transfer-description+button{margin-bottom:20px}
/* Offers are declined on the right; confirmed transfer activity stays on the left. */
body[data-room-role=participant] #grabScreen>#roomTransfersBtn[hidden],#roomTransfersBtn[hidden]{display:none!important}
body[data-room-role=participant] #incomingBanner{position:absolute;inset:auto 20px 20px auto;z-index:45;transform:none;width:max-content;margin:0;padding:0;max-width:calc(50% - 32px);background:none;border:0}
body[data-room-role=participant] #incomingBanner.hidden{display:none!important}
body[data-room-role=participant] #incomingBanner button{display:flex;align-items:center;justify-content:center;min-height:76px;padding:14px 18px;border:1px solid #258845;border-radius:18px;background:#080808;color:#fffce1;box-shadow:0 6px 28px #0008;font-size:15px;font-weight:600;white-space:normal;line-height:1.4}
body[data-room-role=participant] .lighting-hint{top:calc(var(--room-toolbar-height,150px) + 12px);z-index:19}
@media(max-width:700px){
 body[data-room-role=participant] #grabScreen>#roomTransfersBtn{max-width:calc(50% - 18px);min-height:68px;padding:10px!important;gap:8px!important;white-space:normal}
 #roomTransfersBtn .transfer-ring{min-width:32px;width:32px;height:32px;font-size:10px}
 .transfer-indicator-copy{min-width:0}.transfer-indicator-copy strong{font-size:13px}.transfer-indicator-hint{font-size:11px}
 body[data-room-role=participant] #incomingBanner{right:12px;bottom:14px;max-width:calc(50% - 18px)}
 body[data-room-role=participant] #incomingBanner button{min-height:68px;padding:10px 12px;font-size:13px}
}

body[data-room-role=participant] .transfer-indicator:hover,
body[data-room-role=participant] #incomingBanner button:hover{background:#1a1a1a!important;border-color:#0ae448!important}
body[data-room-role=participant] .transfer-indicator:focus-visible,
body[data-room-role=participant] #incomingBanner button:focus-visible{outline:2px solid #0ae448;outline-offset:3px}

/* Camera actions are compact, balanced controls; ended rooms use a workspace action. */
.room-transfer-archive{display:inline-flex;align-items:center;min-height:44px;gap:8px;margin:0 0 20px;padding:10px 16px!important;border-radius:12px!important;font-size:14px!important}
.room-transfer-archive[hidden],.transfer-page-actions button[hidden]{display:none!important}
body[data-room-role=participant] #grabScreen>#roomTransfersBtn{min-height:56px;padding:10px 14px!important;gap:10px!important;border-radius:14px;box-shadow:0 3px 16px #0005}
#roomTransfersBtn .transfer-ring{min-width:32px;width:32px;height:32px;font-size:10px;flex:none}
.transfer-indicator-copy{gap:2px}.transfer-indicator-copy strong{font-size:14px;line-height:1.3}.transfer-indicator-hint{font-size:11px;line-height:1.3}
body[data-room-role=participant] #incomingBanner button{min-height:56px;padding:10px 14px;border-radius:14px;font-size:14px;box-shadow:0 3px 16px #0005}
@media(max-width:700px){
 body[data-room-role=participant] #grabScreen>#roomTransfersBtn{min-height:52px;padding:9px 12px!important;gap:8px!important}
 .transfer-indicator-copy strong{font-size:13px}.transfer-indicator-hint{display:none}
 body[data-room-role=participant] #incomingBanner button{min-height:52px;padding:9px 12px;font-size:12px}
}

.room-transfer-file > .room-transfer-file-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;gap:8px}
