/* Shared local dialogs and the mobile version of the captured navigation. */
.local-mobile-menu-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 28px; width: 28px; height: 36px; padding: 0;
  border: 0; background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.local-mobile-menu-trigger:hover { color: var(--foreground); }
.local-mobile-menu-trigger:focus-visible,
.local-dialog-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.local-dialog {
  padding: 0; border: 1px solid color-mix(in srgb, var(--border), transparent 50%);
  color: var(--foreground); background: var(--background);
  max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px);
}
.local-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.local-menu-dialog {
  width: min(320px, 88vw); max-width: 88vw;
  height: 100dvh; max-height: 100dvh; margin: 0;
  border-width: 0 1px 0 0; overflow: hidden;
  background-image: linear-gradient(160deg,var(--background) 0%,var(--background) 92%,var(--sidebar) 140%);
}
.local-menu-dialog[open] { display: flex; flex-direction: column; }
.local-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 64px; padding: 8px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}
.local-menu-header > a { width: 128px; }
.local-dialog-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.local-dialog-close:hover { color: var(--foreground); background: var(--muted); }
.local-mobile-menu-content {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 0 24px;
  overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0;
}
.local-mobile-menu-content a { -webkit-tap-highlight-color: transparent; }
body.local-dialog-open { overflow: hidden; }
