/* In-call chat and local preview controls. */
[hidden] { display: none !important; }
.th-self { touch-action: none; user-select: none; -webkit-user-select: none; }
.th-self:hover,.th-self:active { transform: none; }
.th-self.dragging { cursor: grabbing; outline: 2px solid #8ab4ff; }
.th-self.preview-hidden { display: none !important; }
.tc-preview-hide { position:absolute;right:0;top:0;width:44px;height:44px;border:0;color:white;background:#101820a8;font:22px system-ui;cursor:pointer;z-index:5;border-radius:0 0 0 12px; }
.tc-hud-action { position:relative;min-width:44px;height:40px;padding:0 10px;border:1px solid #ffffff32;border-radius:10px;color:white;background:#111b2db8;font:13px system-ui;cursor:pointer; }
.tc-badge { position:absolute;right:-5px;top:-7px;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:#ff5a67;color:white;font:11px/18px system-ui;text-align:center; }
.tc-panel { position:fixed;right:16px;top:calc(70px + env(safe-area-inset-top));bottom:calc(100px + env(safe-area-inset-bottom));width:min(380px,calc(100vw - 24px));z-index:50;display:flex;flex-direction:column;background:#f7f9fd;color:#172135;border:1px solid #d9e1ef;border-radius:18px;box-shadow:0 20px 80px #0006;overflow:hidden;font:14px/1.5 system-ui; }
.tc-head {display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:white;border-bottom:1px solid #e3e9f3;}
.tc-head h2 {font-size:16px;margin:0;}
.tc-close {min-width:44px;min-height:40px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:22px;cursor:pointer;}
.tc-info {padding:8px 14px;margin:0;background:#edf3ff;font-size:12px;color:#405677;}
.tc-connection {padding:4px 14px;color:#68758b;font-size:12px;border-bottom:1px solid #e3e9f3;}
.tc-messages {flex:1;min-height:60px;overflow:auto;padding:12px;overscroll-behavior:contain;}
.tc-messages:empty:before {content:'暂无消息，和会议成员打个招呼吧';display:block;text-align:center;color:#7b879a;font-size:13px;margin-top:24px;}
.tc-message {padding:10px 12px;border:1px solid #e1e8f2;border-radius:12px;margin:0 0 10px;background:white;overflow-wrap:anywhere;}
.tc-message-meta {font-size:11px;color:#68768e;margin-bottom:5px;}
.tc-message p {margin:0;white-space:pre-wrap;}
.tc-attachment {border:1px solid #b8cef3;color:#2257b1;background:#edf4ff;border-radius:9px;min-height:44px;padding:8px 12px;cursor:pointer;}
.tc-compose {border-top:1px solid #e0e7f1;background:white;padding:10px;}
.tc-compose textarea {box-sizing:border-box;display:block;width:100%;resize:vertical;min-height:58px;max-height:130px;border:1px solid #d3ddeb;border-radius:9px;padding:8px;font:14px/1.5 system-ui;color:#172135;background:white;}
.tc-actions {display:flex;gap:6px;align-items:center;margin-top:8px;}
.tc-actions button {min-height:40px;padding:6px 12px;border:1px solid #d6dfec;border-radius:9px;background:#f6f8fc;color:#233959;font-size:13px;cursor:pointer;}
.tc-actions #chatSend {margin-left:auto;color:white;background:#286bf1;border-color:#286bf1;}
.tc-actions button:disabled {opacity:.45;cursor:default;}
.tc-status {color:#a34521;font-size:12px;min-height:18px;margin-top:5px;}
.tc-media {position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;background:#000d;padding:60px 16px;}
.tc-media .tc-close {position:absolute;top:calc(12px + env(safe-area-inset-top));right:16px;background:#fff;color:#18233a;border-radius:12px;}
.tc-media-body {display:flex;max-width:100%;max-height:100%;justify-content:center;}
.tc-media img,.tc-media video {max-width:100%;max-height:calc(100dvh - 130px);object-fit:contain;}
.tc-hud-action:focus-visible,.tc-close:focus-visible,.tc-actions button:focus-visible,.tc-preview-hide:focus-visible {outline:3px solid #7eaaff;outline-offset:2px;}
@media(max-width:600px){.tc-panel{right:8px;top:calc(64px + env(safe-area-inset-top));bottom:calc(94px + env(safe-area-inset-bottom));width:calc(100vw - 16px);}.th-hud-right{gap:6px;}.tc-hud-action{padding:0 8px;font-size:12px;}}

.tc-compose .sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
/* The remote wrapper stays attached so switching never rebuilds video playback. */
.tc-remote-box {position:absolute;inset:0;z-index:0;overflow:hidden;}
.tc-remote-box > .tc-preview-hide {display:none;}
.th-stage.swapped .tc-remote-box {inset:auto 20px calc(108px + env(safe-area-inset-bottom)) auto;width:200px;aspect-ratio:4/3;border-radius:14px;border:1px solid #ffffff24;box-shadow:0 12px 32px -12px #000b;background:#1a1f26;z-index:3;touch-action:none;user-select:none;cursor:pointer;}
.th-stage.swapped .tc-remote-box > .th-remote {inset:0;width:100%;height:100%;border:0;border-radius:0;box-shadow:none;}
.th-stage.swapped .tc-remote-box > .tc-preview-hide {display:block;}
.th-stage.swapped .th-self > .tc-preview-hide {display:none;}
.tc-remote-box.preview-hidden {display:none!important;}
.tc-remote-box.dragging {outline:2px solid #8ab4ff;cursor:grabbing;}
.th-local,.th-tile.self .th-tile-video {transform:none!important;}
@media(max-width:600px){.th-stage.swapped .tc-remote-box{width:124px;right:12px;bottom:calc(96px + env(safe-area-inset-bottom));}}

/* iOS：输入框 16px，避免聚焦时整页被放大、把发送按钮顶出屏幕 */
@supports (-webkit-touch-callout: none) {
  .tc-compose textarea,
  .tc-panel input,
  .tc-panel textarea { font-size: 16px; }
}
