/**
 * behavior-status-config.css — 标准行为状态配置页（特有样式）
 * 表格样式复用 browse.css，此文件仅定义页面特有元素
 */

/* 层颜色变量 */
:root {
    --layer-l1: var(--accent-primary);
    --layer-l2: #ff9900;
    --layer-l3: #8957e5;
    --layer-l4: #00b5ad;
}

/* 提示框 */
.behavior-hint {
    margin-bottom: 16px;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.behavior-hint p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Tabs 样式 - Bootstrap 5 */
#layer-tabs {
    border-bottom: none;
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

#layer-tabs .nav-item {
    margin-bottom: 0;
    margin-right: 0;
}

#layer-tabs .nav-link {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    transition: all 0.2s;
    margin-right: 2px;
}

#layer-tabs .nav-link:hover {
    background: rgba(0, 135, 247, 0.05);
    color: var(--accent-primary);
    border-color: transparent;
}

#layer-tabs .nav-link.active {
    color: var(--accent-primary);
    font-weight: 600;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--bg-primary);
    margin-bottom: -1px;
    margin-right: 0;
}

/* Tab 颜色圆点 */
.tab-color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* Tab badge */
.badge-tab {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: normal;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    min-width: 18px;
    text-align: center;
}

.badge-tab.has-checked {
    background: var(--accent-primary);
    color: #fff;
}

/* Tab 面板 */
.tab-content {
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0;
    background: var(--bg-secondary);
}

.tab-pane { padding: 0; }

/* 层信息条 - 隐藏 */
.tab-layer-info { display: none; }

/* 行状态 */
.behavior-row-disabled { opacity: 0.5; }

/* 代号列 */
.behavior-code {
    color: var(--accent-primary);
    font-size: 14px;
}

/* 类型列 */
.behavior-type {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 可排序列头 */
.sortable-col {
    cursor: pointer;
    user-select: none;
}

.sortable-col:hover { background: var(--bg-secondary) !important; }

.sort-icon::after {
    content: '\2195';
    color: var(--text-secondary);
    margin-left: 3px;
    font-size: 13px;
}

.sort-asc .sort-icon::after {
    content: '\2191';
    color: var(--accent-primary);
}

.sort-desc .sort-icon::after {
    content: '\2193';
    color: var(--accent-primary);
}

/* 状态标签（可点击） */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    min-width: 48px;
    text-align: center;
    transition: opacity 0.15s;
}

.status-badge:hover { opacity: 0.75; }

.status-enabled {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.status-notcreated {
    background: #fff3e0;
    color: #e65100;
}

/* 配置状态图标 */
.cfg-icon {
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s;
    text-decoration: none;
}

.cfg-icon:hover { transform: scale(1.3); }
.cfg-icon.on { color: var(--accent-primary); }
.cfg-icon.off { color: var(--text-secondary); }

/* 行为表格（stage 嵌入） */
.behavior-table { font-size: 14px; }
.behavior-table thead th {
    font-weight: normal;
    white-space: nowrap;
    padding: 10px 8px;
}

/* 行为名称链接 */
.behavior-name-link {
    text-decoration: none;
    font-weight: 600;
}
.behavior-name-link:hover { text-decoration: underline; }

/* 底部操作区 */
.behavior-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 日夜模式 */
body.dark-mode .status-enabled { background: #1b5e20; color: #a5d6a7; }
body.dark-mode .status-notcreated { background: #e65100; color: #ffcc80; }

/* 黑暗模式：表格边框调整 */
body.dark-mode .tab-content .table-bordered {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .tab-content .table-bordered th,
body.dark-mode .tab-content .table-bordered td {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .tab-content .table thead th {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}
