/*
Theme Name: Meridian Advisory RTL support
Description: Right-to-left layout support for Arabic pages.

Note: The bulk of RTL rules are authored as html.lang-ar selectors in style.css
so they coexist with the custom ?lang=ar query-string switcher. WordPress loads
this file via is_rtl() — the rules below serve as a fallback for any future
rtl-detected context.
*/

html[dir="rtl"],
body.rtl,
body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .meridian-resource-gate-modal,
html[dir="rtl"] .meridian-resource-gate-form {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

html[dir="rtl"] body,
html[dir="rtl"] :is(
  h1,
  h2,
  h3,
  p,
  li,
  label,
  .form-label,
  .form-hint,
  .form-checkbox,
  .captcha-question,
  input,
  select,
  textarea,
  button,
  .btn,
  .nav-link,
  .nav-cta,
  .lang-trigger,
  .lang-option,
  .badge,
  .testimonial,
  .testimonial q,
  .testimonial cite,
  .founder-name,
  .text-role,
  .text-org,
  .cred-th,
  .cred-td,
  .cred-label,
  .cred-value
) {
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

html[dir="rtl"] :is(.section, .cta-band, .section-header) :is(h1, h2, h3),
html[dir="rtl"] :is(.section--white, .section--off, .section--light) :is(h1, h2, .wp-block-heading) {
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Arial, sans-serif !important;
  font-style: normal !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.42 !important;
}

html[dir="rtl"] :is(.section--white, .section--off, .section--light) h2,
html[dir="rtl"] .cta-band h2 {
  font-size: clamp(2rem, 3vw, 2.55rem) !important;
}

html[dir="rtl"] :is(label, .form-label, .form-checkbox, .form-hint, .captcha-question) {
  color: #002244 !important;
  font-size: clamp(1.08rem, 1.18vw, 1.18rem) !important;
  font-weight: 750 !important;
  line-height: 1.75 !important;
}

html[dir="rtl"] :is(input, select, textarea) {
  color: #142033 !important;
  font-size: clamp(1.1rem, 1.18vw, 1.2rem) !important;
  line-height: 1.7 !important;
}

html[dir="rtl"] :is(input, select) {
  min-height: 3.35rem;
}

html[dir="rtl"] :is(input[type="email"], input[type="url"], input[type="tel"]) {
  direction: ltr;
  text-align: left !important;
}

html[dir="rtl"] :is(.btn, .nav-cta, .wp-block-button__link) {
  font-size: clamp(1.08rem, 1.14vw, 1.16rem) !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  min-height: 3.25rem;
}

html[dir="rtl"] :is(.btn--lg, .btn--full, .btn--primary-action) {
  font-size: clamp(1.1rem, 1.18vw, 1.2rem) !important;
  min-height: 3.45rem;
}

html[dir="rtl"] .form-protection {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .captcha-row {
  direction: rtl;
  justify-content: flex-start;
}

html[dir="rtl"] .captcha-question {
  min-height: 3rem;
  padding-inline: 1rem;
}

html[dir="rtl"] .form-checkbox input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
}

html[dir="rtl"] .cred-table {
  direction: rtl;
}

html[dir="rtl"] :is(.cred-th, .cred-td, .cred-label, .cred-value) {
  text-align: right !important;
}

html[dir="rtl"] .cred-th {
  color: #002244 !important;
  font-size: clamp(1.02rem, 1.1vw, 1.12rem) !important;
  line-height: 1.75 !important;
}

html[dir="rtl"] :is(.cred-td, .cred-value) {
  color: #24384f !important;
  font-size: clamp(1.08rem, 1.16vw, 1.18rem) !important;
  line-height: 1.9 !important;
}

html[dir="rtl"] :is(.testimonial q, .testimonial cite, em, i, cite) {
  color: #002244;
  font-style: normal !important;
  font-size: clamp(1.08rem, 1.16vw, 1.18rem);
  line-height: 1.85;
}
