/* ------------------------------------------------------------------
 * RTL layout overrides for the Arabic (ar) locale.
 * Loaded ONLY when app()->getLocale() === 'ar' (see header.blade.php /
 * offplan_header.blade.php), on top of the existing LTR stylesheets.
 * Keep this file additive/override-only — never edit style.css or
 * luxury-theme.css directly for Arabic support.
 * ------------------------------------------------------------------ */

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

/* Google/Arabic-friendly font stack for Arabic copy, Latin text (phone
   numbers, prices, brand name) keeps the existing font via unicode-range
   fallback in most browsers. */
html[dir="rtl"] body {
  font-family: 'Tajawal', 'Manrope', 'Poppins', sans-serif;
}

/* Top utility bar / nav: mirror flex direction so icons and text read
   naturally right-to-left. */
html[dir="rtl"] .rd-navbar-aside-list,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .pcasa-nav-tools,
html[dir="rtl"] .unit,
html[dir="rtl"] .block-inline {
  direction: rtl;
}

html[dir="rtl"] .rd-navbar-nav > .rd-nav-item {
  float: right;
}

html[dir="rtl"] .rd-menu.rd-navbar-dropdown,
html[dir="rtl"] .rd-menu.rd-navbar-megamenu {
  text-align: right;
  right: 0;
  left: auto;
}

/* Search overlay */
html[dir="rtl"] .pcasa-search-form {
  padding: 8px 20px 8px 8px;
}

html[dir="rtl"] .pcasa-search-form input {
  text-align: right;
}

/* Floating call/WhatsApp/chat buttons: mirror to the opposite side so
   they don't collide with a right-aligned RTL layout's natural focal
   point, and so offplan_footer's "-left" variant and footer's default
   variant both still make sense. */
html[dir="rtl"] .floating-contact {
  right: auto;
  left: 25px;
}

html[dir="rtl"] .floating-contact-left {
  left: auto;
  right: 25px;
}

html[dir="rtl"] .pcasa-chat-panel {
  right: auto;
  left: 25px;
}

@media (max-width: 767px) {
  html[dir="rtl"] .floating-contact {
    right: auto;
    left: 20px;
  }
  html[dir="rtl"] .floating-contact-left {
    left: auto;
    right: 20px;
  }
  html[dir="rtl"] .pcasa-chat-panel {
    right: auto;
    left: 20px;
  }
}

/* Generic text alignment helpers used across translated pages */
html[dir="rtl"] .text-md-start {
  text-align: right !important;
}

html[dir="rtl"] .text-md-end {
  text-align: left !important;
}

html[dir="rtl"] .footer-title::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .footer-list li a:hover {
  padding-left: 0;
  padding-right: 5px;
}

/* Phone numbers: without this, the Unicode bidi algorithm visually
 * reorders "+971 55 554 5458" (the space-separated groups get shuffled)
 * inside an RTL block, because digits and "+" are bidi-neutral/weak
 * characters with no strong character to anchor a direction — so
 * unicode-bidi: plaintext alone isn't enough here. Forcing an explicit
 * LTR embedding (the same thing dir="ltr" would do) fixes it. */
html[dir="rtl"] a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: embed;
}

/* Safe to force ltr on these: each holds ONE value (address/phone/email)
 * with no Arabic label sharing the same line. The appointment-list lines
 * DO mix an Arabic label with the value on one line ("عنوان المكتب : ...")
 * so those are handled with a dir="ltr" span around just the value
 * instead — see footer.blade.php — rather than forced here. */
html[dir="rtl"] .contact-info-panel p,
html[dir="rtl"] .footer-list.contact-list li {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

html[dir="rtl"] .icon-box-lux,
html[dir="rtl"] .info-card-lux {
  direction: rtl;
}

html[dir="rtl"] .form-floating-lux label {
  text-align: right;
}

html[dir="rtl"] .input-modern {
  text-align: right;
}

/* Contact hero / studio headings keep their weight but flip alignment */
html[dir="rtl"] .contact-info-panel,
html[dir="rtl"] .contact-studio-2026 {
  text-align: right;
}

/* Bootstrap icon/text gap helpers rendered inline via style="" in a few
   blades can't be overridden here (no !important target); layout still
   reads correctly left-to-right for numerals/prices, which is expected
   and matches standard Arabic UI conventions (mixed-direction numerals). */
