/* ==========================================================================
   qol-nav.css  —  Self-contained QuantumOnline navigation menu
   --------------------------------------------------------------------------
   NO Bootstrap dependency. Every selector is scoped under .qolnav so this
   file can be loaded on the legacy ColdFusion pages WITHOUT disturbing their
   existing table-based layout. Loaded by BOTH the ASP.NET site and the CF
   Topbar.cfm so the menu looks identical everywhere.
   ========================================================================== */

/* ---- Bar ---------------------------------------------------------------- */
.qolnav {
    background-color: #339966;          /* QOL menu green */
    font-family: Verdana, Arial, Helvetica, sans-serif;
    position: relative;
}

/* Reset lists ONLY inside the menu (scoped — never leaks out) */
.qolnav ul,
.qolnav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Collapse wrapper holds the main menu + the account menu on one row.
   justify-content:center horizontally centers the menu across the bar. */
.qolnav-collapse {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

/* Top-level lists: horizontal row */
.qolnav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.qolnav-item {
    position: relative;
}

/* All menu links */
.qolnav-menu a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 9px 11px;
    white-space: nowrap;
    line-height: 1.2;
}

.qolnav-menu a:hover,
.qolnav-menu a:focus {
    background-color: #7ebf9e;
    color: #ffffff;
}

/* Caret for parents with children */
.qolnav-caret {
    display: inline-block;
    margin-left: 5px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ffffff;
    vertical-align: middle;
}

/* ---- Submenus (dropdowns) ---------------------------------------------- */
.qolnav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background-color: #ffffff;
    border: 1px solid #555555;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    z-index: 1050;
    display: none;                      /* hidden until opened */
}

.qolnav-submenu a {
    color: #000000;
    font-weight: normal;
    padding: 6px 14px;
    white-space: normal;                /* allow wrapping of long labels */
}

.qolnav-submenu a:hover,
.qolnav-submenu a:focus {
    background-color: #7ebf9e;
    color: #ffffff;
}

/* Right-aligned submenu (account menu) — opens toward the left edge so it
   does not overflow off the right side of the viewport */
.qolnav-submenu-right {
    left: auto;
    right: 0;
}

/* Open state — set by qol-nav.js (click) and by hover on desktop */
.qolnav-item.qolnav-open > .qolnav-submenu {
    display: block;
}

/* ---- Account section (LOGIN / MY ACCOUNT), reuses the same look --------
   Flows inline with the centered menu (no margin-left:auto, so the whole
   menu stays centered rather than being pushed to the right edge). */
.qolnav-account {
    margin-left: 0;
}

/* ---- Hamburger toggle (hidden on desktop) ------------------------------ */
.qolnav-toggle {
    display: none;
    background: none;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    padding: 4px 10px;
    margin: 5px;
    cursor: pointer;
}

/* ==========================================================================
   Shared footer nav — horizontal green bar. Lives here (not site.css) so the
   legacy ColdFusion pages, which load qol-nav.css but NOT site.css, get it too.
   Literal colors (no CSS vars) since this stylesheet is standalone.
   ========================================================================== */
.qol-footer-nav {
    background-color: #339966;
    border-top: 2px solid #267a52;
    padding: 10px 0;
    font-size: 12px;
}

.qol-footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.qol-footer-menu li {
    display: flex;
    align-items: center;
}

.qol-footer-menu li:not(:last-child)::after {
    content: "|";
    color: #cfeede;
    margin: 0 8px;
}

.qol-footer-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.qol-footer-menu a:hover {
    color: #ffff00;
    text-decoration: underline;
}

/* ---- Desktop: open submenus on hover ----------------------------------- */
@media (min-width: 992px) {
    .qolnav-item.qolnav-has-children:hover > .qolnav-submenu {
        display: block;
    }
}

/* ---- Mobile / narrow: stack vertically, toggle with hamburger ---------- */
@media (max-width: 991px) {
    .qolnav-toggle {
        display: inline-block;
    }
    .qolnav-collapse {
        display: none;
        flex-direction: column;
    }
    .qolnav-collapse.qolnav-show {
        display: flex;
    }
    .qolnav-menu {
        flex-direction: column;
    }
    .qolnav-account {
        margin-left: 0;
    }
    .qolnav-submenu {
        position: static;
        border: none;
        box-shadow: none;
        background-color: #eafaf1;
        min-width: 0;
    }
    .qolnav-submenu a {
        padding-left: 28px;
    }
}
