/* Bounded, touch-friendly header menu; available space follows the iOS visual viewport. */
.ax-menu:not([open]) > .ax-menu__panel { display: none; }
.ax-menu > .ax-menu-toggle { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ax-menu-toggle svg path { transform-origin: 12px 12px; transition: transform .18s ease, opacity .18s ease; }
.ax-menu[open] .ax-menu-toggle { border-color: var(--ax-primary); background: transparent; }
.ax-menu[open] .ax-menu-toggle .ax-menu-line--top { transform: rotate(45deg) translateY(5px); }
.ax-menu[open] .ax-menu-toggle .ax-menu-line--middle { opacity: 0; }
.ax-menu[open] .ax-menu-toggle .ax-menu-line--bottom { transform: rotate(-45deg) translateY(-5px); }
.ax-menu > .ax-menu__panel {
  box-sizing: border-box; width: min(300px, calc(100vw - 24px)); min-width: 0;
  max-height: calc(100vh - 110px); max-height: min(var(--ax-menu-available-height, calc(100dvh - 110px)), 680px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--ax-border-strong) transparent;
  padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  gap: 3px; border-radius: 18px; isolation: isolate; text-align: start;
}
.ax-menu__panel > a, .ax-menu__panel > .ax-menu__theme, .ax-menu__panel > form > .ax-btn {
  box-sizing: border-box; display: flex; align-items: center; width: 100%; min-height: 44px;
  padding: 10px 12px; margin: 0; font-size: 15px; line-height: 1.35; font-weight: 600;
  text-align: start; white-space: normal; overflow-wrap: anywhere; border-radius: 10px;
}
.ax-menu__panel > a[aria-current="page"] { color: var(--ax-accent-text); background: var(--ax-border-soft); }
.ax-menu__panel :is(a,button,summary,select):focus-visible { outline: 2px solid var(--ax-focus); outline-offset: -2px; }
.ax-menu__panel > .ax-menu-language-slot { padding: 2px 2px 10px; margin-bottom: 4px; }
.ax-menu-language-slot .ax-locale { max-width: 100%; }
.ax-menu-language-slot .ax-locale select { min-width: 0; }
.ax-menu__panel > .ax-menu-account { margin: 6px 0 0; padding: 12px 12px 6px; border-top: 1px solid var(--ax-border-soft); font-size: 13px; line-height: 1.4; color: var(--ax-text-secondary); overflow-wrap: anywhere; }
.ax-menu__panel > form { margin: 0; }
.ax-menu__panel > form > .ax-btn { justify-content: flex-start; border-color: transparent; }
.ax-menu__panel > .ax-menu__theme { gap: 10px; margin-top: 6px; border-radius: 0 0 10px 10px; padding-top: 12px; }
:root[dir="rtl"] .ax-menu__panel { right: 0; left: auto; }
@media (prefers-reduced-motion: reduce) { .ax-menu-toggle svg path { transition: none; } }

/* Match the transparent mobile header icons in every interaction state. */
.ax-header .ax-menu > .ax-btn.ax-menu-toggle,
.ax-header .ax-menu > .ax-btn.ax-menu-toggle:hover,
.ax-header .ax-menu > .ax-btn.ax-menu-toggle:active,
.ax-header .ax-menu > .ax-btn.ax-menu-toggle:focus-visible {
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* One language field and one focus ring, including Safari's native select. */
.ax-menu > .ax-menu__panel{align-content:start;grid-auto-rows:max-content}
.ax-menu-language-slot .ax-locale{
 display:flex;position:relative;align-items:center;box-sizing:border-box;
 width:100%;max-width:100%;height:46px;min-height:46px;margin:0;
 padding:0 12px;gap:10px;border:1px solid var(--ax-border-strong);
 border-radius:12px;background:var(--ax-bg-card);color:var(--ax-text-primary);
 box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
.ax-menu-language-slot .ax-locale::after{
 content:"";position:absolute;inset-inline-end:16px;top:17px;
 width:7px;height:7px;border:solid currentColor;border-width:0 1.5px 1.5px 0;
 transform:rotate(45deg);pointer-events:none;
}
.ax-menu-language-slot .ax-locale .ax-locale__icon{width:20px;height:20px;flex:0 0 20px}
.ax-menu-language-slot .ax-locale select{
 -webkit-appearance:none;appearance:none;position:static;inset:auto;
 box-sizing:border-box;display:block;flex:1 1 0;min-width:0;width:0;max-width:100%;
 height:44px;min-height:44px;margin:0;padding:0;padding-inline-end:26px;
 opacity:1;border:0;border-radius:0;background:transparent;background-image:none;
 color:inherit;font:inherit;font-size:16px;line-height:normal;text-overflow:ellipsis;
 box-shadow:none!important;outline:none!important;
}
.ax-menu-language-slot .ax-locale:focus-within{outline:2px solid var(--ax-focus);outline-offset:2px}
.ax-menu-language-slot .ax-locale:hover{background:var(--ax-bg-card)}
.ax-menu-language-slot p{margin:0 2px 8px;font-size:12px;line-height:1.4}
