/* ── Menus (revamp I1) ──────────────────────────────────────────────────────
   A native <details class="tb-menu"> with a <summary> trigger and a
   .tb-menu-list of buttons: keyboard-ready without script; app.js closes
   it after a choice, on Escape and on a click elsewhere. Used for the
   "More" overflow of a toolbar (Investigate: Hide, Annotate, Export,
   Copy link) and any small action list. */

.tb-menu { position: relative; flex-shrink: 0; }
.tb-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tb-menu > summary::-webkit-details-marker { display: none; }
.tb-menu > summary::marker { content: ''; }
.tb-menu-list {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: var(--z-menu);
    display: flex; flex-direction: column; gap: 2px;
    min-width: 230px; padding: var(--sp-1);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px var(--border), var(--shadow-2);
    animation: menu-in var(--dur-enter) var(--ease-out);
    transform-origin: top right;
}
.tb-menu-list > button, .tb-menu-list > a {
    display: flex; align-items: center; gap: var(--sp-2);
    width: 100%; min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font: inherit;
    font-size: var(--fs-13);
    font-weight: 400;
    text-align: left;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    justify-content: flex-start;
}
.tb-menu-list > button:hover:not(:disabled), .tb-menu-list > a:hover { background: var(--hover); }
.tb-menu-list > button:disabled { color: var(--text-3); cursor: not-allowed; opacity: 1; }
.tb-menu-list > button svg.i, .tb-menu-list > a svg.i { color: var(--text-3); }
.tb-menu-list .tb-menu-hint { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); }
.tb-menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.tb-menu-sec { padding: 6px 10px 2px; font-size: var(--fs-12); font-weight: 500; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
    .tb-menu-list { animation: none; }
}
