/* patch 10: keep the secondary nav on ONE line at common desktop widths.
   .wrap is max-width 1180px with 18px side padding, so the nav is ~1144px
   at every viewport from 1280px up (1280, 1366, 1440, 1920). Patch 6 let the
   pills wrap so News was never clipped, but that dropped News onto a second
   line. These rules tighten padding, gap and type, hide the emoji icons, and
   keep a single nowrap row. Below 1280px the tidy wrap from patch 6 stays.
   If a long translation still overflows at desktop, a fade + arrow hint
   (toggled by p10-navfit.js) shows that the row scrolls. */

@media (min-width: 1280px) {
  .secnav-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
    padding: 4px 0;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .secnav-scroll::-webkit-scrollbar { display: none; }
  .secnav a {
    padding: 5px 8px;
    font-size: .8rem;
    letter-spacing: -.01em;
  }
  .secnav a > span[aria-hidden="true"] { display: none; }
  /* Slightly tighter type on languages whose nav labels run long. */
  html[lang="ar"] .secnav a,
  html[lang="ru"] .secnav a,
  html[lang="az"] .secnav a,
  html[lang="fa"] .secnav a,
  html[lang="he"] .secnav a,
  html[lang="es"] .secnav a,
  html[lang="fr"] .secnav a,
  html[lang="it"] .secnav a {
    font-size: .74rem;
    padding: 5px 6px;
  }
}

/* Overflow hint: a fade and a chevron on the overflowing end. Hidden unless
   .secnav-overflow is set. Uses the header's white background. */
.secnav { position: relative; }
.secnav.secnav-overflow::after,
.secnav.secnav-overflow::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s ease;
}
.secnav.secnav-overflow::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, #fff 8%, rgba(255,255,255,0));
  opacity: 1;
}
[dir="rtl"] .secnav.secnav-overflow::after {
  background: linear-gradient(to right, #fff 8%, rgba(255,255,255,0));
}
.secnav.secnav-overflow-start::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, #fff 8%, rgba(255,255,255,0));
  opacity: 1;
}
[dir="rtl"] .secnav.secnav-overflow-start::before {
  background: linear-gradient(to left, #fff 8%, rgba(255,255,255,0));
}
.secnav.secnav-overflow::after {
  /* chevron hinted via a second layer on the fade */
}
.secnav.secnav-overflow > .secnav-hint {
  display: flex;
}
.secnav-hint {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--ink2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(35,38,43,.08);
  font-size: 13px;
  line-height: 1;
}
[dir="rtl"] .secnav-hint { transform: translateY(-50%) scaleX(-1); }
