/* Pigee Courier: language switch, Arabic font and right-to-left helpers (1.83.0).
   Loaded on every page the plugin prints. The page's own -rtl.css mirrors
   its layout when Arabic is shown; this file only adds what every page
   shares. */

/* IBM Plex Sans Arabic (SIL Open Font Licence, portal/assets/fonts/IBMPlexSansArabic-OFL.txt).
   Only Arabic letters use it; Latin text stays in Inter. If the files are
   missing the browser falls back to the system's Arabic font. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: local("IBM Plex Sans Arabic"), local("IBMPlexSansArabic-Regular"), url("assets/fonts/ibm-plex-sans-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500 600; font-display: swap; src: local("IBM Plex Sans Arabic SemiBold"), local("IBMPlexSansArabic-SemiBold"), url("assets/fonts/ibm-plex-sans-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700 900; font-display: swap; src: local("IBM Plex Sans Arabic Bold"), local("IBMPlexSansArabic-Bold"), url("assets/fonts/ibm-plex-sans-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

html[lang="ar"] body,
html[lang="ar"] body *:not(code):not(pre):not(kbd):not(samp):not(.pcr-mono) {
	font-family: "Inter", "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif !important;
	letter-spacing: normal !important;
}
/* Arabic reads better a little larger and with more line height. */
html[lang="ar"] body { line-height: 1.6; }

/* Numbers, phone numbers, prices and codes stay left to right. */
html[lang="ar"] bdi[dir="ltr"],
html[lang="ar"] .pcr-price,
html[lang="ar"] input[type="tel"],
html[lang="ar"] input[type="email"],
html[lang="ar"] input[type="url"],
html[lang="ar"] input[type="number"],
html[lang="ar"] input[inputmode="numeric"],
html[lang="ar"] input[inputmode="tel"],
html[lang="ar"] input[dir="ltr"],
html[lang="ar"] input[name*="phone" i],
html[lang="ar"] input[name*="email" i],
html[lang="ar"] input[name*="mpesa" i],
html[lang="ar"] input[name*="short_address" i] { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] input[type="tel"],
html[lang="ar"] input[type="email"],
html[lang="ar"] input[type="url"],
html[lang="ar"] input[type="number"],
html[lang="ar"] input[name*="phone" i],
html[lang="ar"] input[name*="email" i],
html[lang="ar"] input[name*="mpesa" i],
html[lang="ar"] input[name*="short_address" i] { text-align: right; }

/* Only directional icons flip (arrows and chevrons), never logos or photos. */
html[dir="rtl"] .pcr-ico-dir,
html[dir="rtl"] [data-dir-icon],
html[dir="rtl"] .pw-arrow,
html[dir="rtl"] .pcr-chev,
html[dir="rtl"] .dp-chev,
html[dir="rtl"] .cl-chev { transform: scaleX(-1); }

/* The English / العربية switch. */
.pcr-lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(10, 27, 58, .06); border: 1px solid rgba(10, 27, 58, .12); font: 600 12px/1 "Inter", "IBM Plex Sans Arabic", Tahoma, sans-serif; vertical-align: middle; z-index: 99990; }
.pcr-lang-switch button { appearance: none; border: 0; background: transparent; color: #0A1B3A; padding: 6px 10px; border-radius: 999px; cursor: pointer; font: inherit; line-height: 1; min-height: 28px; }
.pcr-lang-switch button[aria-pressed="true"] { background: #0A1B3A; color: #fff; }
.pcr-lang-switch button:focus-visible { outline: 2px solid #0D74E0; outline-offset: 2px; }
.pcr-lang-switch button:disabled { opacity: .45; cursor: default; }
.pcr-lang-switch button[lang="ar"] { font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif !important; font-size: 13px; }
.pcr-lang-switch.is-inline { margin-inline-start: auto; flex: 0 0 auto; }
/* At the top of a card (track lookup, rating): its own row, at the end. */
.pcr-lang-switch.is-top { display: flex; width: max-content; margin: 0 0 14px auto; margin-inline-start: auto; margin-inline-end: 0; }
/* In a sign-in card: its own row under the form. */
.pcr-auth-card > .pcr-lang-switch, .dp-auth-card > .pcr-lang-switch, .cl-auth-card > .pcr-lang-switch { display: flex; width: max-content; margin: 14px auto 0; }
/* On dark top bars (widget, tracking, driver portal and round). */
.pcr-lang-switch.on-dark { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }
.pcr-lang-switch.on-dark button { color: #fff; }
.pcr-lang-switch.on-dark button[aria-pressed="true"] { background: #fff; color: #0A1B3A; }
/* The tracking page's top bar: name on one side, switch on the other. */
.t-head:has(> .pcr-lang-switch) { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Tight top bars on phones: only the other language is offered (one button). */
@media (max-width: 760px) {
	.pcr-lang-switch button { padding: 6px 10px; }
	.pcr-lang-switch.is-inline button[aria-pressed="true"] { display: none; }
}
@media print { .pcr-lang-switch { display: none !important; } }
