/*body {
    color: #333;*/ /* Dark gray text */
    /*font-family: Arial, sans-serif;
    background-color: white;
}*/

/* Tree Container Styling */
/*#tree-container {*/
    /*width: 100%;*/ /* Full width of the column */
    /*height: 85vh;*/ /* Limit height */
    /*overflow: auto;*/ /* Scrollable if content overflows */
    /*padding-right: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: sticky;
    top: 0;
}*/

    /* Base List Styling */
    /*#tree-container ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        min-width:max-content;
    }*/

    /* List Item Styling */
    /*#tree-container li {
        position: relative;
        margin: 2px 0;
        padding-left: 10px;
        min-width: max-content;
    }*/

    /* Span (Node) Styling */
    /*#tree-container span {
        display: inline-block;
        padding: 2px 4px;
        margin: 1px 0;
        border: 1px solid transparent;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        white-space:nowrap
    }

        #tree-container span:hover {
            background-color: #f0f0f0;
            border-color: #d0d0d0;
        }*/

    /* Child Node Styling */
    /*#tree-container .child-node {
        position: relative;
        margin-left: 2px;*/ /* Indent child nodes */
        /*display: none;*/ /* Initially hidden */
        /*border-left: 2px dotted #c0c0c0;*/ /* Dotted connection line */
        /*padding-left: 5px;*/ /* Space for the dotted line */
        /*font-size: 0.7rem;
        white-space: nowrap;
        min-width:max-content;
    }

        #tree-container .child-node li {
            margin: 0px;
        }*/


        /* Show child nodes when parent is expanded */
        /*#tree-container .child-node:not(.collapsed) {
            display: block;
        }

#searchDiv {
    position: relative;
}

#searchBar {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

#clearBtn {
    position: absolute;
    top: 50%;
    right: 1%;
    transform: translateY(-50%);
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #999;
}

    #clearBtn:hover {
        color: red;
    }*/




/* Transition for expanding/collapsing */
/*#tree-container ul {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}*/

/* Responsive Adjustments */
/*@media (max-width: 768px) {
    #tree-container {
        max-height: 60vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}*/




/*------------------------------------------------------------------------------------------------------------------------------------------------*/


body {
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: white;
}

/* Tree Container Styling */
#tree-container {
    height: 85vh;
    overflow: auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: sticky;
    top: 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

    /* Custom Scrollbar */
    #tree-container::-webkit-scrollbar {
        width: 8px;
    }

    #tree-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    #tree-container::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 10px;
        transition: background 0.3s ease;
    }

        #tree-container::-webkit-scrollbar-thumb:hover {
            background: #a0aec0;
        }

    /* Base List Styling */
    #tree-container ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        min-width: max-content;
    }

    /* List Item Styling */
    #tree-container li {
        position: relative;
        margin: 1px 0;
        padding-left: 12px;
        min-width: max-content;
    }

    /* Span (Node) Styling */
    #tree-container span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px;
        margin: 1px 0;
        border: 1px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
        color: #4a5568;
        font-weight: 500;
        position: relative;
        overflow: hidden;
    }

        /* Hover effect with smooth color transition */
        #tree-container span:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: transparent;
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
        }

        /* Icon styling */
        #tree-container span i {
            font-size: 1rem;
            transition: transform 0.25s ease;
        }

        #tree-container span:hover i {
            transform: scale(1.15);
        }

        /* PDF file specific styling */
        #tree-container span[style*="italic"] {
            font-style: normal !important;
            color: #e53e3e;
            font-size: 0.8rem;
            padding: 5px 10px;
        }

            #tree-container span[style*="italic"]:hover {
                background: linear-gradient(135deg, #fc5c7d 0%, #6a82fb 100%);
                color: white;
            }

        /* Selected node styling */
        #tree-container span[style*="rgb(211, 211, 211)"] {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white !important;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            border-color: transparent !important;
        }

    /* Child Node Styling */
    #tree-container .child-node {
        position: relative;
        margin-left: 8px;
        display: none;
        border-left: 2px solid #e2e8f0;
        padding-left: 12px;
        font-size: 0.85rem;
        white-space: nowrap;
        min-width: max-content;
        animation: slideDown 0.3s ease-out;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#tree-container .child-node li {
    margin: 1px 0;
}

/* Show child nodes when parent is expanded */
#tree-container .child-node:not(.collapsed) {
    display: block;
}

/* Connector dots for visual hierarchy */
#tree-container .child-node::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e2e8f0 0%, transparent 100%);
}

/* Search Section Styling */
#searchDiv {
    position: relative;
    margin-bottom: 15px;
}

#searchBar {
    width: 100%;
    padding: 12px 45px 12px 15px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #2d3748;
    font-weight: 500;
}

    #searchBar:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        background-color: #ffffff;
    }

    #searchBar::placeholder {
        color: #a0aec0;
        font-weight: 400;
    }

#clearBtn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #a0aec0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: 600;
}

    #clearBtn:hover {
        background-color: #fed7d7;
        color: #e53e3e;
        transform: translateY(-50%) scale(1.1);
    }

/* No results message styling */
#tree-view-content > div {
    padding: 20px;
    text-align: center;
    color: #718096;
    font-style: italic;
    background-color: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
    margin-top: 10px;
}

/* Transition for expanding/collapsing */
#tree-container ul {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

/* Folder icon rotation on expand */
#tree-container span:hover .fa-folder {
    animation: folderBounce 0.5s ease;
}

@keyframes folderBounce {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* PDF icon animation on hover */
#tree-container span:hover .fa-file-pdf {
    animation: pdfPulse 0.6s ease;
}

@keyframes pdfPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15) rotate(-5deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #tree-container {
        max-height: 60vh;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px;
    }

        #tree-container span {
            padding: 6px 10px;
            font-size: 0.85rem;
        }

    #searchBar {
        padding: 10px 40px 10px 12px;
        font-size: 14px;
    }

    #mobile-tree-close {
        top: 40px !important; /* move it up, away from the search bar */
        right: 12px;
        z-index: 40;
    }
}