﻿/* ===============================
   MENU BAR – FIXED OVERLAY PANEL
   =============================== */

/* Container directly under the header */
.app-menu {
    position: fixed;
    left: 0;
    top: var(--app-header-h, 72px);
    z-index: 2000;
    /* Hidden state */
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
}

/* Backdrop: pure overlay, NO borders */
.app-menu__backdrop {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--app-header-h, 72px);
    bottom: 0;
    z-index: 1999;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

/* Open state */
.app-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

    .app-menu.is-open + .app-menu__backdrop {
        opacity: 1;
        pointer-events: auto;
    }

/* ===============================
   MENU PANEL
   =============================== */

.app-menu__inner {
    position: relative;
    z-index: 2001;
    display: inline-grid;
    width: max-content;
    max-width: calc(100vw - 16px);
    /* FLUSH LEFT */
    padding: 10px;
    gap: 0;
    background: var(--color-primary);
    /* Seamless connection to header */
    border-left: 1px solid rgba(255,255,255,0.10);
    border-right: 1px solid rgba(255,255,255,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    border-top: 0;
    /* Rounded ONLY at the bottom */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.25);
    padding-bottom: 55px;
}

    /* Hide any microscopic seam under the header */
    .app-menu__inner::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -1px;
        height: 2px;
        background: var(--color-primary);
    }

/* ===============================
   MENU ITEMS
   =============================== */

.app-menu__item {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-width: 0;
    white-space: nowrap;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.10);
    color: var(--color-text-primary);
    cursor: pointer;
    text-align: left;
    transition: transform 120ms ease, background 120ms ease;
    margin-top: 10px;
}

    .app-menu__item:hover {
        background: rgba(255,255,255,0.16);
        transform: translateY(-1px);
    }

    .app-menu__item,
    .app-menu__item:hover,
    .app-menu__item:focus,
    .app-menu__item:visited,
    .app-menu__item:active {
        text-decoration: none;
    }


/* ===============================
   REDUCED MOTION
   =============================== */

@media (prefers-reduced-motion: reduce) {
    .app-menu,
    .app-menu__backdrop,
    .app-menu__item {
        transition: none;
    }
}
