/* Shapes Infinity - the EN / عربي switch on ENGLISH pages that have an Arabic twin (/ar/).
   Section 3 of marketing/arabic/ar.css (the twins load ar.css instead), with system Arabic fonts
   for «عربي» so the 124 KB Kufi web font never downloads on an English page. Linked after
   playground.css, whose old .lang-switch rules it must win. Written by tools-local/ar_build.py
   link-english (marketing/arabic/launch/english-pages.md 1c). */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-sizing: border-box; height: 34px; padding: 0 11px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 7, 13, 0.78);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: rgba(242, 240, 250, 0.6); text-decoration: none; direction: ltr;
  font: 500 11px/1 "General Sans", "Inter", sans-serif; letter-spacing: 0.06em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lang-switch:hover { border-color: rgba(255, 107, 0, 0.6); box-shadow: 0 0 18px rgba(255, 107, 0, 0.25); color: rgba(242, 240, 250, 0.85); }
.lang-switch:focus-visible { outline: 2px solid var(--orange, #ff6b00); outline-offset: 3px; }
.lang-switch .ls-opt.is-on { color: var(--orange, #ff6b00); font-weight: 700; }
.lang-switch .ls-ar { font: 700 12.5px/1 "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Kufi Arabic", sans-serif; letter-spacing: 0; padding-bottom: 2px; }
.lang-switch .ls-track {
  position: relative; flex: 0 0 auto; width: 26px; height: 15px; border-radius: 999px;
  background: rgba(255, 107, 0, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.5);
}
.lang-switch .ls-knob {
  position: absolute; top: 2.5px; right: 2.5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange, #ff6b00); box-shadow: 0 0 8px rgba(255, 107, 0, 0.65);
}
/* computer: in the menu rail, just above "Start a project"; it takes the free space that
   pinned that button to the bottom, so the button and the social box do not move */
@media (min-width: 1100px) {
  .lang-switch--top { display: none; }
  .chip-rail > .lang-switch--rail { flex: 0 0 auto; width: 100%; margin-top: auto; }
  .chip-rail > .lang-switch--rail + .chip--cta { margin-top: 0; }
}
/* phone and tablet: in the top row, opposite the logo; the chip row below is untouched */
@media (max-width: 1099px) {
  .lang-switch--rail { display: none; }
  /* physical sides: the switch itself is left to right, so inset-inline-* would follow it,
     not the page */
  .lang-switch--top { position: absolute; top: 30px; z-index: 91; }
  html.ar-mirrored .lang-switch--top { left: 16px; }
  html.ar-same .lang-switch--top { right: 16px; }
}
@media (max-width: 599px) {
  .lang-switch--top { top: 26px; }
}
/* short computer screens: the switch adds about 40px to the rail. playground.css tightens the rail
   at 760px and 640px of screen height; with the switch the same two steps start 40px earlier, so
   "Start a project" and the social box are never cut (at 1366x768 the social box lost 4px). The social
   box keeps its own later playground.css sizes, so it is left out. */
@media (min-width: 1100px) and (max-height: 800px) {
  .chip-rail { gap: 8px; }
  .chip-rail > .chip:not(.chip-socials) { min-height: 44px; padding: 9px 12px; }
}
@media (min-width: 1100px) and (max-height: 690px) {
  .chip-rail { gap: 6px; }
  .chip-rail > .chip:not(.chip-socials) { min-height: 40px; padding: 7px 11px; font-size: 0.68rem; }
}
/* English page: EN is the active side, the knob sits under EN (left), and on phones the switch sits
   opposite the logo (right) */
html[lang="en"] .lang-switch .ls-knob { right: auto; left: 2.5px; }
@media (max-width: 1099px) { html[lang="en"] .lang-switch--top { right: 16px; } }
