!
 * Copyright 2025 The nadcdb Authors
 */

.button-container {
  display: flex;
  flex-wrap: wrap; /* 允许换行 */
  gap: 8px; /* 按钮间距 */
}

button {
    padding: 5px 10px;
    font-size: 14px;
    border: none;
    background-color: #6e0000;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    height: 30px;
}

button:hover {
    background-color: #ffa319;
}

.nadc-button, .type-button{
  /* 按钮基本样式 */
  padding: 8px 12px;
  white-space: nowrap; /* 防止文字换行 */
  /* 弹性布局设置 */
  flex: 1 0 auto; /* 允许伸缩但不缩小 */
  min-width: min-content; /* 最小宽度为内容最小宽度 */
  /* 可选样式 */
  border: 1px solid #ccc;
  background: #f5f5f5;
  border-radius: 4px;
  text-align: center;
}

.nadc-button, .type-button{
    background-color: #6e0000;
    color: white;
    cursor: pointer;
}
.nadc-button:hover, .type-button:hover {
    background-color: #ffa319;
    color: #fff;
}
.nadc-button.active, .type-button.active {
    background-color: #ffa319;
    color: #fff;
}

/*无效*/
/*.build-button.active {
    background-color: #ffa319;
    color: #fff;
}*/

#sidebar {
    width: 20%;
    min-width:150px;
    background-color: #faf9f4;
    padding: 10px 10px 10px 0;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
    overflow-y: auto;
    position: absolute;
}

/*左侧按钮的样式*/
#sidebar select, #sidebar button {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
/*    width: 100%;*/
}

/* 弹出中间部分按钮的样式 */
#toggle-panel-button {
    top: 0;
    background-color: lightgrey;
    color: #34495E;
    border: none;
    right:80%;
    width: 15px;
    height: 100%;
    cursor: pointer;
    font-size: 30px;
    font-weight: bold;
    display: flex;
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3); /* 添加阴影 */
    z-index: 40; /* 确保按钮在面板上方 */
    position: absolute;
}

#toggle-panel-button:hover {
    background-color: #ffa319;
}

#ART_condition_dnadc {
    display: flex;
    align-items: center;
    gap: 10px; /* ART 和子元素之间的间距 */
}

#ART_condition_dnadc label {
    margin-right: 5px;
    font-size: 14px;
    cursor: pointer; /* 鼠标变为手型 */
}

#dnadc-filters, #rnadc-filters {
    display: none;
/*            flex-wrap: wrap; /* 自动换行（如果宽度不足） */*/
    gap: 1px; /* 设置子元素之间的间距 */
    align-items: center; /* 子元素垂直居中 */
    justify-content: flex-start; /* 子元素水平分布 */
}

/*左侧细胞定位表格的样式*/
#subcellularTableContainer, #miRFamilyTableContainer {
    width: 100%;
    max-height: 180px; /* 设置固定高度 */
    overflow-y: auto;  /* 启用垂直滚动条 */
    border: 1px solid #ddd; /* 添加边框 */
    margin: 5px 2px 5px 0px;
    padding: 0px;
    font-size: 14px;
    display: block;
    box-sizing: border-box;
}

#geneFamilyTableContainer{
    width: 100%;
    max-height: 180px; /* 设置固定高度 */
    overflow-y: auto;  /* 启用垂直滚动条 */
    border: 1px solid #ddd; /* 添加边框 */
    margin-top: 5px 2px 5px 0px;
    padding: 0px;
    font-size: 14px;
    display: none;
    box-sizing: border-box;
}

#subcellularTableContainer table, #miRFamilyTableContainer table, #geneFamilyTableContainer table {
    width: 100%;
}

#subcellularTableContainer th, #miRFamilyTableContainer th, #geneFamilyTableContainer th {
    position: sticky;  /* 固定表头 */
    top: 0px;            /* 表头固定在顶部 */
    background-color: #f8f8f8; /* 设置背景色，防止表头与内容重叠时背景透明 */
    z-index: 1;        /* 确保表头位于表格内容之上 */
}

