/**
 * VPE User Menu styles
 * Sits alongside the theme's core/navigation block — inherits its variables
 * where possible so it blends with whatever block theme is active.
 */

/* ── Wrapper injected after the main nav block ── */
.vpe-user-menu-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: auto; /* push to right edge when flexbox is in play */
}

/* ── The nav element itself ── */
.vpe-user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

/* ── Toggle button (hamburger icon) ── */
.vpe-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: inherit;
    line-height: 1;
}

.vpe-menu-toggle svg rect {
    fill: currentColor;
}

/* ── Dropdown container ── */
#vpe-user-menu-container {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 6px 0;
}

#vpe-user-menu-container[hidden] {
    display: none;
}

/* ── Menu items ── */
#vpe-user-menu-container .wp-block-navigation__container {
    list-style: none;
    margin: 0;
    padding: 0;
}

#vpe-user-menu-container .wp-block-navigation-item a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.15s;
}

#vpe-user-menu-container .wp-block-navigation-item a:hover,
#vpe-user-menu-container .wp-block-navigation-item a:focus {
    background: #f5f5f5;
    outline: none;
}

/* Logout item — visually separated */
.vpe-logout-item {
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 4px;
    padding-top: 4px;
}

.vpe-logout-item a {
    color: #c0392b !important;
}

/* ── Mobile: full-width overlay when open ── */
@media (max-width: 768px) {
    #vpe-user-menu-container {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        min-width: unset;
        border-radius: 0;
        border: none;
        padding: 60px 0 20px;
        overflow-y: auto;
    }

    #vpe-user-menu-container .wp-block-navigation-item a {
        font-size: 1.1rem;
        padding: 14px 24px;
    }
}
