/* Rise of Legends v2.20.125 — Dropdown horizontal-scroll fix.
   Deliberately scoped to the public cinematic navigation.
   Retains v2.20.124 hover/click/keyboard behavior, labels and colors. */

/* A scrollable Y axis in v123 implicitly made X auto. An unnecessary
   horizontal scrollbar could become visible at browser zoom levels or
   with longer translations. Only vertical scrolling is allowed here. */
body[data-design="legends-120"] .main-nav .nav-dropdown-menu {
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: calc(100vw - 32px);
}

/* Children must fit the panel's content box, even with translated strings.
   Do not increase the fixed menu width or affect the hover bridge. */
body[data-design="legends-120"] .main-nav .nav-dropdown-menu > a,
body[data-design="legends-120"] .main-nav .nav-dropdown-menu > a > span {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}
body[data-design="legends-120"] .main-nav .nav-dropdown-menu strong,
body[data-design="legends-120"] .main-nav .nav-dropdown-menu small {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* On phones, the submenu is already in the stacked navigation; it should
   size to its contents instead of creating a nested scroll container. */
@media (max-width: 900px) {
    body[data-design="legends-120"] .main-nav .nav-dropdown-menu {
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100%;
    }
}
