.header-div {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1100;
}

.main-div {
    padding-top: 90px;
}

/* styling for the right side div */
body {
    color: #333;
    font-family: Arial, sans-serif;
    background-color: white;
}

#main-content{
    margin:0 auto;
}

#docExplorerHome {
    margin: 5vh 10vw;
}

    #docExplorerHome p {
        margin-top: 2vh;
        text-align: justify;
        color: black;
        font-size: 1.2rem;
    }

    #docExplorerHome h1 {
        color: black;
        text-align: center;
    }

#docCard {
    background-color: #1C1847;
}

#preloader {
    background: #000 url(../Images/preloader.gif) no-repeat center center;
    background-size: 5%;
    height: 100vh;
    width: 100%;
    position: fixed;
    z-index: 100;
}

#bookmarks {
    margin-top: -10px;
    height: 5vh;
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #6c6e8e;
    padding: 0 10px;
    gap: 10px;
    border-radius: 0;
    scroll-behavior: smooth;
}

    #bookmarks a {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        text-decoration: none;
        color: #fff;
        background-color: transparent;
        font-size: 14px;
        white-space: nowrap;
        position: relative;
        border: none;
        transition: background-color 0.2s ease;
    }

        #bookmarks a i {
            margin-right: 6px;
            font-size: 15px;
            color: #cfcfcf;
        }

        #bookmarks a:hover::after {
            content: attr(title);
            position: absolute;
            bottom: -35px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #000;
            color: #fff;
            padding: 5px 8px;
            font-size: 12px;
            border: 1px solid #fff;
            border-radius: 4px;
            white-space: nowrap;
            z-index: 999;
            pointer-events: none;
        }

    /* Scrollbar */
    #bookmarks::-webkit-scrollbar {
        height: 6px;
    }

    #bookmarks::-webkit-scrollbar-thumb {
        background-color: #888;
        border-radius: 10px;
    }

        #bookmarks::-webkit-scrollbar-thumb:hover {
            background-color: #555;
        }

/* Context menu to remove a bookmark */
#context-menu {
    background-color: #1e1e1e;
    border: 1px solid #fff;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    border-radius: 4px;
    width: 150px;
    font-size: 14px;
}

    #context-menu li {
        padding: 8px 12px;
        color: #fff;
        cursor: pointer;
    }

        #context-menu li:hover {
            background-color: #333;
        }

/* ─────────────────────────────────────────────
   Mobile-only elements: hidden by default on desktop
   ───────────────────────────────────────────── */
#mobile-open-tree,
#mobile-pdf-back,
#mobile-tree-close {
    display: none;
}

@media (min-width: 992px) { /* Bootstrap lg breakpoint */
    #tree-container {
        flex: 0 0 15%;
        max-width: 15%;
    }

    #main-content {
        flex: 0 0 85%;
        max-width: 85%;
    }
}



/* ─────────────────────────────────────────────
   Mobile Navigation  (<768 px  =  Bootstrap lg)
   ───────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Tree takes full viewport width when visible */
    #tree-container {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        padding-bottom: 80px;
    }

    /* main-content also full width */
    #main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 8px;
    }

    /* Home card: less side margin on small screens */
    #docExplorerHome {
        margin: 0 !important;
    }

        #docExplorerHome p {
            font-size: 0.8rem;
        }

    /* "Browse Documents" button */
    #mobile-open-tree {
        display: inline-flex !important;
        align-items: center;
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        box-shadow: 0 2px 8px rgba(28, 24, 71, 0.25);
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
        align-self: flex-start;
    }

        #mobile-open-tree:hover,
        #mobile-open-tree:active {
            background-color: #2d2870 !important;
            box-shadow: 0 4px 12px rgba(28, 24, 71, 0.35);
        }

    /* Mobile close (✕) inside the tree */
    #mobile-tree-close {
        display: block !important;
        top: 105px;
        right: 14px;
        font-size: 1.3rem;
        padding: 6px;
        color: #1C1847;
        background: white;
        border: 1px solid #ccc;
        border-radius: 50%;
        cursor: pointer;
        z-index: 20;
        transition: background-color 0.15s ease;
    }

        #mobile-tree-close:hover {
            background-color: #f0f0f0;
        }

    /* "← Back" button inside PDF view */
    #mobile-pdf-back {
        display: inline-flex !important;
        align-items: center;
        font-size: 0.9rem;
        font-weight: 600;
        box-shadow: 0 2px 6px rgba(28, 24, 71, 0.2);
        transition: background-color 0.2s ease;
        margin-top: 6px;
        margin-left: 4px;
    }

        #mobile-pdf-back:hover,
        #mobile-pdf-back:active {
            background-color: #2d2870 !important;
        }

    /* Ensure pdfCanvasDiv stretches properly on mobile */
    #pdfCanvasDiv {
        width: 100%;
        padding: 0 4px;
    }

    /* Hide desktop-only toggle arrows on mobile */
    #toggle-tree,
    #show-tree,
    #show-tree-placeholder {
        display: none !important;
    }
}
