/* Language picker, right-to-left layouts and per-script typography (see app/Support/I18n). */

/* ---------------------------------------------------------------- picker */
.lp { position: relative; margin-inline-end: 14px; font-family: "Inter", ui-sans-serif, system-ui, sans-serif; z-index: 40; }
@media (min-width: 1024px) {
  #header .lp { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }
  [dir="rtl"] #header .lp { right: auto; left: 0; }
  [dir="rtl"] #header .site-logo { left: auto; right: 0; }
}
/* 1024-1279px: the menu sits centred in a 768px header between the logo and the picker; translated
   menus are wider (up to ~720px), so on translated pages the header takes the page width there. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  html:not([lang="en"]) #header > div { max-width: min(calc(100% - 48px), 64rem); }
}
.lp-btn { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  user-select: none; white-space: nowrap; }
.lp-btn::-webkit-details-marker { display: none; }
.lp-btn:hover, .lp[open] .lp-btn { background: rgba(255,255,255,.13); }
.lp-btn svg { width: 18px; height: 18px; flex: none; }
.lp-btn:focus-visible { outline: 2px solid #fdfe65; outline-offset: 2px; }
.lp-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; margin: 0; padding: 8px; list-style: none; width: min(92vw, 300px);
  max-height: min(70vh, 560px); overflow-y: auto; background: #1a1a1a; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.1);
  display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 640px) { .lp-list { width: 440px; grid-template-columns: 1fr 1fr; } }
.lp-list a { display: block; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.86); text-decoration: none; font-size: 15px; line-height: 1.3; text-align: start; }
.lp-list a:hover, .lp-list a:focus-visible { background: rgba(255,255,255,.08); color: #fff; outline: none; }
.lp-list a[aria-current="true"] { background: #fdfe65; color: #0d0d0d; font-weight: 600; }

/* ---------------------------------------------------------------- right-to-left (Arabic, Persian) */
[dir="rtl"] .ad-list li { padding-left: 0; padding-right: 32px; }
[dir="rtl"] .ad-list li::before { left: auto; right: 0; }
[dir="rtl"] .ad-faq summary { padding: 20px 22px 20px 56px; }
[dir="rtl"] .ad-faq summary::after { right: auto; left: 22px; }
[dir="rtl"] .ad-lessons li span { margin-left: 0; margin-right: auto; }
[dir="rtl"] .ad-prose ul, [dir="rtl"] .ad-prose ol { padding-left: 0; padding-right: 1.4em; }
[dir="rtl"] .ad-prose blockquote { border-left: 0; border-right: 3px solid var(--ad-accent); padding: 4px 20px 4px 0; }
[dir="rtl"] .ad-hero-art .ad-float { right: auto; left: -14px; }
[dir="rtl"] .ad-inline-form .ad-input { padding-left: 16px; padding-right: 20px; }
[dir="rtl"] .ad-table th, [dir="rtl"] .ad-table td { text-align: right; }
[dir="rtl"] .ad-store { padding: 8px 18px 8px 22px; }
[dir="rtl"] .ad-select { background-position: left 14px center; }
/* Number-only stat values stay untranslated; in right-to-left text ".000" would show as "000.". */
[dir="rtl"] .ad-stat b { direction: ltr; text-align: right; }
[dir="rtl"] .navigation { text-align: center; }
@media (min-width: 1024px) { [dir="rtl"] .navigation { text-align: right; } }

/* ---------------------------------------------------------------- scripts that need more room */
/* Letter spacing breaks Arabic joining and crowds Thai, Devanagari and CJK. */
:lang(ar) *, :lang(fa) *, :lang(th) *, :lang(hi) *, :lang(zh) *, :lang(ja) *, :lang(ko) * { letter-spacing: 0 !important; }
/* Tall marks above and below the line (Thai, Devanagari, Arabic) and stacked Vietnamese accents. */
:lang(th) .ad-h1, :lang(th) .ad-h2, :lang(hi) .ad-h1, :lang(hi) .ad-h2,
:lang(ar) .ad-h1, :lang(ar) .ad-h2, :lang(fa) .ad-h1, :lang(fa) .ad-h2 { line-height: 1.32; }
:lang(vi) .ad-h1, :lang(vi) .ad-h2 { line-height: 1.18; }
:lang(zh) .ad-h1, :lang(zh) .ad-h2, :lang(ja) .ad-h1, :lang(ja) .ad-h2, :lang(ko) .ad-h1, :lang(ko) .ad-h2 { line-height: 1.2; }
:lang(th) .ad-h3, :lang(hi) .ad-h3, :lang(ar) .ad-h3, :lang(fa) .ad-h3 { line-height: 1.4; }
:lang(th) #hero h1, :lang(hi) #hero h1, :lang(ar) #hero h1, :lang(fa) #hero h1, :lang(vi) #hero h1 { line-height: 1.35; }
:lang(th) .ad-prose, :lang(hi) .ad-prose { line-height: 1.9; }
/* Headings break between phrases (Japanese, Chrome 119+) or at spaces (Korean), not inside a word. */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { word-break: keep-all; }
/* Long compound words (German, Dutch...) in the big headings of translated pages. */
html:not([lang="en"]) .ad-h1, html:not([lang="en"]) .ad-h2,
html:not([lang="en"]) h1, html:not([lang="en"]) h2, html:not([lang="en"]) h3 { overflow-wrap: break-word; hyphens: auto; }
/* Home page on phones: the hero's second line ("Mobile [icon] Apps") may wrap, and the 48px uppercase
   section headings come down to 36px, where words like FONDAMENTALES or MÜŞTERİLERİMİZDEN fit. */
html:not([lang="en"]) #hero h1 > span { flex-wrap: wrap; justify-content: center; }
@media (max-width: 639.98px) {
  html:not([lang="en"]) h2.text-5xl { font-size: 2.25rem; line-height: 1.15; }
}
/* Footer links in two narrow columns: Datenschutzerklärung, Политика конфиденциальности. */
html:not([lang="en"]) footer .navigation a { overflow-wrap: anywhere; hyphens: auto; }

/* ---------------------------------------------------------------- translated legal pages */
.i18n-legal-note { margin: 0 0 28px; padding: 14px 18px; border-radius: 14px; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.75); background: rgba(253,254,101,.08); box-shadow: inset 0 0 0 1px rgba(253,254,101,.25); }
