/* ASAS Group - language switcher button + Arabic (RTL) presentation.
 * Per-element text alignment is flipped by asas-i18n.js, which reads the real
 * LTR baseline from the computed styles; this file covers everything else. */

/* ---------------- the switch button ---------------- */
.asas-lang-btn {
	flex: 0 0 auto;
	align-self: center;
	margin-inline-start: 14px;
	padding: 6px 16px;
	border: 1px solid currentColor;
	border-radius: 99px;
	background: transparent;
	color: inherit;
	font-family: "Cairo", Sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: .3px;
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s;
	white-space: nowrap;
}

.asas-lang-btn:hover,
.asas-lang-btn:focus-visible {
	background: var(--e-global-color-0dab0b0, #b31217);
	border-color: var(--e-global-color-0dab0b0, #b31217);
	color: #fff;
}

/* used only if the header markup ever changes and the button loses its slot */
.asas-lang-btn--floating {
	position: fixed;
	inset-block-start: auto;
	inset-block-end: 24px;
	inset-inline-end: 24px;
	z-index: 9999;
	background: #fff;
	color: #111;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

@media (max-width: 767px) {
	.asas-lang-btn {
		margin-inline-start: 12px;
		padding: 5px 12px;
		font-size: 12px;
	}
}

/* ---------------- Arabic mode ---------------- */
/* The Latin display face the theme uses has no Arabic glyphs, so Arabic text
   falls back to Cairo, which the page already loads. Icon fonts are left
   alone - swapping their family would blank every glyph. */
html.asas-ar body,
html.asas-ar h1, html.asas-ar h2, html.asas-ar h3,
html.asas-ar h4, html.asas-ar h5, html.asas-ar h6,
html.asas-ar p, html.asas-ar span:not([class*="eicon"]):not([class*="fa-"]),
html.asas-ar a, html.asas-ar li, html.asas-ar strong, html.asas-ar em,
html.asas-ar button, html.asas-ar input, html.asas-ar textarea, html.asas-ar label {
	font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

html.asas-ar {
	direction: rtl;
}

/* Arabic reads better with a little more line height at these sizes */
html.asas-ar p,
html.asas-ar li,
html.asas-ar .bdt-ep-advanced-icon-box-description {
	line-height: 1.9;
}

/* lists: the bullet has to move to the right edge */
html.asas-ar ul,
html.asas-ar ol {
	padding-inline-start: 18px;
	padding-inline-end: 0;
}

/* Elementor writes physical left/right padding on the icon-box widgets */
html.asas-ar .bdt-ep-advanced-icon-box-icon {
	direction: rtl;
}

/* Keep contact details readable in both languages. */
html.asas-ar .asas-company-contact {
	align-items: flex-start;
}

/* footer / contact icon lists */
html.asas-ar .elementor-icon-list-item > a,
html.asas-ar .elementor-icon-list-item {
	flex-direction: row-reverse;
	justify-content: flex-end;
}
html.asas-ar .elementor-icon-list-icon {
	margin-inline-end: 0;
	margin-inline-start: 8px;
}

/* image boxes (the three offices) put the icon left of the text in LTR */
html.asas-ar .elementor-image-box-wrapper {
	direction: rtl;
}

/* the Dr. Tamam Kurbaj page is hand-written CSS, so it flips cleanly except
   for these few places that hard-code a left edge */
html.asas-ar .tk-card,
html.asas-ar .tk-cpd__head,
html.asas-ar .tk-timeline__item {
	direction: rtl;
}
html.asas-ar .tk-btn svg {
	margin-inline-end: 6px;
	margin-inline-start: 0;
}

/* Latin runs inside Arabic text - phone numbers, emails, URLs - get reordered
   by the bidi algorithm ("+971 4 553 0874" reads back to front). Pin them LTR. */
html.asas-ar [href^="tel:"] .elementor-icon-list-text,
html.asas-ar [href^="mailto:"] .elementor-icon-list-text,
html.asas-ar [href^="tel:"],
html.asas-ar [href^="mailto:"],
html.asas-ar .tk-contact__value,
html.asas-ar .asas-ltr {
	direction: ltr;
	unicode-bidi: embed;
}

/* keep the icon on the correct side once the anchor itself is pinned LTR */
html.asas-ar .elementor-icon-list-item > a[href^="tel:"],
html.asas-ar .elementor-icon-list-item > a[href^="mailto:"] {
	direction: rtl;
}

/* The Dr. Tamam Kurbaj page hard-codes a few physical left/right edges that
   direction:rtl cannot flip on its own. */
html.asas-ar .tk-xp__item {
	border-left: 0;
	border-right: 4px solid var(--tk-brand);
}
html.asas-ar .tk-xp__list li {
	padding-left: 0;
	padding-right: 30px;
}
html.asas-ar .tk-xp__list li::before {
	left: auto;
	right: 0;
}
html.asas-ar .tk-cpd__chev {
	margin-left: 0;
	margin-right: auto;
}
html.asas-ar .tk-lb__close {
	right: auto;
	left: 18px;
}

/* The home page header column stacks its children, which dropped the switch
   onto a line of its own under the menu (under the burger on mobile). Put the
   menu and the switch on one row. The selector matches the specificity of
   Elementor's own per-widget rule, and this file loads after it. */
.elementor-174 .elementor-element.elementor-element-9687475 {
	--flex-direction: row;
	--align-items: center;
	--justify-content: flex-end;
	--column-gap: 0px;
	--row-gap: 0px;
}
/* 0 0 auto, not 0 1 auto: allowed to shrink, the menu's own list overflowed its
   box and ran underneath the switch, leaving almost no gap after "Contact". */
.elementor-174 .elementor-element.elementor-element-9687475 > .elementor-widget-nav-menu {
	width: auto;
	flex: 0 0 auto;
}
.elementor-174 .elementor-element.elementor-element-9687475 {
	flex: 1 1 auto;
}
/* the menu now shares the row, so keep its items on one line */
.elementor-174 .elementor-element.elementor-element-0706df0 ul.elementor-nav-menu {
	flex-wrap: nowrap;
}
