/* vanro-overrides.css
 * vanro-new-specific tweaks layered on top of main.css. Loaded last so the
 * rules in here win cascade ties.
 */

/* Mobile-only: the bottom nav lives inside <div id="smallMenu">, but
 * main.css:940 hides #smallMenu unconditionally with display:none.
 * That hides every child too — including the hamburger button — so the
 * .smallMenuToggle binding in flux.console.js never gets a click.
 * Neutralize the fullscreen-overlay positioning on mobile so the inner
 * <nav class="naviBottom"> (which has its own position:fixed bottom:0)
 * actually renders. */
@media (max-width: 1024px) {
    #smallMenu {
        display: block !important;
        position: static;
        height: auto;
        width: auto;
        background: none;
        z-index: auto;
    }
}

/* Fullscreen overlay menu shown when the hamburger is tapped on mobile.
 * Sits as a sibling of #smallMenu (rendered in header.php) so its visibility
 * is independent of the bottom-nav container. */
#overlayMenu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 26, 0.97);
    z-index: 800;
    padding: 80px 30px 30px;
    overflow-y: auto;
}
#overlayMenu.is-open {
    display: block;
}
#overlayMenu nav.pageNavi ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#overlayMenu nav.pageNavi ul li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
#overlayMenu nav.pageNavi ul li a {
    color: #e0e8ff;
    text-decoration: none;
    font-size: 18px;
    display: block;
}
#overlayMenu nav.pageNavi ul li a:hover,
#overlayMenu nav.pageNavi ul li:hover > a {
    color: #00d4ff;
}
/* Inline-render the Bootstrap dropdowns inside the overlay so child links
 * are reachable without hover/click positioning. */
#overlayMenu .dropdown-menu {
    position: static;
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    margin-top: 8px;
    padding: 6px 12px;
    box-shadow: none;
}
#overlayMenu .dropdown-menu a.dropdown-item {
    color: #cbd5e1;
    padding: 8px 8px;
    font-size: 15px;
}
#overlayMenu .dropdown-menu a.dropdown-item:hover {
    color: #00d4ff;
    background: transparent;
}
#overlayMenu .dropdown-toggle .caret {
    display: none;
}
.overlayMenu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #e0e8ff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
}
.overlayMenu-close:hover {
    color: #00d4ff;
}

/* Dark-theme override for the FluxCP standard tables.
 * flux.css:357-369 hardcodes background-color on th (#eee) and td (#fff)
 * with a #ddd border, which clashes with the dark theme. !important to
 * beat the inline-priority single-class selectors in flux.css. */
.vanro-new .vertical-table,
.vanro-new .horizontal-table,
.vanro-new .generic-form-table {
    color: #e0e8ff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.vanro-new .vertical-table th,
.vanro-new .horizontal-table th,
.vanro-new .generic-form-table th {
    background-color: rgba(0, 212, 255, 0.10) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.vanro-new .vertical-table td,
.vanro-new .horizontal-table td,
.vanro-new .generic-form-table td {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #e0e8ff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.vanro-new .vertical-table tr:hover td,
.vanro-new .horizontal-table tr:hover td {
    background-color: rgba(0, 212, 255, 0.04) !important;
}
.vanro-new .vertical-table a,
.vanro-new .horizontal-table a,
.vanro-new .generic-form-table a {
    color: #00d4ff;
}
.vanro-new .vertical-table code,
.vanro-new .horizontal-table code {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.10);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}
.vanro-new .vertical-table input[type=text],
.vanro-new .vertical-table input[type=password],
.vanro-new .vertical-table textarea,
.vanro-new .vertical-table select {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #e0e8ff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.vanro-new .not-applicable {
    color: #6b7d99 !important;
    font-style: italic;
}
/* Status-cell colors from flux.css use light tones — adjust for dark bg. */
.vanro-new .online           { color: #00ff88 !important; font-weight: 600; }
.vanro-new .offline          { color: #ff5577 !important; }
.vanro-new .identified.yes   { color: #00ff88 !important; }
.vanro-new .identified.no    { color: #ffaa44 !important; }
.vanro-new .broken.yes       { color: #ff5577 !important; }
.vanro-new .broken.no        { color: #00ff88 !important; }
.vanro-new .account-state    { font-weight: 600; }
.vanro-new .state-banned     { color: #ff5577 !important; }
.vanro-new .state-pending    { color: #ffaa44 !important; }

/* Username in the top nav is a Bootstrap dropdown trigger
 * (View Account / Change Password / Change Email / Account History / Logout).
 * Keep it visually flat — no underline, no caret, white→cyan on hover. */
a.user_name,
a.user_name:visited {
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}
a.user_name:hover,
a.user_name:focus {
    color: #00d4ff;
    text-decoration: none;
}
a.user_name.dropdown-toggle::after {
    display: none; /* hide bootstrap's default caret; user_picture is right beside it */
}

/* Defensive: replicate Bootstrap's default .dropdown-menu hide/show so
 * the menu stays hidden even if Bootstrap's CSS fails to apply (CDN block,
 * stale cache, specificity quirk). vanro-overrides.css loads LAST so these
 * win cascade ties; the #overlayMenu override above is more specific and
 * still wins inside the mobile overlay. */
.dropdown-menu {
    display: none;
    position: absolute;
}
.dropdown-menu.show {
    display: block;
}

/* The .pagemenu caret needs a positioning context for the absolute
 * dropdown-menu, since .dropdown_container doesn't carry Bootstrap's
 * .dropdown class. */
.vanro-new header.topbar .pagemenu .dropdown_container {
    position: relative;
}

/* Dark dropdown menu for the username. */
.user_name_menu {
    background: #0a0e1a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e0e8ff;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    min-width: 200px;
    z-index: 1100;
}
.user_name_menu .dropdown-item {
    color: #e0e8ff;
    padding: 9px 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.user_name_menu .dropdown-item:hover,
.user_name_menu .dropdown-item:focus {
    background: rgba(0, 212, 255, 0.10);
    color: #00d4ff;
}
.user_name_menu .dropdown-item i {
    width: 18px;
    margin-right: 10px;
    color: #00d4ff;
    font-size: 13px;
}
.user_name_menu .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}
