/* One sheet, one scroll surface. Physical placement is independent of Arabic text. */
.asfar-menu-dialog {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0;
  width: min(390px, calc(100vw - 40px)); height: 100dvh;
  max-width: none; max-height: none; border: 0; overflow: hidden;
  background: #fff; color: var(--asfar-ink); direction: ltr;
  box-shadow: -8px 0 32px #20211f14; font: inherit;
}
.asfar-menu-dialog[open] { display: flex; flex-direction: column; animation: asfar-sheet-enter 300ms ease; }
.asfar-menu-dialog::backdrop { background: rgba(32,33,31,.28); animation: asfar-backdrop-enter 300ms ease; }
.asfar-menu-dialog[data-closing] { animation: asfar-sheet-leave 300ms ease both; }
.asfar-menu-dialog[data-closing]::backdrop { animation: asfar-backdrop-leave 300ms ease both; }
.asfar-menu-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 20px 16px; }
.asfar-menu-header h2 { margin: 0; font: inherit; font-size: 20px; font-weight: 500; line-height: 1.5; }
.asfar-menu-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; direction: ltr; scrollbar-gutter: stable; }
.asfar-menu-content { direction: rtl; padding: 0 12px max(28px,env(safe-area-inset-bottom)) 24px; }
.asfar-menu-links { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0; padding: 0; list-style: none; }
.asfar-menu-item { display: block; width: 100%; margin: 0; padding: 0; }
.asfar-menu-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 9px 10px; border-radius: 6px; font: inherit; font-size: 15px; font-weight: 400; line-height: 1.7; color: var(--asfar-ink); text-decoration: none; }
.asfar-menu-link:hover { background: #f5f6f2; }
.asfar-menu-link > svg { width: 20px; height: 20px; stroke-width: 1.7; color: #686b63; flex: none; }
.asfar-menu-section-start { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e3de; }
.asfar-menu-section-label { display: block; padding: 0 10px 6px; font-size: 12px; font-weight: 400; line-height: 1.7; color: #686b63; }
@keyframes asfar-sheet-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes asfar-sheet-leave { to { transform: translateX(100%); } }
@keyframes asfar-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes asfar-backdrop-leave { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .asfar-menu-dialog[open],.asfar-menu-dialog::backdrop { animation: none; } }
