/* Language selector + RTL helpers */
.i18n-lang {
  position: relative;
  z-index: 60;
}
.i18n-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(21, 26, 29, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: #151A1D;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.i18n-lang-toggle:hover {
  background: rgba(245, 247, 248, 0.95);
}
.i18n-lang-code {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.i18n-lang-label {
  display: none;
  font-weight: 500;
}
.i18n-lang-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.55;
  flex-shrink: 0;
}
.i18n-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 196px;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(21, 26, 29, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 80;
}
.i18n-lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #151A1D;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.i18n-lang-option:hover {
  background: rgba(5, 0, 255, 0.06);
}
.i18n-lang-option.is-active {
  background: rgba(5, 0, 255, 0.1);
  color: #0500FF;
  font-weight: 600;
}
.i18n-lang-region {
  width: 28px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7A8490;
}
.i18n-lang-option.is-active .i18n-lang-region {
  color: #0500FF;
}

@media (min-width: 640px) {
  .i18n-lang-toggle {
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .i18n-lang-label { display: inline; }
  .i18n-lang-chevron { width: 14px; height: 14px; }
}

/* RTL layout polish */
html[dir="rtl"] .i18n-lang-menu { right: auto; left: 0; }
html[dir="rtl"] .i18n-lang-option { text-align: right; }
html[dir="rtl"] .i18n-lang-toggle { flex-direction: row-reverse; }
html[dir="rtl"] .pp-back { flex-direction: row-reverse; }
html[dir="rtl"] .pp-header-inner { direction: rtl; }
html[dir="rtl"] .st-service { flex-direction: row-reverse; }
html[dir="rtl"] .ct-card,
html[dir="rtl"] .ct-office,
html[dir="rtl"] .sc-bounty,
html[dir="rtl"] .st-incident { flex-direction: row-reverse; }
html[dir="rtl"] .hc-card,
html[dir="rtl"] .sc-card { text-align: right; }
html[dir="rtl"] .pp-main,
html[dir="rtl"] .pp-title,
html[dir="rtl"] .pp-updated,
html[dir="rtl"] .pp-intro { text-align: right; }
html[dir="rtl"] .st-banner { text-align: center; }
html[dir="rtl"] .icm-option { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .icm-summary-row { flex-direction: row-reverse; }
.pp-lang-slot {
  display: inline-flex;
  align-items: center;
  margin-inline-end: 8px;
}
.pp-header-inner .pp-lang-slot {
  margin-inline-start: auto;
}
@media (max-width: 640px) {
  .pp-lang-slot .i18n-lang-label { display: none; }
}

.pp-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}
