/* A menu that opens in place (<details class="nc-dropdown">, run by the netcyc-dropdown controller): the main menu, the
   contents beside the title, the language menu, the Appearance menu. Its panel floats under its button, with the
   pinnable header (a column's or a menu's label and, beside it, its "hide" or "move to sidebar" button) and Vector's menu lists. */

.nc-dropdown { position: relative; }
.nc-dropdown > summary { list-style: none; }
.nc-dropdown > summary::-webkit-details-marker { display: none; }
.nc-dropdown[open] > summary { background: var(--nc-hover); }
.nc-dropdown__panel { position: absolute; top: calc(100% + 0.25rem); left: 0; z-index: 5; min-width: 12rem; max-width: min(22rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); padding: 0.75rem 1rem; overflow-y: auto; border: 1px solid var(--nc-border); border-radius: 2px; background: var(--nc-page); box-shadow: 0 2px 2px 0 var(--nc-shadow); font-size: var(--nc-ui-size); }
.nc-dropdown__panel--end { right: 0; left: auto; }

.nc-pinnable-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-bottom: 0.375rem; padding-bottom: 0.375rem; border-bottom: 1px solid var(--nc-border-subtle); }
.nc-pinnable-header__label { margin: 0; font-family: var(--nc-sans); font-size: var(--nc-ui-size); font-weight: 700; }
.nc-pinnable-header__button { padding: 0.0625rem 0.5rem; border: 0; border-radius: 2px; background: var(--nc-hover); color: var(--nc-text); font-size: var(--nc-small-size); cursor: pointer; }
.nc-pinnable-header__button:hover { background: var(--nc-border-subtle); }

.nc-menu-heading { margin: 0.5rem 0 0.25rem; color: var(--nc-subtle); font-size: var(--nc-ui-size); font-weight: 400; }
.nc-menu-list { margin: 0; padding: 0; list-style: none; }
.nc-menu-list a { display: block; padding: 0.3125rem 0; }
.nc-main-menu__panel { width: 13rem; }

/* "move to sidebar" only where the sidebar can be shown: the contents' column from 70rem, the Appearance column from
   87.5rem. */
@media (max-width: 69.999rem) {
  .nc-toc-menu .nc-pinnable-header__button { display: none; }
}

@media (max-width: 87.499rem) {
  .nc-appearance-menu .nc-pinnable-header__button { display: none; }
}
