/* PM Project - Alternative Menu System CSS */

:root {
    /* Auxiliary menu button colors */
    --aux-btn-bg: #f1f1f1;
    --aux-btn-gradient: linear-gradient(to top, #89abcd, #f1f1f1);
    --aux-btn-color: #012345;
    --aux-btn-border: #ccc;
    --aux-btn-border-radius: 7px;
    --aux-btn-hover-bg: #e9ecef;
    --aux-btn-hover-border: #adb5bd;
    --aux-btn-active-bg: #ffd700; /* Gold */
    --aux-btn-active-border: #ffcc00;
    --aux-btn-active-color: white;
    --aux-btn-active-gradient: linear-gradient(to top, #123456, #789abc);
}

/* Menu container using flexbox */
.menu-container {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

/* Menu items inherit from base.css toolbar-btn styles */
.menu-item {
    position: relative;
}



.menu-item > a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    /* border: var(--standard-border);
    border-radius: var(--border-radius); */
    /* background-color: var(--menu-bg-color); */
    padding: 5px 10px;
    text-decoration: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.img {
    width: 16px;
    vertical-align: middle;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:active {
    color: red;
}

a:visited {
    color: purple;
}




.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    }

    .dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color:white;
    }

    .dropdown-content a:hover {background-color: #f1f1f1}

    .dropdown:hover .dropdown-content {
    display: block;
    }

    .dropdown:hover .dropbtn {
    background-color: #234567;
    color:white;
    }



/* Dropdown container - initially hidden */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    overflow: hidden;
    margin-top: -1px;
    transition: opacity 0.2s ease;
    opacity: 0;
    color:white;
}

/* Individual dropdown items */
.dropdown-content a {
    display: block !important;
    background-color: #456789;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    border-bottom: 1px solid #ddd;
}

.dropdown-content a:hover {
    background-color: #ddd;
    color: var(--accent-hover);
    background-color: #012345;
    color:white;    
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* Show dropdown on parent hover */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transition-delay: 0s;
}

/* Keep dropdown visible when hovering over dropdown content */
.dropdown-content:hover {
    display: block;
    opacity: 1;
}

/* Add slight delay when hiding */
.dropdown .dropdown-content {
    transition-delay: 0.3s;
    background-color: #b1b1b1;
}

/* Parent button styling on hover */
.dropdown:hover .dropbtn {
    background-color: #b1b1b1;
}

.dropdown {
    display: flex;
    list-style: none;
    padding-left: 0px;
    gap: 1px;
    border: 1px solid #123456;
    border-radius: 4px;
    background-color: #b1b1b1;
    padding: 5px 5px;
    text-decoration: none;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

/* Standalone menu items */
.menu-item {
    display: flex;
    list-style: none;
    padding-left: 0px;
    gap: 1px;
    border: 1px solid #123456;
    border-radius: 4px;
    background-color: #e1e1e1;
    padding: 5px 5px;
    text-decoration: none;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.menu-item > a:hover {
    background-color: #234567;
}

.menu-item a:hover {
    color:white;
}

/* Header layout - Dynamic grid system */
#menu-header {
    display: grid;
    grid-template-columns: 1fr 150px;
    grid-template-rows: auto auto; /* Changed from 1fr 1fr to auto auto for dynamic sizing */
    align-items: center;
    border: 1px solid #456789;
    border-left: 16px solid #6789ab;
    border-right: 16px solid #6789ab;
    border-radius: 7px;
    margin: 0 auto;
    /* max-width: 80vw; */
    background: #456789;
    gap: 10px;
    padding: 10px 5px; /* Increased padding for better spacing */
}

#menu-main {
    grid-row-start: 1;
    grid-row-end: 2;
    grid-column-start: 1;
    grid-column-end: 2;
    display: flex;
    align-items: center;
    padding-left: 10px;
    gap:15px;
    width: calc(80vw - 210px);
}

#menu-logout {
    grid-row-start: 1;
    grid-column-start: 2;
    grid-column-end: 3;
    justify-self: end;
    align-self: center;
    padding-right: 10px;
    padding-top:20px;
}

#menu-specific-content {
    grid-row-start: 2;
    grid-column-start: 1;
    grid-column-end: 3;
    text-align: left; /* Changed from center to left for better alignment */
    padding: 10px 15px; /* Increased padding for better spacing */
    border-top: 1px solid #789abc; /* Changed border color to match theme */
    min-height: 0; /* Allow it to collapse when empty */
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Collapse auxiliary menu section when empty */
#menu-specific-content:empty {
    padding: 0;
    border: none;
    min-height: 0;
    height: 0;
    display: none; /* Completely hide when empty */
}

/* Logout button styling */
#menu-logout button {
    background-color: #fd7e14;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#menu-logout button:hover {
    background-color: #e8590c;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

#menu-logout button a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Auxiliary menu styling - integrated into #menu-specific-content */
.aux-menu-section {
    display: contents; /* Use contents to integrate with parent flex layout */
}

.aux-menu-section h4 {
    margin: 0;
    font-size: 14px;
    color: #ffffff; /* Changed to white for better visibility on dark background */
    font-weight: bold;
}

.aux-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-image: var(--aux-btn-gradient);
    border: 1px solid var(--aux-btn-border);
    border-radius: var(--aux-btn-border-radius);
    text-decoration: none;
    color: var(--aux-btn-color);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.aux-menu-btn:hover {
    background-color: var(--aux-btn-hover-bg);
    border-color: var(--aux-btn-hover-border);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.aux-menu-btn.active {
    border-color: var(--aux-btn-active-border);
    color: var(--aux-btn-active-color);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 204, 0, 0.2);
    background-image: var(--aux-btn-active-gradient);
}

.aux-menu-placeholder {
    padding: 8px 15px;
    font-size: 12px;
}
