﻿

/* 增强工具栏样式 */
.aras-toolbar {
    background: linear-gradient(to right, #2c3e50, #34495e);
    color: white;
    padding: 8px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
}

/* 工具栏按钮组 */
.toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 40px;
}

/* 工具栏按钮 */
.toolbar-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-size: 13px;
    min-width: 80px;
}

    .toolbar-btn:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .toolbar-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
    }

    .toolbar-btn i {
        font-size: 14px;
    }

/* 搜索框样式 */
.search-box {
    padding: 8px 12px 8px 35px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 250px;
    background: rgba(255,255,255,0.1) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 10px center;
    color: white;
    transition: all 0.3s;
}

    .search-box::placeholder {
        color: rgba(255,255,255,0.7);
    }

    .search-box:focus {
        outline: none;
        background-color: rgba(255,255,255,0.2);
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
    }

/* 上下文菜单 */
.context-menu {
    position: absolute;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    border-radius: 6px;
    z-index: 1000;
    display: none;
    min-width: 180px;
    overflow: hidden;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    color: #333;
}

    .context-menu-item:hover {
        background: #f0f6ff;
    }

    .context-menu-item i {
        width: 18px;
        text-align: center;
    }

/* 列选择工具栏 */
.column-toggle-row {
    background: #f8f9fa;
    padding: 10px 15px;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.column-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 加载指示器 */
#loadingIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    display: none;
    z-index: 1000;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-active {
    background: #2ecc71;
}

.status-inactive {
    background: #e74c3c;
}

/* 错误状态样式 */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

    .error-message i {
        font-size: 3em;
        margin-bottom: 15px;
    }

    .error-message button {
        margin-top: 15px;
        padding: 8px 16px;
        background: #3498db;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

/* 加载状态优化 */
.aras-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

/* 列切换面板滚动条 */
#columnToggles {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .aras-toolbar {
        padding: 8px;
        gap: 6px;
    }

    .toolbar-group {
        padding: 0 5px;
        gap: 5px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-btn {
        min-width: auto;
        padding: 6px 8px;
    }

        .toolbar-btn span {
            display: none;
        }

    .search-box {
        width: 100%;
        min-width: auto;
    }
}
/* 禁用状态的菜单项 */
.context-menu-item.disabled {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* 锁定状态指示 */
.lock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

  

/* 锁定状态指示器 */
.lock-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

    .lock-indicator.locked {
        background: #e74c3c;
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
    }

    .lock-indicator.unlocked {
        background: #2ecc71;
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
    }

/* 锁定状态行样式 */
.ag-row.locked-row {
    background: rgba(231, 76, 60, 0.05);
}

/* 上下文菜单层级 */
.context-menu {
    z-index: 9999; /* 确保在浏览器菜单之上 */
    position: fixed; /* 使用fixed定位 */
}
/* 工具栏按钮状态 */
.toolbar-btn.disabled-status {
    position: relative;
    opacity: 0.6;
}

    .toolbar-btn.disabled-status:after {
        content: "!";
        position: absolute;
        top: -6px;
        right: -6px;
        background: #e74c3c;
        color: white;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.context-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    white-space: nowrap;
}

    .context-menu-item.disabled {
        color: #ccc;
        cursor: not-allowed;
    }


/* 锁定图标样式 */
.lock-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.id-cell {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.item-id {
    margin-left: 4px;
}

/* 不同锁定状态的图标颜色 */
.lock-icon use[xlink|href="#LockedByMe"] {
    fill: #4CAF50; /* 绿色 - 被我锁定 */
}

.lock-icon use[xlink|href="#LockedByOthers"] {
    fill: #F44336; /* 红色 - 被他人锁定 */
}

.lock-icon use[xlink|href="#LockedAndModified"] {
    fill: #FFC107; /* 黄色 - 已修改但未锁定 */
}




/* ------------------------------ */
/* 上下文菜单 */
/* ------------------------------ */
[id*="context-menu"] {
    /* 统一菜单基础样式 */
    position: absolute;
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    min-width: 150px;
    border-radius: 4px;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
}

    .context-menu-item:hover {
        background-color: #f4f4f4;
    }





/* ------------------------------ */
/* 状态样式（合并重复代码） */
/* ------------------------------ */
.state-released,
[data-state="Released"] {
    background-color: lightgreen;
}

.state-preliminary,
[data-state="Preliminary"] {
    background-color: lightyellow;
}

.state-review,
[data-state="In Review"] {
    background-color: lightblue;
}

/* ------------------------------ */
/* 响应式调整（新增） */
/* ------------------------------ */
@media (max-width: 768px) {
    .desktop-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    #search-input {
        width: 150px;
    }
}

/* 工具栏样式 */


.toolbar-group {
    gap: 10px; /* 缩小间距 */
}

/* 工具栏整体 */
#main-toolbar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 10px;
    display: flex;
    gap: 10px;
}

/* 按钮基础样式 */
.toolbar-btn {
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}



/* 与ag-grid表头匹配的搜索框 */
.search-box {
    border: 1px solid #e9ecef;
    background-color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    width: 200px;
}

    .search-box:focus {
        border-color: #4a90e2; /* ag-grid默认蓝色焦点色 */
        outline: none;
    }
/* 响应式调整 */
@media (max-width: 768px) {
    .aras-toolbar {
        padding: 0 10px;
    }

    .toolbar-group {
        gap: 8px;
    }

    .toolbar-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .search-box {
        max-width: 250px;
    }
}
