/* ClashRZ portal: language switch and Arabic (RTL) presentation (portal-i18n.js). */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

.crz-portal-lang {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 10px;
  position: relative;
  z-index: 3;
}

/* The switch is inserted as the first child of the .crz-layout grid: as a grid item it took a cell and pushed the
   brand, the navigation and the main panel down, so on desktop the whole register / login panel fell into the 175 px
   sidebar column (form 44 px wide, Arabic wrapping word by word). It is not a grid item: pinned to the top corner on
   wide screens, its own full-width row on narrow ones (GD P0 2026-10-21). */
.crz-layout > .crz-portal-lang {
  position: absolute;
  top: 24px;
  inset-inline-end: 32px;
  margin: 0;
}
/* The page's min-height stretched the main row: on Login the gold frame showed as an empty block under the card. */
.crz-layout > .crz-main { align-self: start; }
@media (max-width: 900px) {
  .crz-layout > .crz-portal-lang {
    position: static;
    grid-column: 1 / -1;
    margin: 0 auto 4px;
  }
}

.crz-portal-lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(214, 185, 119, 0.55);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.4);
  color: #f3e7c8;
  font: 700 16px/1 'Noto Kufi Arabic', 'Source Sans 3', sans-serif;
  text-decoration: none;
}

.crz-portal-lang a[aria-current] {
  border-color: #ffd76a;
  background: linear-gradient(180deg, #e8c35c, #a57a22);
  color: #1d1306;
}

/* Arabic: Arabic glyphs in Noto, behind the portal's Latin display/body fonts. */
html.crz-portal-rtl body,
html.crz-portal-rtl input,
html.crz-portal-rtl button {
  font-family: 'Source Sans 3', 'Noto Sans Arabic', 'Segoe UI', sans-serif;
}

html.crz-portal-rtl h1,
html.crz-portal-rtl h2,
html.crz-portal-rtl h3,
html.crz-portal-rtl .crz-title,
html.crz-portal-rtl .crz-btn,
html.crz-portal-rtl .crz-nav-link span {
  font-family: 'Cinzel', 'Noto Kufi Arabic', serif;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html.crz-portal-rtl .crz-field label,
html.crz-portal-rtl .crz-checkbox,
html.crz-portal-rtl .crz-field-error,
html.crz-portal-rtl .crz-alert {
  text-align: right;
}

html.crz-portal-rtl .crz-hero-lead,
html.crz-portal-rtl .crz-subtitle,
html.crz-portal-rtl .crz-feature p {
  font-size: 1.05em;
  line-height: 1.7;
}

/* e-mail and password are typed left-to-right even on Arabic pages */
html.crz-portal-rtl input[type="email"],
html.crz-portal-rtl input[type="password"] {
  direction: ltr;
  text-align: right;
}