#subcellularTableContainer th:first-child, #subcellularTableContainer td:first-child, #miRFamilyTableContainer th:first-child, #miRFamilyTableContainer td:first-child, #geneFamilyTableContainer th:first-child, #geneFamilyTableContainer td:first-child {
    width: 75%; /* 第一列占80% */
}

/* 第二列占20% */
#subcellularTableContainer th:last-child, #subcellularTableContainer td:last-child, #miRFamilyTableContainer th:last-child, #miRFamilyTableContainer td:last-child, #geneFamilyTableContainer th:last-child, #geneFamilyTableContainer td:last-child {
    width: 25%; /* 第二列占20% */
}

#filter2Button{
    font-size: 16px !important;
    font-weight: bold;
    background-color: #6e0000;
    color: white;
    width: 100%;
    border: none;
    overflow: hidden; /* 隐藏溢出的文字 */
}

#filter2Button:hover{
    background-color:  #ffa319;
}

/* 弹出 Target 表格的新栏 */
#target-panel {
    width: 80%;
    height: 100%;
    background-color: #faf9f4;
    border-left: 1px solid #ddd;
    position: absolute; /* 基于 #sidebar 的定位 */
    left: 20%;/* 确保从左侧栏右侧弹出 */
    top: 0;
    display: none; /* 初始状态不可见 */
    transition: transform 0.3s ease; /* 平滑动画 */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    box-sizing: border-box;
    z-index: 10; /* 确保面板在其他元素之上 */
    padding-top: 10px;
}

/*表格的格式设置*/
#target-panel.open {
    display: flex;
}

#loading-placeholder p {
    font-size: 14px;
    color: #555;
    font-weight: bold;
}

#loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    background-color: #faf9f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

#target-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: fixed;
    max-height: 85vh;
    font-size: 14px;
    display: none;
}

#target-table th, #target-table td {
    padding: 5px;
    border: 1px solid #ddd;
    text-align: center;
    overflow: hidden; /* 防止内容溢出 */
}

#target-table th {
    background-color: #faf9f4;
    text-align: center;
}

#target-table thead {
    display: table; /* 保持表头样式 */
    width: 100%; /* 确保宽度一致 */
    table-layout: fixed; /* 固定列宽 */
}
#target-table tbody {
    display: block;
    height: calc(85vh - 8vh); /* 限制表格高度 */
    overflow-y: auto;
    width: 100%; /* 确保宽度一致 */
    table-layout: fixed; /* 固定列宽 */
}

#target-table tbody tr {
    display: table; /* 保持行样式 */
    width: 100%;
    table-layout: fixed; /* 防止列宽不一致 */
}

#target-table-footer{
/*    padding: 10px;*/
    font-weight: bold;
    text-align: left; /* 右对齐统计信息 */
    background-color: #faf9f4; /* 增加浅色背景 */
    border-top: 1px solid #ddd;
    font-size: 14px;
}

#target-table_TF-target {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: fixed;
    max-height: 85vh;
    font-size: 14px;
    display: none;
}

#target-table_TF-target th, #target-table_TF-target td {
    width: 50%;
    padding: 5px;
    border: 1px solid #ddd;
    text-align: center;
    overflow: hidden; /* 防止内容溢出 */
}

#target-table_TF-target thead {
    display: table; /* 保持表头样式 */
    width: 100%; /* 确保宽度一致 */
    table-layout: fixed; /* 固定列宽 */
}

#target-table_TF-target tbody {
    display: block;
    height: calc(85vh - 8vh); /* 限制表格高度 */
    overflow-y: auto;
    width: 100%; /* 确保宽度一致 */
    table-layout: fixed; /* 固定列宽 */
}

#target-table_TF-target tbody tr {
    display: table; /* 保持行样式 */
    width: 100%;
    table-layout: fixed; /* 防止列宽不一致 */
}

#target-table-footer_TF-target{
/*    padding: 15px;*/
    font-weight: bold;
    text-align: left; /* 右对齐统计信息 */
    background-color: #faf9f4; /* 增加浅色背景 */
    border-top: 1px solid #ddd;
    font-size: 14px;
}

