/* videomeet_app/static/css/iview_module.css
   iView 镜像模块 — 独立样式（纯界面表现） */

/* ═══════════════════════════════════════════════════════════════
   iView 面板容器
   ═══════════════════════════════════════════════════════════════ */
#iview-panel {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Microsoft YaHei', sans-serif;
    letter-spacing: 0.2px;
    /* [切换闪烁修复] 移除 opacity 过渡：切换镜像/共享空间时不做淡入淡出，
       避免面板半透明瞬间露出底层视频页面 */
}

/* ═══════════════════════════════════════════════════════════════
   画布
   ═══════════════════════════════════════════════════════════════ */
.iview-viewport canvas {
    display: block;
    image-rendering: auto;
}

/* ═══════════════════════════════════════════════════════════════
   工具栏按钮交互
   ═══════════════════════════════════════════════════════════════ */
#iview-toolbar button:hover {
    filter: brightness(1.15);
}

#iview-toolbar button:active {
    filter: brightness(0.9);
}

/* ═══════════════════════════════════════════════════════════════
   窗口标签栏（tabbar）
   ═══════════════════════════════════════════════════════════════ */
#iview-tabbar::-webkit-scrollbar {
    height: 3px;
}
#iview-tabbar::-webkit-scrollbar-thumb {
    background: #2a3045;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   选择器对话框
   ═══════════════════════════════════════════════════════════════ */
.iview-picker-overlay {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Microsoft YaHei', sans-serif;
}

.iview-picker-overlay input:focus {
    border-color: #0078d4 !important;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.iview-picker-overlay [data-s] {
    background: #1e3a1e !important;
    color: #22dd77 !important;
}

/* ═══════════════════════════════════════════════════════════════
   窗口列表滚动条
   ═══════════════════════════════════════════════════════════════ */
.iview-picker-overlay div::-webkit-scrollbar {
    width: 5px;
}
.iview-picker-overlay div::-webkit-scrollbar-thumb {
    background: #2a3045;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   窗口底部控制按钮栏
   ═══════════════════════════════════════════════════════════════ */
.iview-ctrl-bar {
    font-size: 11px;
    z-index: 5;
}

.iview-ctrl-bar .iview-ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    min-height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.iview-ctrl-bar .iview-ctrl-btn .iview-ctrl-icon {
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iview-ctrl-bar .iview-ctrl-btn .iview-ctrl-label {
    line-height: 1;
}

.iview-ctrl-bar .iview-ctrl-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.iview-ctrl-bar .iview-ctrl-btn:active {
    transform: translateY(1px);
}

.iview-ctrl-bar .iview-ctrl-btn.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.iview-ctrl-bar .iview-ctrl-btn.active:hover {
    background: var(--accent-bg-hover);
}

.iview-ctrl-bar .iview-ctrl-btn.danger {
    color: var(--red);
}

.iview-ctrl-bar .iview-ctrl-btn.danger:hover {
    background: var(--red-bg);
}

.iview-ctrl-bar .iview-ctrl-btn.danger.active {
    color: #fff;
    background: var(--red);
}

/* ═══════════════════════════════════════════════════════════════
   缩放拖拽手柄
   ═══════════════════════════════════════════════════════════════ */
#iview-panel [class*="cursor-"]:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ═══════════════════════════════════════════════════════════════
   远程输入激活态画布发光
   ═══════════════════════════════════════════════════════════════ */
.iview-remote-active {
    outline: 2px solid #22dd77 !important;
    outline-offset: -2px;
    box-shadow: 0 0 14px rgba(34, 221, 119, 0.45);
}

/* ═══════════════════════════════════════════════════════════════
   镜像视窗：8方向缩放 + 拖拽平移
   ═══════════════════════════════════════════════════════════════ */
.iview-viewport {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: #111318;
    border: 1px solid #2a3045;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.iview-canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.iview-resize-handle {
    position: absolute;
    z-index: 30;
    background: transparent;
    transition: background 0.1s;
}

.iview-resize-handle:hover {
    background: rgba(0, 120, 212, 0.25);
}
