/**
 * Simple Dropdown Menu Styles
 * Clean and straightforward hover-based navigation
 */

/* CRITICAL: Override overflow:hidden from main_style.css */
/* This was clipping the dropdown menus! */
#topnav {
    overflow: visible !important;
}

/* Make nav items position context for dropdowns */
/* Higher specificity to override main_style.css float rules */
#topnav .wsite-menu-item-wrap {
    position: relative;
    display: inline-block;
    float: left; /* Keep the float from main_style.css */
}

/* Hide dropdown containers by default */
/* Using visibility + opacity instead of display: none so elements can receive mouse events */
.wsite-menu-wrap {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #f0f8ff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    padding: 10px 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none; /* Prevent interaction when hidden */
}

/* Show dropdown on hover - higher specificity */
#topnav .wsite-menu-item-wrap:hover > .wsite-menu-wrap {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Re-enable interaction when visible */
}

/* Menu lists */
.wsite-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Two-column container for Markets menu */
.wsite-menu-container {
    display: flex;
    gap: 0; /* Remove gap - we'll position right column absolutely */
    align-items: flex-start;
    position: relative; /* Context for absolute positioning */
}

/* Left column styling */
.wsite-menu-left {
    border-right: 1px solid #ccc;
    padding-right: 15px;
    min-width: 150px;
}

/* Right column - absolutely positioned to prevent layout shifts */
.wsite-menu-right {
    position: absolute;
    left: 100%; /* Position immediately after left column */
    top: 0;
    padding-left: 15px;
    margin-left: 0; /* No gap - sits flush against left column */
    min-width: 200px;
    background: #f0f8ff; /* Light blue background */
    border-left: 1px solid #ccc; /* Visual separation from left column */
    display: none;
}

.wsite-menu-right.show {
    display: block;
}

/* Force each subcategory to its own line */
.wsite-menu-right .wsite-menu-subitem-wrap {
    display: block;
    width: 100%;
}

.wsite-menu-right .wsite-menu-subitem {
    white-space: nowrap; /* Prevent text wrapping within each link */
}

/* Menu items */
.wsite-menu-subitem-wrap {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wsite-menu-subitem {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.wsite-menu-subitem:hover {
    background-color: #e6f3ff;
    color: #0066cc;
}

/* Arrow for items with subcategories */
.wsite-menu-arrow {
    float: right;
    margin-left: 10px;
    color: #999;
}

/* Highlight parent item when hovering subcategories */
.wsite-menu-subitem-wrap:hover > .wsite-menu-subitem {
    background-color: #e6f3ff;
    color: #0066cc;
}
