/* ==========================================
   Layout
========================================== */

.docs-wrapper{
    display:flex;
    height:calc(100vh - 120px);   /* adjust 120px to your header height */
    overflow:hidden;
}

.docs-sidebar{

    width:380px;

    background:#ffffff;

    border-right:1px solid #d9d9d9;

    overflow-y:auto;

    overflow-x:hidden;

    flex-shrink:0;

}

.docs-content{

    flex:1;

    display:flex;

    flex-direction:column;

    overflow:hidden;

    min-height:0;

}

#doc-frame{

    width:100%;

    height:100%;

    border:0;

}


/* ==========================================
   Search
========================================== */

.docs-search{

    position:sticky;

    top:0;

    background:#ffffff;

    padding:15px;

    border-bottom:1px solid #e5e5e5;

    z-index:20;

}

.docs-search input{

    width:100%;

    padding:10px 14px;

    border:1px solid #d0d0d0;

    border-radius:6px;

    outline:none;

    font-size:14px;

}

.docs-search input:focus{

    border-color:#2b73d6;

}


/* ==========================================
   Tree
========================================== */

#docTree{

    padding:10px;

}

#docTree ul{

    list-style:none;

    margin:0;

    padding-left:18px;

}

.tree-folder{

    margin:2px 0;

}

.folder-header{

    display:flex;

    align-items:center;

    gap:6px;

    cursor:pointer;

    padding:6px 8px;

    border-radius:5px;

    user-select:none;

}

.folder-header:hover{

    background:#eef4ff;

}

.folder-arrow{

    width:14px;

    color:#777;

    font-size:11px;

    text-align:center;

}

.folder-icon{

    font-size:15px;

}

.folder-name{

    font-size:14px;

    font-weight:600;

    color:#333;

}

.folder-body{

    display:none;

}

.folder-body.open{

    display:block;

}


/* ==========================================
   Documents
========================================== */

.tree-file{

    margin:2px 0;

}

.tree-file a{

    display:flex;

    align-items:center;

    gap:8px;

    padding:5px 8px 5px 32px;

    text-decoration:none;

    font-size:13px;

    color:#555;

    border-radius:4px;

}

.tree-file a:hover{

    background:#eef4ff;

    color:#1565c0;

}

.tree-file a.active{

    background:#2563eb;
    color:white;

    font-weight:600;

}

.file-icon{

    font-size:14px;

}


/* ==========================================
   Scrollbar
========================================== */

.docs-sidebar::-webkit-scrollbar{

    width:8px;

}

.docs-sidebar::-webkit-scrollbar-thumb{

    background:#cfcfcf;

    border-radius:20px;

}

.docs-sidebar::-webkit-scrollbar-track{

    background:#fafafa;

}


/* ==========================================
   Error
========================================== */

.doc-error{

    padding:40px;

    font-size:18px;

    color:#999;

}


/* ==========================================
   Responsive
========================================== */

@media(max-width:992px){

.docs-wrapper{

    flex-direction:column;

}

.docs-sidebar{

    width:100%;

    height:350px;

    border-right:none;

    border-bottom:1px solid #ddd;

}

.docs-content{

    flex:1;

    display:flex;

    flex-direction:column;

    overflow:hidden;

    background:#fff;

}

}

/* ================================= */

.doc-breadcrumb{

    padding:15px 25px;

    background:white;

    border-bottom:1px solid #ddd;

    font-size:14px;

    color:#666;

    flex-shrink:0;

}

/* ================================= */

.iframe-wrapper{

    flex:1;

    min-height:0;

    overflow:hidden;

}

#doc-frame{

    width:100%;

    height:100%;

    display:block;

    border:none;

}

/* ================================= */

.folder-header{

    transition:.2s;

}

.folder-header:hover{

    background:#edf4ff;

}

/* ================================= */

.tree-file{

    position:relative;

}

/* .tree-file::before{

    content:"";

    position:absolute;

    left:13px;

    top:-5px;

    bottom:-5px;

    border-left:1px solid #ddd;

} */

.tree-file a{

    position:relative;

}

/* .tree-file a::before{

    content:"";

    position:absolute;

    width:12px;

    border-top:1px solid #ddd;

    left:-10px;

    top:14px;

} */

/* ================================= */

.tree-folder{

    position:relative;

}

.tree-folder::before{

    content:"";

    position:absolute;

    left:12px;

    top:22px;

    bottom:0;

    border-left:1px solid #ddd;

}

/* ================================= */

.folder-body{

    margin-left:18px;

}

.doc-navigation{

    display:flex;

    justify-content:space-between;

    padding:12px 25px;

    border-top:1px solid #ddd;

    background:#fff;

    flex-shrink:0;

}

.doc-navigation button{

    padding:8px 18px;

    border:none;

    background:#2563eb;

    color:#fff;

    border-radius:5px;

    cursor:pointer;

}

.doc-navigation button:hover{

    background:#1d4ed8;

}