/* Blocksy owns markup, placement, typography and colours. Its inline language
 * control has no minimum target-size or no-wrap setting. Scope this exception
 * to that one item. The desktop order bridges existing legacy header orders;
 * remove it when that older header CSS is migrated to native placements.
 */
#header [data-id="language-switcher"] {
  flex: 0 0 auto;
}

#header [data-id="language-switcher"] .ct-language {
  flex-wrap: nowrap;
}

#header [data-id="language-switcher"] a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

#header [data-id="language-switcher"] a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

#header [data-id="language-switcher"] .current-lang a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

#header [data-device="desktop"] [data-id="language-switcher"] {
  order: 4;
}

/* MIGRATION_OPEN: the existing mobile header uses absolute legacy positions.
 * Reuse the former search slot without changing logo/cart/trigger geometry.
 * Move ownership back to native rows when that legacy header CSS is retired.
 */
@media (max-width: 1199px) {
  #header [data-device="mobile"] [data-row="middle"] [data-id="nvgMob"] {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 44.8px;
    margin: 0;
    z-index: 3;
  }

  #header [data-id="nvgMob"] .ct-active-language,
  #header [data-id="nvgMob"] a {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  #header [data-id="nvgMob"] :is(.ct-active-language, a):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
  }
}
