/* 公共样式 - Element UI 浅色主题 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    color: #303133;
    background-color: #f5f7fa;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 输入控件恢复文本选择能力 */
input, textarea, [contenteditable] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Element UI 浅色主题变量 */
:root {
    --el-color-primary: #409eff;
    --el-color-success: #67c23a;
    --el-color-warning: #e6a23c;
    --el-color-danger: #f56c6c;
    --el-color-info: #909399;
    --el-text-color-primary: #303133;
    --el-text-color-regular: #606266;
    --el-text-color-secondary: #909399;
    --el-border-color: #dcdfe6;
    --el-border-color-light: #e4e7ed;
    --el-bg-color: #ffffff;
    --el-bg-color-page: #f5f7fa;
}

/* 全局消息提示 — 宽度自适应文字，内容居中 */
.el-message {
    min-width: auto;
    width: auto;
    padding: 10px 20px;
}

.el-message .el-message__content {
    text-align: center;
}

/* ==================== 对话框全局适配 ==================== */
/* 包裹层弹性居中，阻止页面滚动条 */
.el-dialog__wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 对话框本体 — 最大高度 90vh，弹性列布局 */
.el-dialog {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
}

/* 标题 / 底部按钮固定 */
.el-dialog__header,
.el-dialog__footer {
    flex-shrink: 0;
}

/* 正文区域 — 自动填充剩余空间，内容过长时内部滚动 */
.el-dialog__body {
    flex: 1;
    overflow-y: auto;
}

/* ==================== 全局右击菜单 ==================== */
.global-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    min-width: 140px;
    padding: 4px 0;
}

.global-context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #606266;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.global-context-menu-item:hover {
    background: #f5f7fa;
    color: #409eff;
}

.global-context-menu-item i {
    font-size: 14px;
    width: 14px;
    text-align: center;
}
