/* Shared by every public page: the language menu, right-to-left languages, legal documents (T21, T33). */

/* Language menu in the header: plain links to the same page in each language. */
.langsw { position: relative; font-size: 14px; color: var(--fg2, #555); }
.langsw > summary { list-style: none; cursor: pointer; padding: 6px 4px; min-height: 24px; user-select: none; }
.langsw > summary::-webkit-details-marker { display: none; }
.langsw > summary::after { content: ""; display: inline-block; margin-inline-start: 6px; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -2px; }
.langsw ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 60; margin: 0; padding: 6px; list-style: none;
  background: var(--bg, #fff); border: 1px solid var(--line, #e4e4e7); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08);
  max-height: 70vh; overflow: auto; min-width: 200px; }
.langsw li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--fg, #111); white-space: nowrap; text-align: start; }
.langsw li a:hover, .langsw li a[aria-current] { background: var(--bg2, #f4f4f5); }
.langsw li a[aria-current] { font-weight: 600; }

/* Footer: company and addresses. */
.foot-co { margin-top: 10px; line-height: 1.6; font-size: 13px; color: var(--fg3, #8a8a8a); }
.foot-co a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Legal documents rendered from Markdown. */
.doc.legal h1 { margin-bottom: 12px; }
.doc.legal h2 { margin-top: 32px; }
.doc.legal h3 { margin-top: 22px; }
.doc.legal p, .doc.legal li { line-height: 1.65; }
.doc.legal ul, .doc.legal ol { padding-inline-start: 22px; }
.doc.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; display: block; overflow-x: auto; }
.doc.legal th, .doc.legal td { border: 1px solid var(--line, #e4e4e7); padding: 8px 10px; text-align: start; vertical-align: top; }
.legal-note { padding: 10px 14px; border-radius: 10px; background: var(--bg2, #f4f4f5); font-size: 14px; margin-bottom: 18px; }

/* Right-to-left languages (ar, fa): Persian/Arabic font, text from the start side, mirrored arrows.
   Codes, prices, plan names, IP addresses and commands stay left-to-right. */
[dir="rtl"] body { font-family: "Vazirmatn", var(--sans, system-ui), sans-serif; }
[dir="rtl"] body, [dir="rtl"] p, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] li, [dir="rtl"] td, [dir="rtl"] th { text-align: start; }
[dir="rtl"] code, [dir="rtl"] pre, [dir="rtl"] kbd, [dir="rtl"] samp, [dir="rtl"] .mono, [dir="rtl"] input, [dir="rtl"] textarea,
[dir="rtl"] .tab, [dir="rtl"] number-flow, [dir="rtl"] .code, [dir="rtl"] .srv-ip, [dir="rtl"] .ctab-r code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] pre, [dir="rtl"] code { text-align: left; }
[dir="rtl"] b, [dir="rtl"] .big, [dir="rtl"] .v, [dir="rtl"] .total { unicode-bidi: isolate; }
[dir="rtl"] .go::after, [dir="rtl"] .arrow, [dir="rtl"] [data-dir-mirror] { transform: scaleX(-1); display: inline-block; }
[dir="rtl"] .nav, [dir="rtl"] .act, [dir="rtl"] .row2 { direction: rtl; }
[dir="rtl"] .ckb { direction: rtl; }
