﻿/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */
:root {
    /* Color Palette & Sizing */
    --header-height: 65px;
    --mainbackground: #f8f9fa; /* Light grey background for content area */
    --navsidebarbackground: #34495E; /* wet asphalt */
    --navsidebartext: #e0e1dd; /* light text color for sidebar */
    --nav2background: #EAEAEA; /* darker defined gray */
    --OTS-Green: #0cb14b; /*OTS Green from logo*/
    --OTS-Blue: #0071bc; /*OTS Blue from logo*/
    --bordergray: #e7e7e7; /* Light border gray */
}

html,
body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1:focus {
    outline: none;
}

/* ==========================================================================
   2. Main Page Layout
   ========================================================================== */
.page-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1; /* Allows this area to take up remaining space */
    display: flex;
    flex-direction: column;
    background-color: var(--mainbackground); /* Light grey background for content area */
}

.content-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.nav-text {
    font-size: 0.75rem;
    text-align: center;
}

/* ==========================================================================
   3. Top Navigation Bar
   ========================================================================== */
.top-nav {
    height: var(--header-height);
    padding: 0 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-top: 1px solid var(--bordergray);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: var(--nav2background) !important; /* Override default bg-light */
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
}

.custom-menu-btn {
    background-color: var(--OTS-Blue); /* Primary blue */
    border: hidden;
}

    .custom-menu-btn .bi-list {
        color: var(--OTS-Green); /* Green icon lines */
        font-size: 1.5rem;
    }

/* ==========================================================================
   4. Sidebar (Desktop)
   ========================================================================== */
.sidebar {
    width: 100px;
    background-color: var(--navsidebarbackground);
    color: var(--navsidebartext);
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Prevents sidebar from shrinking */
    position: sticky;
    top: var(--header-height);
}

.sidebar-header {
    height: var(--header-height);
    background: var(--navsidebarbackground);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    position: sticky;
    top: 0;
}

.sidebar .navbar-brand {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar .nav-item {
    padding: 0.25rem 0;
}

.sidebar .nav-link {
    color: #adb5bd; /* Muted text color */
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    border-radius: 0.375rem;
    margin: 0.1rem 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

    .sidebar .nav-link .bi {
        font-size: 1.2rem; /* Icon size */
    }

    .sidebar .nav-link:hover {
        background-color: #1b263b; /* Hover background */
        color: #ffffff;
    }

    .sidebar .nav-link.active {
        background-color: #415a77; /* Active link background */
        color: #ffffff;
        font-weight: 500;
    }


/* ==========================================================================
   5. Off-canvas Mobile Menu
   ========================================================================== */
.offcanvas-sidebar-dark {
    --bs-offcanvas-width: 150px;
    background-color: var(--navsidebarbackground); /* Match the main sidebar color */
    color: var(--navsidebartext);
}

    .offcanvas-sidebar-dark .offcanvas-header {
        background: var(--navsidebarbackground);
        border-bottom: 5px solid #1b263b;
        height: 65px;
    }

    .offcanvas-sidebar-dark .offcanvas-title {
        color: #ffffff;
    }

    .offcanvas-sidebar-dark .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }


/* ==========================================================================
   6. Footer
   ========================================================================== */
.footer {
    background-color: var(--nav2background);
    flex-shrink: 0; /* Prevent footer from shrinking */
    padding: 1rem;
    border-top: 1px solid var(--bordergray);
    text-align: center;
    color: #6c757d;
}

/* Styles for footer links (some moved from Footer1.razor for consistency) */
.footer-link {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

    .footer-link:hover {
        color: #0d6efd !important; /* Standard Bootstrap link blue */
        text-decoration: underline;
    }

    /* Social Media Icons */
    .footer-link[href*="github.com"] svg {
        color: #181717;
        transition: color 0.2s ease-in-out;
    }

    .footer-link[href*="linkedin.com"] svg {
        color: #0A66C2;
        transition: color 0.2s ease-in-out;
    }

    .footer-link[href*="github.com"]:hover svg {
        color: #444;
    }

    .footer-link[href*="linkedin.com"]:hover svg {
        color: #004182;
    }

/* ==========================================================================
   7. Mobile Bottom Navbar
   ========================================================================== */
.bottom-nav {
    background-color: var(--navsidebarbackground); /* Uses the same color as your sidebar */
    border-top: 1px solid #1b263b; /* A slightly darker border for contrast */
}

    /* Style for the links inside the bottom nav */
    .bottom-nav .nav-link {
        color: #adb5bd; /* Muted icon/text color, matching your desktop sidebar */
        transition: color 0.2s ease-in-out;
    }

        /* Style for the active or hovered link */
        .bottom-nav .nav-link:hover,
        .bottom-nav .nav-link.active {
            color: #ffffff; /* Bright white, matching your desktop sidebar's active state */
        }

/* ==========================================================================
   8. Responsive Design
   ========================================================================== */
/* Hide sidebar on smaller screens */
@media (max-width: 991.98px) {
    .page-container > .sidebar {
        display: none;
    }

    .main-content {
        /* Adjust this value to the exact height of your bottom navbar */
        padding-bottom: 75px;
    }
}
