﻿/* TopMenuBar.css - Responsive Top Bar Styles */

/* =========================================
   MOBILE FIRST (Default Styles)
   These apply to small screens (Phone)
   ========================================= */

/* Ensure the dropdown pushes items down on mobile, rather than floating over them */
.dropdown-menu {
    position: static !important;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: transparent; /* Blends with the dark theme on mobile */
    border: none;
    padding-left: 20px; /* Indent the sub-items so they look hierarchical */
}

/* 1. Container: Stack items vertically on mobile */
.navbar-nav-top {
    display: flex;
    flex-direction: column; /* Vertical stack for mobile */
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

/* 2. Items: Add spacing between vertical items */
.nav-item-top-bar {
    width: 100%; /* Full width on mobile */
    margin-bottom: 5px; /* Gap between vertical buttons */
    padding: 0 !important;
}

/* 3. Links: Make them look good on mobile */
.nav-item-top-bar .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 16px !important; /* Slightly bigger touch target */
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    display: block; /* Ensures full click area */
}

/* 4. Active State */
.nav-item-top-bar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-weight: 700;
}

/* =========================================
   DESKTOP OVERRIDES
   These apply ONLY when screen is > 768px
   ========================================= */
@media (min-width: 768px) {

    /* 1. Force Horizontal Row */
    .navbar-nav-top {
        flex-direction: row; /* Switch back to horizontal */
        align-items: center;
    }

    /* 2. Reset Margins for Horizontal Layout */
    .nav-item-top-bar {
        width: auto; /* Reset width */
        margin-bottom: 0; /* Remove vertical gap */
        margin-right: 5px; /* Add horizontal gap */
    }

    /* 3. Dropdown Hover Effect (Desktop Only) */
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* Force it back to a floating card on desktop */
    .dropdown-menu {
        position: absolute !important;
        background-color: #343a40; /* Dark background for desktop popup */
        padding-left: 0;
    }
}
