/* Site menu (25 Oct 2026): desktop dropdown groups, phone «المزيد» sheet, grouped footer. Loaded after app.v8.css. */

/* desktop groups */
@media (min-width: 900px) {
  .app-bar__links { gap: 2px; align-items: center; }
  .nav-g { position: relative; }
  .nav-g > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 14px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: .95rem; color: var(--ink-60);
    transition: all .2s var(--ease); user-select: none;
  }
  .nav-g > summary::-webkit-details-marker { display: none; }
  .nav-g > summary svg { width: 18px; height: 18px; fill: currentColor; transition: transform .2s var(--ease); }
  .nav-g[open] > summary svg { transform: rotate(180deg); }
  .nav-g > summary:hover, .nav-g[open] > summary, .nav-g[data-current] > summary { color: var(--gold-hi); background: var(--gold-soft); }
  .nav-drop {
    position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 60; min-width: 230px;
    display: grid; padding: 8px; border-radius: var(--r); border: 1px solid var(--line-2);
    background: rgba(16,10,30,.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow);
  }
  .nav-drop a { padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink-75); font-family: var(--font-ui); font-size: .95rem; white-space: nowrap; }
  .nav-drop a:hover, .nav-drop a[aria-current] { color: var(--gold-hi); background: var(--gold-soft); }
}

/* phone: the «أضف قبراً» tab stands out; «المزيد» is a button */
button.tab-bar__item { background: none; border: 0; padding: 0; cursor: pointer; }
.tab-bar__item--add { color: var(--gold-text); }
.tab-bar__plus { display: grid; place-items: center; width: 40px; height: 32px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.tab-bar__item--add[aria-current] .tab-bar__plus { background: var(--gold); color: #111; }

/* phone sheet */
.menu-sheet { position: fixed; inset: 0; z-index: 80; }
.menu-sheet[hidden] { display: none; }
.menu-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.menu-sheet__panel {
  position: absolute; inset: auto 0 0 0; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px calc(16px + var(--sab, 0px)); border-radius: 20px 20px 0 0;
  background: var(--bg-1); border-top: 1px solid var(--gold-line); box-shadow: var(--shadow);
  animation: sheet-up .22s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .menu-sheet__panel { animation: none; } }
.menu-sheet__head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -8px; background: var(--bg-1); padding: 6px 0; z-index: 1; }
.menu-sheet__head b { font-family: var(--font-ui); color: var(--gold-text); }
.menu-sheet section { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.menu-sheet section:last-child { border-bottom: 0; }
.menu-sheet__group { border-bottom: 1px solid var(--line); }
.menu-sheet__group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; }
.menu-sheet__group summary::-webkit-details-marker { display: none; }
.menu-sheet__group summary h3 { margin: 0; }
.menu-sheet__count { font: 12px var(--font-ui); color: var(--ink-45); }
.menu-sheet__group[open] .menu-sheet__count { display: none; }
.menu-sheet__group > div { padding: 0 0 8px; }
.menu-sheet__group a:not(.btn) { display: block; padding: 11px 4px; color: var(--ink-90); font-family: var(--font-ui); font-size: 1rem; border-radius: var(--r-sm); }
.menu-sheet__group a:not(.btn)[aria-current] { color: var(--gold-hi); }
.menu-sheet h3 { margin: 4px 0 6px; font-family: var(--font-ui); font-size: .82rem; font-weight: 500; color: var(--gold-text); letter-spacing: .02em; }
.menu-sheet section a:not(.btn) { display: block; padding: 11px 4px; color: var(--ink-90); font-family: var(--font-ui); font-size: 1rem; border-radius: var(--r-sm); }
.menu-sheet section a:not(.btn)[aria-current] { color: var(--gold-hi); }
.menu-sheet__foot { display: flex; gap: 16px; } .menu-sheet__foot a { color: var(--ink-60) !important; font-size: .9rem !important; }
body.menu-open { overflow: hidden; }
@media (min-width: 900px) { .menu-sheet { display: none !important; } }

/* footer groups */
.app-footer__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.app-footer__groups nav { display: grid; gap: 6px; align-content: start; }
.app-footer__groups b { font-family: var(--font-ui); font-size: .85rem; color: var(--gold-text); font-weight: 500; }
.app-footer__groups a { color: var(--ink-60); font-family: var(--font-ui); font-size: .9rem; }
.app-footer__groups a:hover { color: var(--gold-hi); }
@media (min-width: 700px) { .app-footer__groups { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* dropdown lists: the browser draws <option> on a light background — give it the dark theme so the text is visible before choosing */
select, .select { color-scheme: dark; }
select option, select optgroup { background-color: var(--bg-2, #160d28); color: var(--ink, #fff); }
