/* Shared mobile header & menu alignment.
 * Linked at the end of <head> on every page with the site header, so it takes
 * precedence over each page's own styles.
 */

/* Mobile menu button: a two-line icon that folds into an X while the menu is
   open (the lines meet in the middle, then cross). /scripts/menu-icon.js plays
   the animation whenever the page's own script toggles #menu-button.active.
   Size and colour come from the other header icons (lang-switch.css: 34px
   button, 20px icon); only Apple-style thin 1.2 lines are set here. */
#menu-button {
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

#menu-button .menu-icon {
    display: block;
    overflow: visible;
}

#menu-button .menu-icon-line {
    stroke-width: 1.2;
}

#menu-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

@media (max-width: 767px) {
    /* Full-screen menu: tabs centred. Some pages carried leftover rules
       (padding-left: 2.5rem; text-align: left) that pushed the list off-centre. */
    #mobile-menu {
        padding-left: 0 !important;
        padding-right: 0 !important;
        align-items: center !important;
    }

    #mobile-menu ul {
        align-items: center !important;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }

    #mobile-menu li,
    #mobile-menu a {
        text-align: center !important;
    }
}

@media (max-width: 1023px) {
    /* Slide-in menus on the account and automation pages: same centred tabs. */
    #mobile-sidebar a {
        text-align: center;
    }
}
