/*
 * /he: the page reads right to left (dir="rtl" on <html>, Vlad 04.11). Only what dir="rtl" does not mirror by itself.
 * Loaded on /he only (src/app/[lang]/layout.tsx); the rules start with html[dir="rtl"] so they win over the pages' own
 * sheets, which load after this one (compara.css, …).
 */

/* the fleet's rows: the first card under the title's right edge, the next one peeking on the left (wlc-compare.js
   measures the edge from the right on /he) */
html[dir="rtl"] .slider-category-cars .slick-list { padding-right: var(--wlc-edge, max(16px, calc((100vw - 1320px) / 2))) !important; padding-left: 0 !important; }
html[dir="rtl"] .slider-offer-cars .slick-list { padding-right: var(--wlc-offer-edge, var(--wlc-edge, max(16px, calc((100vw - 1320px) / 2)))) !important; padding-left: 0 !important; }
html[dir="rtl"] .slider-category-cars.slider-loading:not(.slick-initialized)::before { left: 0; right: var(--wlc-edge, 40px); }
html[dir="rtl"] .slider-offer-cars.slider-loading:not(.slick-initialized)::before { left: 0; right: var(--wlc-offer-edge, var(--wlc-edge, 40px)); }
@media (min-width: 768px) {
  html[dir="rtl"] .slider-offer-cars.wlc-all-shown .slick-list { padding-left: var(--wlc-offer-edge, 40px) !important; padding-right: var(--wlc-offer-edge, 40px) !important; }
}

/* arrows point the way the page reads: „next” on the left, pointing left */
html[dir="rtl"] img[src*="/images/arrow-"] { transform: scaleX(-1); }

/* the header on phones: the logo on the right, the menu button at the other end (not glued to the logo) */
html[dir="rtl"] .header-site .navbar-header .menu-items { margin-left: 0; margin-right: auto; }

/* the location lists: the arrow on the left, the text clear of it */
html[dir="rtl"] .select2-container--default .select2-selection--single { padding-left: 34px !important; padding-right: 22px !important; }
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow { right: auto !important; left: 13px; }
html[dir="rtl"] .box-filter-select .select2-container--default .select2-selection--single .select2-selection__arrow { left: 19px; }
/* the hour lists have no arrow: no room kept for one, or the car page's narrow field shows „:00” */
html[dir="rtl"] :is(.pick_up_time, .drop_off_time) + .select2-container--default .select2-selection--single { padding-left: 8px !important; padding-right: 8px !important; }
/* the text arrows after a link („… →”, the map's „→”, the cards' „Vezi toate →”): the plain aria-hidden spans */
html[dir="rtl"] span[aria-hidden="true"]:not([class]), html[dir="rtl"] .wlc-card-all-arrow, html[dir="rtl"] .wlc-map-arrow i { display: inline-block; transform: scaleX(-1); }

/* the calendar's month arrows: „previous” on the right, „next” on the left (the site pins them with !important) */
html[dir="rtl"] .ui-datepicker .ui-datepicker-prev { left: auto !important; right: 0 !important; }
html[dir="rtl"] .ui-datepicker .ui-datepicker-next { right: auto !important; left: 0 !important; }
html[dir="rtl"] .ui-datepicker .ui-datepicker-prev span, html[dir="rtl"] .ui-datepicker .ui-datepicker-next span { transform: scaleX(-1); }

/* „Rezervarea ta” (/plata and the booking pages): the pick-up → return line and its dots on the right, next to the words */
html[dir="rtl"] .bill-trip { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .bill-trip::before { left: auto; right: 5px; border-left: 0; border-right: 2px dotted #b9c7d6; }
html[dir="rtl"] .bill-trip > div::before { left: auto; right: -22px; }

/* phone numbers and e-mail addresses are typed and read left to right, on the field's right side */
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[name="booking_phone"] { direction: ltr; text-align: right; }

/* the payment choice's round button: its gap on the text's side (on the left right to left) */
html[dir="rtl"] .wrapper-payment .iradio_flat-blue { margin-right: 0; margin-left: 8px; }

/* the home page's photo (desktop): the words stay on its dark left part, where they read well (the car is on the
   right, the photo is not mirrored: its plate would read backwards), set from the right edge as Hebrew reads */
@media (min-width: 768px) {
  html[dir="rtl"] .banner-homepage .hero-overlay { justify-content: flex-end; }
  html[dir="rtl"] .banner-homepage :is(.banner-text, .title-homepage-rent, .banner-subtitle) { text-align: right; }
  html[dir="rtl"] .banner-homepage .banner-text li::before { margin: 0 0 2px 8px; }
}

/* the reassurances under the button on /plata: their ✓ at the start of the line (on the right) */
html[dir="rtl"] .pay-reassure li { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .pay-reassure li::before { left: auto; right: 0; }

/* the floating total on phones (/adauga-extra, /plata): „Detalii preț” on the right, the total on the left, as the
   mirror of the other languages */
html[dir="rtl"] .total-bottom.total-bottom-fixed .total-bottom-mobile-extra { left: auto; right: 16px; }
html[dir="rtl"] .total-bottom.total-bottom-fixed .total { text-align: left; }
html[dir="rtl"] .total-bottom.total-bottom-fixed .total > .order_total { margin-left: 0 !important; margin-right: auto !important; }
