/* app/styles/pages/rule-groups_index.css */
/* 使用命名空间限制样式作用范围，避免覆盖全局样式 */
.rule-groups-page a.badge.bg-primary.text-white {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.rule-groups-page a.badge.bg-primary.text-white:hover {
  color: white;
  opacity: 0.9;
  text-decoration: underline;
}

/* 修改分组名称链接颜色为绿色 */
.rule-groups-page .tree-table a.text-primary {
  color: #00684a;
  text-decoration: none;
}

.rule-groups-page .tree-table a.text-primary:hover {
  text-decoration: underline;
  color: #005a3f;
}

/* 分组名称链接样式 */
.rule-groups-page .group-name-link {
  color: #00684a;
  text-decoration: none;
  transition: all 0.2s;
}

.rule-groups-page .group-name-link:hover {
  text-decoration: underline;
  color: #005a3f;
}

/* 展开/收起图标颜色 */
.rule-groups-page .expand-icon i {
  color: #00684a;
}

/* 树形结构样式 */
.rule-groups-page .tree-table .group-row {
    transition: all 0.2s;
    font-weight: 400; /* 减少文字粗细度 */
  }
  
  .rule-groups-page .tree-table .group-row:hover {
    background-color: rgba(0, 104, 74, 0.05);
  }
  
  .rule-groups-page .tree-table .parent-row {
    background-color: #f9f9f9;
    font-weight: 400; /* 减少文字粗细度 */
  }
  
  .rule-groups-page .tree-table .child-row {
    border-left: 3px solid #f0f0f0;
  }
  
  .rule-groups-page .expand-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .rule-groups-page .expand-icon:hover {
    background-color: rgba(0, 104, 74, 0.1);
  }
  
  .rule-groups-page .group-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
  }
  
  .rule-groups-page .parent-badge {
    background-color: rgba(0, 104, 74, 0.1);
    color: var(--color-primary);
  }
  
  .rule-groups-page .child-badge {
    background-color: rgba(0, 104, 74, 0.05);
    color: var(--color-primary);
  }
  
  /* 表单样式 */
  .rule-groups-page .form-label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
  }
  
  .rule-groups-page .form-input,
  .rule-groups-page .form-select {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
  }
  
  .rule-groups-page .form-input:focus,
  .rule-groups-page .form-select:focus {
    border-color: #00684a;
    box-shadow: 0 0 0 2px rgba(0, 104, 74, 0.2);
    outline: none;
  }
  
  /* 特定链接样式 */
  .rule-groups-page .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 400; /* 减少文字粗细度 */
  }

  /* 添加badge链接的特殊悬停样式 */
  .rule-groups-page a.badge.bg-primary.text-white:hover {
    color: white;
    opacity: 0.9;
  }

  /* 仅在rule-groups页面内生效的样式 */
  .rule-groups-page .bg-primary {
    background-color: #00684a;
  }
  
  .rule-groups-page .text-white {
    color: white;
  }
  
  .rule-groups-page .text-secondary {
    color: #6c757d;
  }
  
  .rule-groups-page .text-error {
    color: #f5222d;
  }
  
  /* 文本按钮样式 */
  .rule-groups-page .ant-btn-text {
    background-color: transparent;
    border: none;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
  }
  
  .rule-groups-page .ant-btn-text.text-primary {
    color: #00684a;
  }

  .rule-groups-page .operations-cell {
    @apply flex space-x-2;
  }

  .rule-groups-page .operation-btn {
    @apply text-sm flex items-center text-[--color-primary] bg-transparent hover:underline p-2;  
  }
  
  .rule-groups-page .ant-btn-text.text-primary:hover {
    color: #00684a;
    text-decoration: underline;
  }
  
  .rule-groups-page .ant-btn-text.text-error {
    color: #f5222d;
  }
  
  .rule-groups-page .ant-btn-text.text-error:hover {
    color: #f5222d;
    text-decoration: underline;
  }
  
  @media (max-width: 768px) {
    .rule-groups-page .flex-wrap {
      flex-wrap: wrap;
    }
    
    .rule-groups-page .flex-1 {
      flex: 1 1 100%;
    }
    
    .rule-groups-page .ant-table {
      font-size: 12px;
    }
  }

  /* 搜索框样式 */
  .rule-groups-page .search-box {
    display: flex;
    align-items: center;
  }

  .rule-groups-page .search-box .form-input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .rule-groups-page .search-box .ant-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  /* 无按钮搜索框样式 */
  .rule-groups-page .search-box.form-input-only .form-input {
    border-radius: 0.25rem;
    width: 100%;
  }

  /* 表格组件样式兼容 - 确保Table组件渲染的表格保持树形结构样式 */
  .rule-groups-page .tree-table tr:nth-child(odd) {
    background-color: rgba(0, 104, 74, 0.02);
  }
  
  .rule-groups-page .tree-table tr:hover td {
    background-color: rgba(0, 104, 74, 0.05);
  }
  
  /* 确保父子关系行高一致 */
  .rule-groups-page .tree-table tr td {
    padding: 12px 16px;
    vertical-align: middle;
  }
  
  /* 父行背景色 */
  .rule-groups-page .tree-table tr:has(.parent-badge) {
    background-color: #f9f9f9;
  }
  
  /* 确保链接样式一致 */
  .rule-groups-page .tree-table a {
    /* color: inherit; */
    text-decoration: none;
  }
  
  .rule-groups-page .tree-table a:hover {
    text-decoration: underline;
  }

  /* 搜索筛选面板样式调整 */
  .rule-groups-page .filter-panel {
    padding: 16px;
  }
  
  .rule-groups-page .filter-item {
    margin-bottom: 0;
  }
  
  .rule-groups-page .filter-actions {
    margin-top: 8px;
    padding-top: 8px;
  }

