/**
 * @ Author: dengpan_cui
 * @ Create Time: 2023-07-13 11:19:19
 * @ Modified by: dengpan_cui
 * @ Modified time: 2023-11-22 18:43:39
 * @ Description: mail: dengpan_cui@kingdee.com
 */

/* css初始化设置 */
html {overflow-y:scroll;}

body {margin:0; padding:0; font:12px;background:#ffffff;}

div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:0; margin:0;}
div,dl,dt,dd,ul,ol,li,pre,form,fieldset,input,textarea,blockquote,p{font-size: 13px;}

table,td,tr,th{font-size:12px;}

li{list-style-type:none;}

img{vertical-align:top;border:0;}

ol,ul {list-style:none;}

h1,h2, h3,h4,h5,h6 {color:#000;font-weight:normal;}

address,cite,code,em,th {font-weight:normal; font-style:normal;}
::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 2px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 2px;
  }
  
/* ######################通用样式###################### */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-v-center {
    display: flex;
    align-items: center;
}
.padding-h-16 {
    padding: 0 16px;
}
/* ######################id选择###################### */
#list-row-df {
    display: none;
}

#list-row-icon-folder {
    display: none;
}

#opt-back {
    display: none;
    cursor: pointer;
    color: #2a71ec;
}
#opt-back::after {
    padding: 0 10px;
    color: #888;
    content: "|";
}

#opt-all {
    color:  #2a71ec;
    cursor: pointer;
}

[id^=opt-path-] {
    color: #000;
    cursor: pointer;
}

[id^=opt-path-]:hover {
    color: #1890ff;
}

[id^=opt-path-]::before {
    float: left;
    padding: 0 10px;
    color: #888;
    content: "/";
}


/* ######################结构样式###################### */
header {
    height: 80px;
    background-color: #ffffff;
    font-size: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
	box-sizing: border-box;
}

main {
    width: 90%;
    height: calc(100% - 80px);
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* ######################基本界面样式###################### */
.loading-x-wrap {
   display: flex;
   justify-content: center;
   align-items: center;
   position: fixed;
   left: 0;
   top: 0;
   width: 100vw;
   height: 100vh;
   z-index: 199;
   background-color: rgba(0, 0, 0, 0.5);
}

.content {
    background-color: #f1f2f3;
    height: 100vh;
    width: 100vw;
}

.logo {
    background-color: #2a71ec;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.user {
    height: 80px;
    background: linear-gradient(-45deg,#ffeae0 0%,#fff 15%);
    padding: 0 16px;
    border-radius: 3px;
    position: relative;
}

.user > .logo {
    background-color: #EBEBEB;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-info {
    padding: 5px 0;
    color: #888;
}

.user-info h5 {
    font-weight: bolder;
    margin-bottom: 5px;
}

.user-r {
    position: absolute;
    right: 32px;
    color: #f25525;
    font-size: 16px;
}

.operation {
    height: 64px;
    background-color: #FFF;
    padding: 0 16px;
    border-radius: 3px;
    margin: 16px 0;
}

.list {
    flex: 1;
    background-color: #FFF;
    border-radius: 3px;
    padding: 16px;
    overflow: auto;
}

.list-header {
    background-color: #f1f2f3;
    height: 40px;
    border-radius: 3px;
    padding: 0 20px;
    color: #888;
    box-sizing: border-box;
}

.list-body {
    height: calc(100% - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    color: #585858
}

.list-row {
    height: 50px;
    width: 100%;
    border-radius: 3px;
    padding: 0 20px;
    border: 1px solid rgba(216, 216, 216, 0.5);
    margin-top: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    animation: fadeSlideIn 0.25s ease both;
}

.list-row:hover {
    border-color: #2a71ec;
    background-color: #f5f9ff;
    transform: translateX(2px);
}

.list-row-icon {
    height: 20px;
    width: 20px;
    margin-right: 5px;
}


.list-row-icon-box {
    width: 60px;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end;
}

.list-row-icon-download {
    height: 100%;
    cursor: pointer;
}

.list-row-icon-download svg {
    height: 20px;
    width: 20px;
    transform: scale(1);
}

.list-row-icon-copy {
    height: 100%;
    margin-right: 10px;
    cursor: pointer;
}

.list-row-icon-copy svg {
    height: 20px;
    width: 20px;
    transform: scale(1);
}

.list-row-item {
    width: calc((100% - 400px) / 2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-row-item-short {
    width: 170px;
}
.recommended::after {
    content: "推荐";
    color: white;
    background-color: red;
    padding: 1px 2px;
    font-size: 8px;
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    border-radius: 1px;
}

.user-info a img {
  height: 20px;
  width: 20px;
  margin-right: 3px;
}

.user-info div{
	margin-top: 3px;
}

/* ######################动画效果###################### */

/* 列表项入场动画 */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 下载/复制按钮 hover 缩放 */
.list-row-icon-download:hover svg,
.list-row-icon-copy:hover svg {
    transform: scale(1.2);
    transition: transform 0.15s ease;
}

/* 面包屑路径项过渡 */
[id^=opt-path-] {
    transition: color 0.2s ease;
}

/* 返回按钮 hover */
#opt-back:hover {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* 全部文件 hover */
#opt-all {
    transition: opacity 0.2s ease;
}
#opt-all:hover {
    opacity: 0.7;
}

/* 文件夹行点击反馈 */
.list-row:active {
    transform: scale(0.99);
    transition: transform 0.1s ease;
}

/* loading 旋转动画 */
.loading-x svg {
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ######################文件预览弹窗###################### */
.preview-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
}

.preview-container {
    position: relative;
    width: 70%;
    max-width: 900px;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: previewSlideIn 0.25s ease;
}

@keyframes previewSlideIn {
    from {
        transform: translateY(20px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.preview-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-close {
    font-size: 22px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.preview-close:hover {
    background: #f5f5f5;
    color: #333;
}

.preview-body {
    flex: 1;
    overflow: auto;
    padding: 16px 20px;
    min-height: 200px;
}

.preview-content {
    margin: 0;
    padding: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-break: break-all;
    tab-size: 2;
}

.preview-loading {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}

.preview-error {
    text-align: center;
    color: #f25525;
    padding: 40px 0;
    font-size: 14px;
}

/* 预览图标 - hover 时显示在文件名旁 */
.preview-hint {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}

.list-row:hover .preview-hint {
    opacity: 1;
}

.preview-hint svg {
    display: block;
}

/* 预览弹窗头部操作区 */
.preview-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.preview-open-new {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.preview-open-new:hover {
    background: #f5f5f5;
    color: #2a71ec;
}

/* iframe 预览 */
.preview-iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}
