/* Priority navigation for the header tab strip — companion to
   javascripts/nav-overflow.js: overflowing tabs collapse into a "More"
   dropdown instead of being silently clipped. Loaded AFTER extra.css (see
   mkdocs.yml). */

/* The tab area anchors the dropdown and must let it escape; the LIST clips
   instead, so a too-wide row never pushes search/palette out of the header. */
.md-header__inner .md-tabs {
  position: relative;
  overflow: visible;        /* Material sets overflow:auto */
  min-width: 0;             /* let the flex item shrink below its content */
}
.md-header__inner .md-tabs__list {
  overflow: hidden;         /* clip the measured-away tail (pre-JS, mobile) */
  min-width: 0;
  width: 100%;
}

/* "More" trigger — styled like a tab link. */
.md-tabs__more { margin: 0 4px; }
.md-tabs__more[hidden] { display: none; }
.md-tabs__more-btn {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 21px;
  color: inherit;
  padding: 0;
  white-space: nowrap;
}
.md-tabs__more-btn:hover { color: var(--xt-secondary); }
.md-tabs__more-chevron { transition: transform .15s ease; flex: none; }
.md-tabs__more--open .md-tabs__more-chevron { transform: rotate(180deg); }
/* Active page hidden inside the dropdown → mark the trigger. */
.md-tabs__more--active .md-tabs__more-btn {
  color: var(--xt-secondary);
  font-weight: 600;
}

/* Dropdown panel — a small card anchored under the right end of the row. */
.md-tabs__more-list {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  min-width: 11rem;
  margin: .2rem 0 0;
  padding: .3rem 0;
  list-style: none;
  background: var(--md-default-bg-color, #ffffff);
  border: 1px solid rgba(13, 24, 40, .12);
  border-radius: .3rem;
  box-shadow: 0 4px 16px rgba(13, 24, 40, .18);
}
[data-md-color-scheme="slate"] .md-tabs__more-list {
  background: #141f2d;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.md-tabs__more-list[hidden] { display: none; }

/* Items inside the dropdown stack vertically. */
.md-tabs__more-list .md-tabs__item {
  display: block;
  height: auto;
  margin: 0;
  padding: 0;
}
.md-tabs__more-list .md-tabs__link {
  display: block;
  margin: 0;
  padding: .5rem 1rem;
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 1;
}
.md-tabs__more-list .md-tabs__link:hover {
  background: var(--xt-primary-light, rgba(4, 82, 163, .08));
  color: var(--xt-secondary);
}
[data-md-color-scheme="slate"] .md-tabs__more-list .md-tabs__link:hover {
  background: #1a2940;
}
/* Active item inside the dropdown keeps the brand highlight, without the
   underline the tab row draws (extra.css). */
.md-tabs__more-list .md-tabs__item--active > .md-tabs__link {
  color: var(--xt-secondary);
  font-weight: 600;
}
.md-tabs__more-list .md-tabs__link::after {
  display: none;
}
