/**
 * RTL layout — Sarah Yachts
 *
 * Prefer logical CSS in main.css (margin-inline-*, padding-inline-*, inset-inline-*).
 * This file mirrors remaining physical properties for Arabic / Hebrew / Urdu.
 */

html[dir="rtl"],
body.rtl,
body.sy-rtl {
	direction: rtl;
}

/* Header / nav */
body.sy-rtl .sy-header-inner,
body.sy-rtl .sy-footer-bottom__inner {
	direction: rtl;
}

body.sy-rtl .sy-primary-nav ul {
	padding-inline-start: 0;
}

body.sy-rtl .sy-header-actions {
	flex-direction: row-reverse;
}

body.sy-rtl .sy-offcanvas__panel {
	inset-inline-start: 0;
	inset-inline-end: auto;
	right: auto;
	left: 0;
	transform: translateX(-100%);
}

body.sy-rtl .sy-offcanvas.is-open .sy-offcanvas__panel {
	transform: translateX(0);
}

/* Carousels — flip arrows */
body.sy-rtl .sy-carousel__prev {
	left: auto;
	right: 0.35rem;
}

body.sy-rtl .sy-carousel__next {
	right: auto;
	left: 0.35rem;
}

/* Guest moments carousel keeps LTR chrome — do not mirror it. */
body.sy-rtl .sy-moments,
body.sy-rtl .sy-moments__track,
body.sy-rtl .sy-moments__viewport,
body.sy-rtl .sy-moments__controls,
body.sy-rtl .sy-moment-card__tags {
	direction: ltr;
}

/* Forms */
body.sy-rtl .sy-booking-form input,
body.sy-rtl .sy-booking-form select,
body.sy-rtl .sy-booking-form textarea,
body.sy-rtl .sy-form input,
body.sy-rtl .sy-form select,
body.sy-rtl .sy-form textarea {
	text-align: start;
}

body.sy-rtl .sy-btn {
	letter-spacing: 0; /* Arabic does not need wide tracking */
}

/* Cards / lists */
body.sy-rtl .sy-yacht-card,
body.sy-rtl .sy-service-card,
body.sy-rtl .sy-related-posts__card {
	text-align: start;
}

body.sy-rtl .sy-breadcrumbs {
	direction: rtl;
}

/* Allow ~35% longer Russian / German strings without clipping */
body.sy-rtl .sy-btn,
body.sy-lang-ru .sy-btn,
body.sy-lang-fr .sy-btn {
	white-space: normal;
	max-width: 100%;
	line-height: 1.25;
	text-wrap: balance;
}

body.sy-lang-ru .sy-primary-nav a,
body.sy-lang-fr .sy-primary-nav a {
	white-space: nowrap;
}

@media (max-width: 1023px) {
	body.sy-lang-ru .sy-primary-nav a,
	body.sy-lang-fr .sy-primary-nav a {
		white-space: normal;
	}
}

/* Icons that imply direction */
body.sy-rtl .sy-icon--chevron,
body.sy-rtl .sy-nav-arrow {
	transform: scaleX(-1);
}

/* Announcement bar */
body.sy-rtl .sy-announcement-bar__inner {
	flex-direction: row-reverse;
}

/*
 * Keep English/LTR fragments readable inside a real Arabic page:
 * phones, emails, copyright years, form placeholders with Latin text.
 */
body.sy-rtl .sy-ltr-isolate,
body.sy-rtl .sy-header-phone,
body.sy-rtl a[href^="tel:"],
body.sy-rtl a[href^="mailto:"],
body.sy-rtl a[href^="http"] {
	unicode-bidi: isolate;
}

body.sy-rtl .sy-header-phone,
body.sy-rtl a[href^="tel:"] {
	direction: ltr;
}

body.sy-rtl .sy-footer-contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	text-align: start;
}

body.sy-rtl .sy-footer-newsletter-form {
	flex-direction: row;
	direction: ltr; /* input + button order stays natural for emails */
}

body.sy-rtl .sy-footer-newsletter-form input {
	direction: ltr;
	text-align: left;
}

body.sy-rtl .sy-lang-suggest {
	direction: ltr; /* banner copy is usually English until translated */
	text-align: start;
}

body.sy-rtl .sy-lang-suggest[lang],
body.sy-rtl .sy-lang-suggest:lang(ar) {
	direction: rtl;
}

/* Header must not crush when labels expand */
body.sy-rtl .sy-header-inner {
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

body.sy-rtl .sy-primary-nav a {
	white-space: nowrap;
}

body.sy-rtl .sy-header-actions {
	flex-wrap: wrap;
	gap: 0.5rem;
}
