/*
  Stage 105.3C CLEAN — Menu Dropdown Text Alignment Uniformity
  Scope: navigation dropdown/flyout text alignment only.
  Built from confirmed Stage 105.3B.

  Purpose:
  - Keep the recovered dropdown readability from 105.3B.
  - Align dropdown/flyout menu item labels consistently to the left.
  - Preserve submenu arrows/chevrons on the right where the existing markup allows it.

  No page layout, route, popup, table, button action, app.js, API, or backend logic
  is changed by this CSS layer.
*/

:root {
  --ui1053c-menu-item-gap: 10px;
  --ui1053c-menu-item-pad-y: 9px;
  --ui1053c-menu-item-pad-x: 12px;
}

/* Dropdown panels should read left-to-right and never inherit accidental right alignment. */
#top-menu .stage831-dropdown,
.top-menu .stage831-dropdown,
#top-menu .stage831-dropdown-menu,
.top-menu .stage831-dropdown-menu,
#top-menu .stage831-submenu,
.top-menu .stage831-submenu {
  direction: ltr !important;
  text-align: left !important;
}

/* Menu labels/items: left aligned, predictable spacing, full-row hit area. */
#top-menu .stage831-sub-link,
.top-menu .stage831-sub-link,
#top-menu .stage831-dropdown a,
.top-menu .stage831-dropdown a,
#top-menu .stage831-dropdown button,
.top-menu .stage831-dropdown button {
  direction: ltr !important;
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: var(--ui1053c-menu-item-gap) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: var(--ui1053c-menu-item-pad-y) var(--ui1053c-menu-item-pad-x) !important;
  white-space: nowrap !important;
}

/* When existing items use inner spans/labels, keep the readable label at the left. */
#top-menu .stage831-sub-link span,
#top-menu .stage831-sub-link label,
#top-menu .stage831-sub-link strong,
.top-menu .stage831-sub-link span,
.top-menu .stage831-sub-link label,
.top-menu .stage831-sub-link strong,
#top-menu .stage831-dropdown a span,
#top-menu .stage831-dropdown button span,
.top-menu .stage831-dropdown a span,
.top-menu .stage831-dropdown button span {
  text-align: left !important;
}

/* Preserve any existing submenu indicator at the far right without forcing the whole label right. */
#top-menu .stage831-sub-link .stage831-caret,
#top-menu .stage831-sub-link .stage831-arrow,
#top-menu .stage831-sub-link .stage831-chevron,
#top-menu .stage831-sub-link [class*="caret"],
#top-menu .stage831-sub-link [class*="arrow"],
#top-menu .stage831-sub-link [class*="chevron"],
.top-menu .stage831-sub-link .stage831-caret,
.top-menu .stage831-sub-link .stage831-arrow,
.top-menu .stage831-sub-link .stage831-chevron,
.top-menu .stage831-sub-link [class*="caret"],
.top-menu .stage831-sub-link [class*="arrow"],
.top-menu .stage831-sub-link [class*="chevron"] {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  text-align: right !important;
}

/* Dots/icons stay subtle and aligned at the start of the row. */
#top-menu .stage831-sub-link::before,
.top-menu .stage831-sub-link::before,
#top-menu .stage831-dropdown a::before,
.top-menu .stage831-dropdown a::before,
#top-menu .stage831-dropdown button::before,
.top-menu .stage831-dropdown button::before {
  flex: 0 0 auto !important;
}

/* Keep the small flyout heading left aligned too. */
#top-menu .stage831-menu-title,
#top-menu .stage831-dropdown-title,
#top-menu .stage831-section-title,
.top-menu .stage831-menu-title,
.top-menu .stage831-dropdown-title,
.top-menu .stage831-section-title {
  text-align: left !important;
  direction: ltr !important;
}
