/*
 * Right-to-left layout (Arabic). Loaded only on <html dir="rtl"> pages, after the
 * page's own stylesheets; Bootstrap itself is swapped for bootstrap.rtl.min.css.
 * Latin text keeps the site fonts; Arabic letters fall back to IBM Plex Sans Arabic
 * (text) and Noto Naskh Arabic (headings).
 */
:root[dir="rtl"] {
  --default-font: "Roboto", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading-font: "Nunito Sans", "IBM Plex Sans Arabic", sans-serif;
  --nav-font: "Raleway", "IBM Plex Sans Arabic", sans-serif;
}

[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
  font-family: var(--default-font);
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] .section-title h2,
[dir="rtl"] .hero h1 {
  font-family: "Nunito Sans", "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
  letter-spacing: 0;
}

/* Arabic has no capitals and must never be letter-spaced (it breaks the joining). */
[dir="rtl"] * {
  letter-spacing: normal !important;
}
[dir="rtl"] [class*="eyebrow"],
[dir="rtl"] .section-title p,
[dir="rtl"] .section-title span {
  text-transform: none;
}

/* Arabic script needs a little more line height than Latin. */
[dir="rtl"] p,
[dir="rtl"] li {
  line-height: 1.85;
}

/* Directional icons point the other way. */
[dir="rtl"] .bi-arrow-right::before,
[dir="rtl"] .bi-arrow-left::before,
[dir="rtl"] .bi-chevron-right::before,
[dir="rtl"] .bi-chevron-left::before,
[dir="rtl"] .bi-arrow-right-short::before,
[dir="rtl"] .bi-arrow-left-short::before,
[dir="rtl"] .bi-box-arrow-up-right::before {
  display: inline-block;
  transform: scaleX(-1);
}

/* Phone numbers, e-mails, prices, codes and dates typed or shown in fields stay LTR. */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="number"],
[dir="rtl"] input[inputmode="numeric"] {
  direction: ltr;
  unicode-bidi: isolate;
}
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"] {
  text-align: right;
}

bdi[dir="ltr"] {
  unicode-bidi: isolate;
}

/* Page-level <style> blocks in the Blade views (not covered by css:rtl). */
[dir="rtl"] .main-image-container::after { right: auto; left: 20px; }
[dir="rtl"] .room-availability-badge { left: auto; right: 14px; }
[dir="rtl"] .room-unavailable-note i { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .search-form-wrapper .input-with-icon i { left: auto; right: 1rem; }
[dir="rtl"] .faq-arrow-bg { left: auto; right: 10%; transform: translate(50%, -50%) scaleX(-1); }
[dir="rtl"] .booking-error-message { right: auto !important; left: 20px !important; }

/* Date range picker (daterangepicker 3.1 has no RTL build): first month on the right,
   "previous" arrow on the right pointing right, "next" on the left pointing left. */
[dir="rtl"] .daterangepicker { direction: rtl; text-align: right; }
[dir="rtl"] .daterangepicker .drp-calendar.left { float: right; }
[dir="rtl"] .daterangepicker .drp-calendar.right { float: left; }
[dir="rtl"] .daterangepicker .drp-calendar.left .calendar-table { padding-right: 0; }
[dir="rtl"] .daterangepicker .calendar-table .prev span { transform: rotate(-45deg); }
[dir="rtl"] .daterangepicker .calendar-table .next span { transform: rotate(135deg); }
[dir="rtl"] .daterangepicker .drp-buttons { text-align: left; }
[dir="rtl"] .daterangepicker .drp-buttons .btn { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .daterangepicker .drp-selected { padding-right: 0; padding-left: 8px; direction: ltr; unicode-bidi: isolate; }
