/* topbar-ellipsis.css — keep topbar headings from pushing icons off-screen */
.topbar .topbar-inner{
  display: flex !important;
}

/* Make the title area flexible but shrinkable */
.topbar .topbar-inner .title{
  flex: 1 1 auto !important;
  min-width: 0 !important;           /* allow flexbox to shrink below content width */
  overflow: hidden !important;       /* hide overflow so ellipsis can show */
}

/* Two-row title variant from title-subonly.js */
.topbar .topbar-inner .title.two-row{
  overflow: hidden !important;
}

/* Ensure each line in the two-row title truncates with ellipsis */
.topbar .topbar-inner .title.two-row .title-main,
.topbar .topbar-inner .title.two-row .title-sub{
  display: block;
  white-space: nowrap;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0;
}

/* Dictionary: allow a clickable link on the second line (no-wrap is fine, but keep underline) */
.topbar.dict-mode .topbar-inner .title.two-row .title-sub a{
  text-decoration: underline;
  color: inherit;
}

/* Generic: prevent any child of .title from forcing width */
.topbar .topbar-inner .title > *{
  min-width: 0;
}

/* Keep icon group from shrinking instead of the title */
.topbar .topbar-inner .icons{
  flex: 0 0 auto !important;
}
