/* The in-page language picker (site-i18n.js) and the pre-paint hold while a catalog loads. */
html.si-wait body { visibility: hidden; }

.si-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin: 0;
  padding: 0 4px 0 9px;
  border: 1px solid #434766;
  border-radius: 10px;
  color: #c9cce6;
  background: rgba(21, 25, 46, 0.72);
  line-height: 1;
}
.si-lang:hover { border-color: #6b7194; color: #fff; }
.si-lang:focus-within { outline: 2px solid #a78bfa; outline-offset: 2px; }
.si-lang svg { flex-shrink: 0; }
.si-lang select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  max-width: 11.5rem;
  padding: 0 22px 0 2px;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c9cce6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.si-lang select:focus { outline: none; }
.si-lang option { color: #1c2040; background: #fff; }

/* A page without a nav slot keeps a visible, reachable switch. */
.si-lang-float { position: fixed; z-index: 60; right: 14px; bottom: 14px; }

@media (max-width: 560px) {
  .si-lang select { max-width: 4.4rem; padding-right: 18px; font-size: 12px; text-overflow: ellipsis; }
  .si-lang { gap: 3px; padding: 0 2px 0 6px; }
  .si-lang svg { display: none; }
  .si-lang select { max-width: 3.4rem; padding-left: 4px; }
}
/* On a phone the install button gives way (wraps to two lines) instead of being pushed off the screen by a long label. */
@media (max-width: 480px) {
  html body .nav-links .btn-install { white-space: normal; flex-shrink: 1; min-width: 0; max-width: 8.5rem; line-height: 1.15; text-align: center; justify-content: center; padding: 8px 10px; }
  html body .nav-links { min-width: 0; gap: 8px; }
}
/* Narrow phones: the picker joins the site bar, so below 371px the bar gets tighter, and below 360px the install label may take
   two lines instead of pushing the page sideways. The selectors outrank the per-page nav rules (home, guide, lifecycle). */
@media (max-width: 370px) {
  html body .nav-inner { padding-inline: 12px; }
  html body .nav-inner a.nav-brand { font-size: 11px; gap: 5px; }
  html body .nav-inner a.nav-brand img { width: 20px; height: 20px; }
  html body .nav-inner .nav-links { gap: 6px; }
  html body .nav-inner .nav-links a.btn-install { padding: 9px 8px; font-size: 11px; gap: 4px; }
}
@media (max-width: 359px) {
  html body .nav-inner .nav-links a.btn-install { white-space: normal; flex-shrink: 1; min-width: 0; line-height: 1.15; text-align: center; justify-content: center; }
}