/* 右侧区域：网络图 */
/*新增*/
/*#netResult {
    width: 80%;
    right: 0;
    top: 0;
    background-color: #faf9f4;
    padding: 10px;
    box-sizing: border-box;
    position: absolute;
}*/

#network-container {
    width: 80%;
    height: 80%;
    background-color: #faf9f4;
    right: 0;
    top: 0;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transition: width 0.3s ease;
    position: absolute;
}

#network-actions {
    position: absolute;
    width: 80%;
    height: 20%;
    right: 0;
    bottom: 0;
    display: flex; /* 水平排列搜索框和下载按钮 */
    flex-direction:row; /* 如果需要垂直排列，改为 column */
    gap: 10px; /* 控件之间的间距 */
    padding: 10px;
    border-top: 1px solid #ddd; /* 上边框 */
    background-color: #faf9f4; /* 背景色 */
    box-sizing: border-box;
    text-align: center; /* 居中对齐 */
}

#tool-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px ;
}

#tool-container > div {
    display: inline-block; /* 让这个子容器里的内容水平排列 */
/*    flex-direction: row; /* 水平排列搜索框和按钮 */*/
    gap: 10px; /* 给输入框和按钮之间添加一些间距 */
    position: relative;
}

/* 图例容器样式 */
#legend-container {
    user-select: none; /*禁止用户选中文本*/
    width: 50%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background-color: #faf9f4;
/*    border: 1px solid #ddd;*/
/*    border-radius: 5px;*/
    font-size: 14px;
    box-sizing: border-box;
}

#legend-columns {
    display: flex;
    gap: 30px; /* 两列之间的间距 */
}

.legend-column {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 每个图例之间的间距 */
}

#legend-columns-TFtarget {
    display: none;
    gap: 30px; /* 两列之间的间距 */
}

.legend-column .legend-item span,
.legend-column .legend-item img {
    cursor: pointer;
}

/* 单个图例项样式 */
.legend-item {
    display: flex; /* 水平排列圆形和文字 */
/*    display: inline-flex;*/
    align-items: center; /* 垂直居中 */
    gap: 10px; /* 圆形和文字之间的间距 */
    font-size: 14px;
/*    white-space: nowrap;*/
}

.legend-item img {
    margin-right: 10px;
}

.legend-item img:hover {
    cursor: pointer;
}

.legend-line {
    width: 30px;
    height: 0;
    border-top: 3px solid;
    display: inline-block;
}

/* 图例中的文字样式 */
.legend-label {
    font-size: 14px; /* 文字大小 */
    color: black; /* 文字颜色 */
    font-weight: bold;
/*    white-space: nowrap; */
}

/* 图例中的圆形样式 */
.legend-circle {
    width: 15px; /* 圆形宽度 */
    height: 15px; /* 圆形高度 */
    border-radius: 50%; /* 圆形形状 */
    background-color: #ccc; /* 默认颜色（可以被覆盖） */
    flex-shrink: 0; /* 防止缩放 */
/*    display: inline-flex;*/
}
/*查看之前版本的style内容是什么*/

input[type="text"] {
/*    padding: 5px;*/
/*    font-size: 14px;*/
    border: 1px solid #ccc;
    border-radius: 4px;
/*    height: 20px;*/
/*    width: 250px;*/
}

/* 下拉菜单样式 */
select{
    width: 68px !important; /* 设置宽度 */
    padding: 5px;
    font-size: 14px !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}

#condition-container {
    /*display: flex;
    flex-wrap: wrap; /* 自动换行（如果宽度不足） */*/
    gap: 1px; /* 设置子元素之间的间距 */
    align-items: center; /* 子元素垂直居中 */
    justify-content: flex-start; /* 水平左对齐 */
}

/*input框的删除符号*/
/*.close-btn {
  position: absolute;
  text-align: right;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
  display: none; 
}
 
.close-btn:hover {
  color: #000;
}*/

