/*
 * Right-to-left pages (Arabic, Hebrew, Persian, Urdu …). Loaded only when the page language is RTL;
 * the renderer then also sets dir="rtl" on .wlp. Grid, flex and text flow mirror on their own from
 * `direction`; this file mirrors what landing.css positions by hand with left/right.
 */
.wlp[dir="rtl"] { text-align: right; font-family: "Open Sans", "Noto Sans Arabic", "Noto Sans Hebrew", Tahoma, Arial, sans-serif; }
/* Arabic pages: Tajawal for everything, page and form (form fields inherit it). */
.wlp[lang|="ar"] { font-family: "Tajawal", "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
.wlp[lang|="ar"] .cad-fig .stat-t, .wlp[lang|="ar"] .wlp-footer-simple { font-family: "Tajawal", Arial, sans-serif; }
/* Arabic letters join up: tracking (letter-spacing) breaks the joins, so it's switched off. */
.wlp[dir="rtl"], .wlp[dir="rtl"] * { letter-spacing: 0 !important; }
.wlp[dir="rtl"] h1, .wlp[dir="rtl"] h2, .wlp[dir="rtl"] h3 { line-height: 1.3; }

/* Arrows point the reading direction */
.wlp[dir="rtl"] svg.i-arrow { transform: scaleX(-1); }
.wlp[dir="rtl"] .btn:hover svg.i-arrow { transform: scaleX(-1) translateX(4px); }
.wlp[dir="rtl"] .btn::after { transform: translateX(120%); }
.wlp[dir="rtl"] .btn:hover::after { transform: translateX(-120%); }

/* Contact details stay left-to-right (emails, phone numbers, postcodes) but sit on the right */
.wlp[dir="rtl"] input[type="email"], .wlp[dir="rtl"] input[type="tel"], .wlp[dir="rtl"] input[type="url"],
.wlp[dir="rtl"] input[inputmode="numeric"], .wlp[dir="rtl"] .area-num { direction: ltr; text-align: right; }

/* ---------- Hero ---------- */
.wlp[dir="rtl"] .photo-badge { left: auto; right: 16px; }
.wlp[dir="rtl"] .spec li:nth-child(odd) { border-right: 0; border-left: 1px solid #dcdcdc; }
.wlp[dir="rtl"] .spec li:nth-child(even) { padding-left: 0; padding-right: 14px; }
.wlp[dir="rtl"] .hero .spec li:first-child { padding-right: 0; }
.wlp[dir="rtl"] .hero .spec li + li { border-left: 0; border-right: 1px solid #ddd5ca; }
.wlp[dir="rtl"] .accolades a b::before, .wlp[dir="rtl"] .head-trust b::before { margin-right: 0; margin-left: 3px; }
.wlp[dir="rtl"] .sc-usp span { padding-left: 0; padding-right: 12px; border-left: 0; border-right: 1px solid var(--line); }
.wlp[dir="rtl"] .skip-links { left: auto; right: 8px; align-items: flex-end; }
.wlp[dir="rtl"] .skip-link { left: auto; right: 0; }
@media (min-width: 640px) {
  .wlp[dir="rtl"] .hero .accolades a { margin-left: 0; margin-right: auto; }
  .wlp[dir="rtl"] .spec li, .wlp[dir="rtl"] .spec li:nth-child(even) { border-right: 0; border-left: 1px solid rgba(255, 255, 255, .14); }
  .wlp[dir="rtl"] .spec li:first-child { padding-left: 14px; padding-right: 0; }
  .wlp[dir="rtl"] .spec li:last-child { border-left: 0; }
}
@media (min-width: 1024px) {
  /* The photo sits on the left, the copy on the right */
  .wlp[dir="rtl"] .hero-photo { right: 55%; left: 0; }
  .wlp[dir="rtl"] .photo-badge { right: auto; left: 24px; }
  .wlp[dir="rtl"] .scroll-cue { left: auto; right: max(16px, calc((100% - 1440px) / 2)); }
  .wlp[dir="rtl"] .t7-saving { right: auto; left: calc(100% - 34px); }
}
@media (min-width: 1024px) and (max-width: 1279px) { .wlp[dir="rtl"] .hero-photo { right: 58%; } }
@media (min-width: 1280px) { .wlp[dir="rtl"] .hero-photo { right: 50%; } }

/* ---------- Quote form ---------- */
.wlp[dir="rtl"] .step:not([hidden]), .wlp[dir="rtl"] .form-card.done .success { animation-name: stepInRtl; }
@keyframes stepInRtl { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.wlp[dir="rtl"] .track span { inset: 0 0 0 auto; }
.wlp[dir="rtl"] .float label { left: auto; right: 17px; transform-origin: right top; }
.wlp[dir="rtl"] .float .valid-tick { right: auto; left: 14px; }
.wlp[dir="rtl"] .unit-tag { right: auto; left: 16px; }
.wlp[dir="rtl"] .wlp-select { padding-right: 16px; padding-left: 44px; background-position: left 14px center; }

/* Option tiles: the tick moves to the left, the text gets its room on the right */
.wlp[dir="rtl"] .tile { padding: 9px 12px 9px 46px; }
.wlp[dir="rtl"] .form-card .tile { padding: 10px 12px 10px 44px; }
.wlp[dir="rtl"] .tile .check, .wlp[dir="rtl"] .form-card .tile .check { right: auto; left: 14px; }
.wlp[dir="rtl"] .floor .check, .wlp[dir="rtl"] .form-card .floor .check { right: auto; left: 6px; }
.wlp[dir="rtl"] .pick .check { right: auto; left: 7px; }
.wlp[dir="rtl"] .picks.trio .pick .check { right: auto; left: 6px; }
.wlp[dir="rtl"] .picks.duo .pick { padding: 14px 12px 14px 30px; text-align: right; }
.wlp[dir="rtl"] .picks.trio .pick { padding: 7px 8px 7px 24px; text-align: right; }
@media (max-width: 1023px) { .wlp[dir="rtl"] .tile > span:nth-of-type(2) { padding-right: 0; padding-left: 4px; } }
.wlp[dir="rtl"] .chip svg { margin-left: 0; margin-right: -4px; }
.wlp[dir="rtl"] .perk { margin-left: 0; margin-right: 6px; }
.wlp[dir="rtl"] .pc-by { text-align: left; }
.wlp[dir="rtl"] .success ol { text-align: right; }

/* Area slider: the range input runs right-to-left, so the fill, ticks and plan follow it */
.wlp[dir="rtl"] .area-range::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--red) var(--p), #ececec var(--p)); }
.wlp[dir="rtl"] .area-ticks span { left: auto; right: var(--at); translate: 50% 0; }
.wlp[dir="rtl"] .area-zone { left: auto; right: 0; border-radius: 4px 0 0 0; }
.wlp[dir="rtl"] .area-dim { right: auto; left: 5px; }

/* ---------- Sections ---------- */
.wlp[dir="rtl"] .sticky-cta { padding: 8px 16px 8px 8px; }
.wlp[dir="rtl"] .next::before { transform-origin: right; }
.wlp[dir="rtl"] .sus-stats li::after { transform-origin: right; }
.wlp[dir="rtl"] .sus-left::before { right: auto; left: -16px; }
.wlp[dir="rtl"] .sc-vs-col li { padding-left: 0; padding-right: 22px; }
.wlp[dir="rtl"] .sc-vs-col li::before { left: auto; right: 3px; }
.wlp[dir="rtl"] .sc-vs-col.on li::before { right: 0; }
.wlp[dir="rtl"] .sc-live { margin-left: 0; margin-right: 4px; }
.wlp[dir="rtl"] .works-with b { margin-right: 0; margin-left: 4px; }
.wlp[dir="rtl"] .stats sup, .wlp[dir="rtl"] .sus-stats small, .wlp[dir="rtl"] .t7-temp sup, .wlp[dir="rtl"] sup.sc-ast { margin-left: 0; margin-right: 3px; }
.wlp[dir="rtl"] .t7-say b::after { margin-left: 0; margin-right: 2px; }
.wlp[dir="rtl"] .cad-steps li:not(:last-child)::after { left: auto; right: 19px; }
.wlp[dir="rtl"] .cad-toggle { right: auto; left: 10px; }
.wlp[dir="rtl"] .cad-legend { left: auto; right: 12px; }
.wlp[dir="rtl"] .cad-stamp { right: auto; left: -10px; transform: rotate(10deg); }
@media (max-width: 520px) { .wlp[dir="rtl"] .cad-stamp { left: -4px; } }
@media (min-width: 1024px) { .wlp[dir="rtl"] .cad-stamp { left: -26px; } }
.wlp[dir="rtl"] .cad-table th, .wlp[dir="rtl"] .cad-table td { text-align: left; }
.wlp[dir="rtl"] .cad-table th:first-child, .wlp[dir="rtl"] .cad-table td:first-child { padding-left: 12px; padding-right: 16px; text-align: right; }
.wlp[dir="rtl"] .cad-table th:last-child, .wlp[dir="rtl"] .cad-table td:last-child { padding-right: 12px; padding-left: 16px; }
.wlp[dir="rtl"] .cad-table td:first-child i { margin-right: 0; margin-left: 8px; }
@media (min-width: 1024px) { .wlp[dir="rtl"] .foot { text-align: right; } }

/* Drawings, the before/after slider and the CAD plan are pictures: keep them unmirrored */
.wlp[dir="rtl"] .ba, .wlp[dir="rtl"] .cad-fig, .wlp[dir="rtl"] .t7-dial { direction: ltr; }
.wlp[dir="rtl"] .ba .lbl-l, .wlp[dir="rtl"] .ba .lbl-r { direction: rtl; }

/* "Back" points the other way */
.wlp[dir="rtl"] .back > span[aria-hidden] { display: inline-block; margin-left: 4px; transform: scaleX(-1); }
/* Figures such as "2.5M+" or "24/7/365" keep their own order (the "+" stays after the number);
   Arabic labels in the same spot still read right to left. */
.wlp[dir="rtl"] .spec strong, .wlp[dir="rtl"] .proof strong, .wlp[dir="rtl"] .stats strong,
.wlp[dir="rtl"] .sus-stats strong, .wlp[dir="rtl"] .t7-temp, .wlp[dir="rtl"] .area-val { unicode-bidi: plaintext; }
/* Trust stats: number + unit (29 YR, 2.4M+, 4.6★) stay in that order; the label underneath reads RTL */
.wlp[dir="rtl"] .stats > div { direction: ltr; }
.wlp[dir="rtl"] .stats > div > span { direction: rtl; unicode-bidi: isolate; }
/* Values with units in the CAD table ("2.40 kW", "16.0 m²") */
.wlp[dir="rtl"] .cad-table th, .wlp[dir="rtl"] .cad-table td { unicode-bidi: plaintext; }
/* Thermostat slider: 18° on the left, 28° on the right, like the colour scale */
.wlp[dir="rtl"] .t7-range { direction: ltr; }
.wlp[dir="rtl"] .t7-slide label span:last-child { unicode-bidi: plaintext; }
