/* 知识库上传弹窗样式 */
.upload_bg_wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.upload_dialog_container {
    background: #ffffff;
    border-radius: 8px;
    width: 560px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upload_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: none;
    position: relative;
    height: 56px;
}

.upload_header::after {
    content: '';
    position: absolute;
    left: 24px;
    bottom: 0;
    width: calc(100% - 48px);
    height: 1px;
    background: #EDEDED;
}

.upload_header_name {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-family: Microsoft YaHei;
    font-size: 15px;
    font-weight: bold;
    line-height: 19.8px;
    letter-spacing: 0px;
    color: #333333;
}

.close {
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: -5px;
}

.close .iconfont {
    font-size: 24px;
    color: #999;
    transition: color 0.2s;
}

.close:hover .iconfont {
    color: #666;
}

.dialog_content {
    padding: 13px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.upload_type_one,
.kb-upload-table-wrap {
    min-height: 0;
    margin-bottom: 0px;
    border-radius: 4px;
    overflow: hidden;
}

.kb-upload-table-wrap {
    max-height: calc(50vh - 220px);
    overflow-y: auto;
}

.kb-upload-table {
    width: 100%;
    table-layout: fixed;
    border: 1px solid #e8e8e8;
    border-collapse: collapse;
}

.kb-upload-table th,
.kb-upload-table td {
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    text-align: left;
}

.kb-upload-table th:nth-child(1),
.kb-upload-table td:nth-child(1) {
    width: 40%;
}

.kb-upload-table th {
    background: #ffffff;
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.kb-upload-table th:nth-child(2),
.kb-upload-table td:nth-child(2) {
    width: 15%;
}

.kb-upload-table th:nth-child(3),
.kb-upload-table td:nth-child(3) {
    width: 30%;
    min-width: 110px;
    white-space: nowrap;
}

.kb-upload-table th:nth-child(4),
.kb-upload-table td:nth-child(4) {
    width: 12%;
    min-width: 64px;
    white-space: nowrap;
}

.kb-upload-table td:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload_chose_wrap {
    margin-bottom: 20px;
}

.upload_chose_item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload_chose_item_left {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.upload_chose_item_left::before {
    content: '*';
    color: #f56c6c;
    margin-right: 4px;
}

.modal_form_select {
    flex: 0 0 340px;
    position: relative;
}

.modal_form_select input {
    width: 100%;
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.modal_form_tree_dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 文件夹组样式 */
.folder_group {
    background: transparent !important;
}

.folder_group:hover {
    background: transparent !important;
}

.folder_group:last-child {
    border-bottom: none;
}

.folder_group_title {
    display: flex;
    align-items: center;
    min-height: 30px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.folder_group_title:hover {
    background-color: rgba(10, 93, 231, 0.06);
}

.folder_group.collapsed .folder_list {
    display: none;
}

.folder_group.collapsed .folder_toggle {
    transform: rotate(-90deg);
}

.folder_toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    font-size: 12px;
    line-height: 1;
}

/* 文件夹列表样式 */
.folder_list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 10px;
}

.folder_item {
    position: relative;
}

.folder_item_content {
    display: flex;
    align-items: center;
    min-height: 30px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.folder_item_content:hover {
    background-color: rgba(10, 93, 231, 0.06) !important;
}

.folder_item_content.selected {
    background-color: rgba(10, 93, 231, 0.06);
    color: #0a5de7;
}

.child_icon {
    width: 14px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.folder_item .child_icon {
    position: static;
}

.child_icon i {
    width: 14px;
    height: 14px;
    display: block;
    background-image: url(/static/Public/images/lawFirm/projectList_25.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px 14px;
    filter: brightness(0);
}

/* 默认箭头向右 */
.child_icon i {
    transform: rotate(-90deg);
}

/* 文件夹组展开状态箭头向下 */
.folder_group .child_icon i {
    transform: rotate(0deg);
}

/* 折叠状态箭头向右 */
.folder_group.collapsed .child_icon i,
.folder_item.collapsed .child_icon i {
    transform: rotate(-90deg);
}

/* 子文件夹折叠 */
.folder_item.collapsed > .folder_sublist {
    display: none;
}

.child_icon:hover {
    opacity: 0.8;
}

/* 文件夹子列表 - 默认展开显示 */
.folder_sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 12px;
    display: block;
}

.folder_icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    display: block;
    flex-shrink: 0;
}

.folder_name {
    flex: 1;
    font-size: 14px;
    line-height: 20px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload_list_wrap {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.upload_list_top {
    /* display: grid; */
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 0px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.list_top_tit {
    font-size: 14px;
    color: #666;
}

.upload_list_bot {
    min-height: 200px;
    font-size: 14px;
}

.nodata_upload {
    padding: 40px 20px;
}

.upload_dialog_container.dragover {
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.18);
}

.nodata_upload.dragover {
    border-color: #1890ff;
    background: #f0f7ff;
}

.kb_upload_drop_area {
    text-align: center;
}

.uploadfile_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin-bottom: 12px;
}

.uploadfile_btn .iconfont {
    font-size: 16px;
}

.uploadfile_btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.kb_upload_drop_tip {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
}

.kb_upload_format_tip {
    font-size: 12px;
    color: #999;
}

.upload_btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e8e8e8;
}

.upload_btn {
    padding: 8px 32px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    background: #fff;
    height: 40px;
}

.kb_uploadFile_dia_cancel {
    color: #333;
}

.kb_uploadFile_dia_confirm {
    background: #0a5de7;
    color: #fff;
    border-color: #0a5de7;
}

.kb_uploadFile_dia_confirm:hover {
    background: #0851c9;
    border-color: #0851c9;
}

/* 新建文件夹弹窗样式 */
.new-folder-dialog {
    width: 400px;
}

.upload_header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    border-bottom: none;
    position: relative;
}

.upload_header_name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.new-folder-input-wrap {
    padding: 0 20px 20px;
}

.new-folder-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background: #f7f9fa;
    box-sizing: border-box;
}

.new-folder-input:focus {
    background: #f0f2f5;
}

.new-folder-input::placeholder {
    color: #999;
}

.new-folder-error {
    color: #f56c6c;
    font-size: 12px;
    margin-top: 8px;
}

.new-folder-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.new-folder-close:hover {
    color: #333;
}

.new-folder-btns {
    padding: 0 20px 20px;
}

.new-folder-confirm {
    width: 100%;
    height: 40px;
    background: #0a5de7;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
