﻿/* 樹狀目錄標題 */
.tree-title {
    font-weight: bold;
    font-size: 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 10px;
}

/* 設定每個節點樣式*/
#tree .jstree-anchor,
#tree .jstree-node {
    margin-top: 5px !important;
}

    /*隱藏展開/收合按鈕：*/
    #tree .jstree-node > .jstree-ocl {
        display: none !important;
    }

    /* 變更 hover 時的背景顏色 */
    #tree .jstree-anchor:hover {
        background-color: (--accessibility-color) !important;
    }

/* 變更被選取節點 */
#tree .jstree-clicked {
    font-weight: 800;
}

/* 第一層（根節點） */
#tree .level-1 > a {
    font-weight: bold;
    color: #333;
    padding: 8px 16px; /* 上下左右內距 */
    display: inline-block;
    line-height: 1;
    height: 100%;
    text-align: center;
    white-space: nowrap; /* 不自動換行 */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis; /* 過長時加上 ... */
}

    #tree .level-1 > a > span {
        color: #2e5784;
        background-color: #fff;
    }

/* 第二層 */
#tree .level-2 > a {
    font-weight: bold;
    color: #333;
    padding: 8px 16px; /* 上下左右內距 */
    display: inline-block;
    line-height: 1;
    height: 100%;
    text-align: center;
    white-space: nowrap; /* 不自動換行 */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis; /* 過長時加上 ... */
}

/* 第三層 */
#tree .level-3 > a {
    font-weight: bold;
    color: #9d8367;
}


/* 修改 wholerow 選取顏色 */
#tree .jstree-wholerow {
    background: none !important; /* 取消整行背景 */
}

/*數量 */
#tree .badge {
    background-color: #6c757d !important;
    color: #fff !important;
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
    margin-left: 6px;
}

#tree li.level-1 > .jstree-anchor > .jstree-checkbox {
    display: none !important;
}

#tree li.level-2 > .jstree-anchor > .jstree-checkbox {
    display: none !important;
}

#tree li.level-3 > .jstree-anchor > .jstree-checkbox {
    display: none !important;
}
#tree .jstree-anchor > .jstree-checkbox {
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    visibility: hidden;
}


/* 封面圖片滿版樣式 */
.img-size {
    object-fit: cover;
    object-position: center;
    overflow: hidden;
    max-height: 300px;
    max-width: 400px;
    min-height: 300px;
}

/* 圖片容器樣式 */
.img-container {
    width: 100%;
    overflow: hidden;
}