/* Keep anchors below the fixed site header, including the signed-in toolbar. */
html { scroll-padding-top: 145px; }
html:has(body.admin-bar) { scroll-padding-top: 177px; }
@media(max-width:1080px) {
  html { scroll-padding-top: 88px; }
  html:has(body.admin-bar) { scroll-padding-top: 134px; }
}
/* Keep Latin contact details in reading order on Arabic pages. */
html[dir="rtl"] a[href^="tel:"], html[dir="rtl"] a[href^="mailto:"] {
  direction:ltr; unicode-bidi:isolate; display:inline-block;
}
/* Arabic moves the logo right and the menu left. Mirror the floating selector. */
@media(max-width:600px) {
  html[dir="rtl"] .trp-language-switcher.trp-floating-switcher {
    --left:84px !important; --right:auto !important;
    left:84px !important; right:auto !important;
  }
}
@media(max-width:380px) {
  html[dir="rtl"] .trp-floating-switcher .trp-switcher-dropdown-list {left:0;right:auto;}
}
/* Reserve the rightmost touch target for the mobile menu. */
@media(max-width:600px) {
  .trp-language-switcher.trp-floating-switcher {
    --right: 84px !important;
    --top: 8px !important;
    --switcher-width: 105px !important;
    --font-size: 13px !important;
    --switcher-padding: 9px 0 !important;
    right:84px !important;
    left:auto !important;
    max-width:105px;
  }
  body.admin-bar .trp-language-switcher.trp-floating-switcher { --top:54px !important; }
}
@media(max-width:380px) {
  .trp-language-switcher.trp-floating-switcher { --switcher-width:54px !important; max-width:54px; }
  .trp-floating-switcher .trp-language-item__current .trp-language-item-name { display:none; }
  .trp-floating-switcher .trp-switcher-dropdown-list { width:130px; right:0; left:auto; }
}
