/* Arabic home (/ar/): mirrors the physical layout of home.css that rtl.css does not cover. Loaded last. */

/* Example controls: the play button sits at the inline end and its arrow points the way the sequence reads. */
:root[lang=ar] .home-gateway .example-run { margin:0 auto 0 0; }
:root[lang=ar] .home-gateway .example-run:not(:disabled)::after { content:"←" / ""; }

/* Message bubble: the sharp corner and the tail sit on the sender's (start) side. Back arrow points to the start. */
:root[lang=ar] .home-gateway .example-app-bar svg { transform:scaleX(-1); }
:root[lang=ar] .home-gateway .example-message { border-radius:12px 12px 0 12px; }
:root[lang=ar] .home-gateway .example-message-tail { margin:0 1rem 1.25rem 0;border-left-color:transparent;border-right-color:color-mix(in srgb,var(--blue) 7%,var(--bg)); }

/* Calendar event accent and stacked ticket shadows. */
:root[lang=ar] .home-gateway .example-calendar-event > div { border-left:0;border-right:3px solid var(--blue); }
:root[lang=ar] .home-gateway .example-queue { margin:1rem 0 0 .75rem; }
:root[lang=ar] .home-gateway .example-queue::after { inset:-.5rem .4rem .5rem -.4rem; }
:root[lang=ar] .home-gateway .example-queue::before { inset:-1rem .8rem 1rem -.8rem; }

/* Connectors. Stacked: the label sits beside the downward arrow on the start side. */
:root[lang=ar] .home-gateway .example-link span { left:auto;right:3.75rem; }
/* Three columns flow right to left: connectors leave each step on its left and the arrow points left. */
@media(min-width:960px) {
  :root[lang=ar] .home-gateway .example-link { right:auto;left:calc(-1 * var(--flow-gap)); }
  :root[lang=ar] .home-gateway .example-step:first-child .example-link { right:auto;left:calc(-1 * var(--flow-gap) - (100% - var(--core))/2); }
  :root[lang=ar] .home-gateway .example-link span { right:auto;left:0; }
  :root[lang=ar] .home-gateway .example-link svg { transform:scaleX(-1); }
}

/* Phone hero: the shore becomes a relatively positioned grid item that starts at the right edge in RTL,
   so the full-bleed offset has to come from the right as well (home.css offsets it from the left). */
@media(max-width:700px) {
  :root[lang=ar] .home-gateway .home-opening:has(.home-shore) .home-shore { left:auto;right:calc(50% - 50vw); }
}

/* The English kicker and scroll cue are 11px tracked caps; Arabic dots need at least 13px. */
:root[lang=ar] .home-gateway :is(.home-kicker,.home-down) { font-size:.8125rem; }

/* Keep "وذكاء اصطناعي" on one line in the home h1 so the phrase never splits at phone width. */
:root[lang=ar] .home-gateway .ar-keep { white-space:nowrap; }
