/* The bar's language menu (spec 121): a globe and the language's code, the seven languages in
   their own words under it */
.pm-lang { position: relative; }
.pm-lang__button { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .65rem; border-radius: 999px;
                   color: var(--pm-brand-ink, #111318); font-size: .85rem; font-weight: 700; cursor: pointer; list-style: none;
                   user-select: none; transition: background .15s; }
.pm-lang__button::-webkit-details-marker { display: none; }
.pm-lang__button:hover, .pm-lang[open] .pm-lang__button { background: rgba(17, 19, 24, .06); }
.pm-lang__button:focus-visible { outline: 2px solid var(--pm-brand-blue, #1a73e8); outline-offset: 2px; }
.pm-lang__code { letter-spacing: .02em; }
.pm-lang__menu { position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 1000; min-width: 12rem; margin: 0;
                 padding: .35rem; list-style: none; background: #fff; border: 1px solid #e3e6ee; border-radius: 14px;
                 box-shadow: 0 14px 34px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
                 animation: pm-lang-open .14s ease-out; }
@keyframes pm-lang-open { from { opacity: 0; transform: translateY(-4px); } }
.pm-lang__menu a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .7rem;
                   border-radius: 9px; color: var(--pm-brand-ink, #111318); text-decoration: none; font-size: .92rem; }
.pm-lang__menu a:hover, .pm-lang__menu a:focus-visible { background: #f2f5fb; outline: none; }
.pm-lang__menu a[aria-current] { background: #eaf1fe; color: var(--pm-brand-blue, #1a73e8); font-weight: 700; }
.pm-lang__tag { font-size: .7rem; font-weight: 700; color: #8a8f99; letter-spacing: .04em; }
.pm-lang__menu a[aria-current] .pm-lang__tag { color: inherit; }
@media (prefers-reduced-motion: reduce) { .pm-lang__menu { animation: none; } }

/* The theme's fonts have the Latin alphabet only: Arabic and Chinese in the system's own fonts */
html:lang(ar) body, html:lang(ar) button, html:lang(ar) input, html:lang(ar) select, html:lang(ar) textarea {
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Arial", sans-serif; }
html:lang(zh) body, html:lang(zh) button, html:lang(zh) input, html:lang(zh) select, html:lang(zh) textarea {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif; }

/* From right to left: what the page hides off its left edge goes off its right edge instead, else
   the page grows a scroll to the left */
html[dir="rtl"] .skip-link, html[dir="rtl"] .pm-trap, html[dir="rtl"] .pm-contact__trap { left: auto !important; right: -9999px; }
html[dir="rtl"] .skip-link:focus { right: 1rem; }

/* On the dark top bar, the menu's button is white like its neighbours */
.site-header .pm-lang__button { color: #fff; }
.site-header .pm-lang__button:hover, .site-header .pm-lang[open] .pm-lang__button { background: rgba(255, 255, 255, .14); }

/* From right to left, a tyre size, a plate or an e-mail keeps its own order: 205/55 R16, not R16 205/55 */
html[dir="rtl"] :is(.pm-offer__size, .pm-sheet__size, .pm-line__size, .pm-car__size, .pm-rim__sizes, .pm-chip, .pm-chip *,
  input[type="search"], input[type="text"], input[type="tel"], input[type="email"]) { unicode-bidi: plaintext; }
html[dir="rtl"] :is(.pm-offer__size, .pm-sheet__size, .pm-line__size, .pm-car__size, .pm-rim__sizes) { text-align: right; }

/* A legal page out of French: the text stays the French one, said above it */
.pm-legal__language { margin: 0 0 1.2rem; padding: .7rem .9rem; border-radius: 12px; background: #fff7e0; border: 1px solid #f3dd9a;
                      color: #5b4300; font-size: .92rem; }

/* The noise in decibels, read left to right in Arabic too: 71 dB */
html[dir="rtl"] :is(.pm-pill--noise, .pm-label__noise b) { direction: ltr; unicode-bidi: isolate; }

/* A narrow phone: the globe alone in the bar, the code is in the menu it opens */
@media (max-width: 480px) { .pm-lang__code { display: none; } .pm-lang__button { padding: .45rem .5rem; } }
