/* ==================== Root styling ==================== */

:root {
    --font-family-sans-serif: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --cool-off-white: #f0f5f9;
    --light-gray: #c9d6df;
    --gunmetal: #52616b;
    --charcoal-black: #1e2022;
    --prime-blue: #0066cc;
}

/* ==================== Styling for sight ==================== */

html {
    font-size: 14px;
    font-family: --font-family-monospace;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
    background-color: var(--cool-off-white);
}

/*.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}*/

/* Offcanvas menu transition */
.offcanvas-lg {
    transition: transform 0.3s ease-in-out;
}

/* Hide toggle button on desktop */
@media (min-width: 992px) {
    .offcanvas-lg {
        visibility: visible !important;
        transform: none !important;
    }
}

ul li::marker {
    content: none;
}

/* ==================== Header ==================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: white;
}

@media (min-width: 992px) {
    .offcanvas-lg {
        position: fixed !important;
        top: 56px; /* Adjust based on your header height */
        left: 0;
        bottom: 0;
        width: 250px;
        z-index: 1040;
    }
}

.main-content-wrapper {
    margin-top: 56px; /* Adjust based on your header height */
}

@media (min-width: 992px) {
    .main-content-wrapper main {
        margin-left: 250px; /* Match sidebar width */
    }
}

/* ==================== Side Menu ==================== */

.side-menu {
    width: 250px;
    min-width: 250px;
    background-color: var(--gunmetal);
}

.nav-link {
    transition: background-color 0.15s ease;
    pointer-events: auto;
}

a.nav-link {
    color: var(--light-gray);
}

.nav-link:hover {
    background-color: #e9ecef !important;
    color: var(--prime-blue);
    border-radius: 0.25rem;
}

    .nav-link:hover i {
        background-color: #e9ecef !important;
        color: var(--prime-blue);
    }

/*.nav-link.active {
    background-color: #e9ecef !important;
    color: var(--prime-blue);
    border-radius: 0.25rem;
}*/

#sidebar {
    width: 260px;
}

.treeview i {
    color: var(--light-gray);
}

.treeview li {
    margin-bottom: 5px;
}

.tree-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    color: var(--light-gray);
    text-decoration: none;
    cursor: pointer;
}

    .tree-toggle:hover {
        background-color: var(--cool-off-white);
        color: var(--prime-blue);
    }

        .tree-toggle:hover i {
            background-color: var(--cool-off-white);
            color: var(--prime-blue);
        }

.treeview-menu {
    display: none;
}

    .treeview-menu a {
        display: block;
        padding: 6px 8px;
        color: lightgray;
        text-decoration: none;
    }

        .treeview-menu a:hover {
            background-color: var(--cool-off-white);
            color: var(--prime-blue);
        }

            .treeview-menu a:hover i {
                background-color: var(--cool-off-white);
                color: var(--prime-blue);
            }

.arrow {
    transition: transform 0.3s ease;
}

.tree-open > .tree-toggle .arrow {
    transform: rotate(90deg);
}

.sidebar-divider{
    color: lightgray;
}

/* ==================== Site loader ==================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 58, 64, 0.95); /* Dark grey background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.page-loader.hidden {
    display: none;
}

#page-loader #container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#page-loader #h3 {
    color: white;
}

#page-loader #ring {
    width: 190px;
    height: 190px;
    border: 1px solid transparent;
    border-radius: 50%;
    position: absolute;
}

#page-loader #ring:nth-child(1) {
    border-bottom: 8px solid rgb(255, 141, 249);
    animation: rotate1 2s linear infinite;
}

@keyframes rotate1 {
    from {
        transform: rotateX(50deg) rotateZ(110deg);
    }

    to {
        transform: rotateX(50deg) rotateZ(470deg);
    }
}

#page-loader #ring:nth-child(2) {
    border-bottom: 8px solid rgb(255,65,106);
    animation: rotate2 2s linear infinite;
}

@keyframes rotate2 {
    from {
        transform: rotateX(20deg) rotateY(50deg) rotateZ(20deg);
    }

    to {
        transform: rotateX(20deg) rotateY(50deg) rotateZ(380deg);
    }
}

#page-loader #ring:nth-child(3) {
    border-bottom: 8px solid rgb(0,255,255);
    animation: rotate3 2s linear infinite;
}

@keyframes rotate3 {
    from {
        transform: rotateX(40deg) rotateY(130deg) rotateZ(450deg);
    }

    to {
        transform: rotateX(40deg) rotateY(130deg) rotateZ(90deg);
    }
}

#page-loader #ring:nth-child(4) {
    border-bottom: 8px solid rgb(252, 183, 55);
    animation: rotate4 2s linear infinite;
}

@keyframes rotate4 {
    from {
        transform: rotateX(70deg) rotateZ(270deg);
    }

    to {
        transform: rotateX(70deg) rotateZ(630deg);
    }
}

/* Page Loader Styles */