/*
 * arabic-rtl.css — Hand-authored Arabic / RTL refinements for GoodEnergy.
 *
 * Loaded ONLY when the site locale is RTL (is_rtl()), AFTER rtl.css and the
 * responsive RTL mirrors, so it has the final word. This file holds the things
 * rtlcss cannot infer automatically:
 *   1. A proper Arabic web font (the theme's Latin display fonts render Arabic
 *      poorly — wrong baseline, broken letter joining, clipped diacritics).
 *   2. Typography tuning for Arabic (no letter-spacing, looser line-height).
 *   3. A handful of directional micro-fixes.
 *
 * The Arabic font itself (Cairo) is enqueued from rtl-support.php so it can be
 * swapped/self-hosted without touching this file.
 *
 * IMPORTANT: never set font-family on icon elements — the theme draws icons with
 * the 'fontello' icon font via :before/:after. Those selectors are left alone.
 */

/* ------------------------------------------------------------------ *
 * 1. Arabic font stack
 * ------------------------------------------------------------------ */
:root {
	--ge-ar-font: 'Cairo', 'Tajawal', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

body,
button,
input,
select,
textarea,
.sc_button,
.menu_main_nav,
.menu_main_nav li a,
.widget,
.post_item,
.sc_title,
h1, h2, h3, h4, h5, h6,
.sc_services_item_title,
.breadcrumbs,
.sidebar,
.footer_wrap,
.copyright_text {
	font-family: var(--ge-ar-font);
}

/* Arabic has no letter-casing and looks broken with Latin letter-spacing /
 * uppercase transforms commonly used by this theme's headings & buttons. */
h1, h2, h3, h4, h5, h6,
.sc_title,
.menu_main_nav li a,
.sc_button,
.button,
.theme_button,
.post_meta,
.breadcrumbs {
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* Arabic glyphs are taller; give text a touch more breathing room. */
body {
	line-height: 1.8;
}
p,
.post_content,
.sc_services_item_description,
.widget {
	line-height: 1.9;
}

/* ------------------------------------------------------------------ *
 * 2. Directional micro-fixes rtlcss can't detect
 * ------------------------------------------------------------------ */

/* Numbers, prices, dates, code and emails stay LTR even inside RTL text. */
.price,
.amount,
.woocommerce-Price-amount,
.tribe-events-c-small-cta__price,
time,
.post_date,
code, kbd, samp, var,
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
.phone, .email {
	direction: ltr;
	unicode-bidi: embed;
}
/* keep numeric cells visually on their natural side */
.price,
.amount,
.post_date,
time {
	text-align: right;
}

/* Bullet / counter lists: rtlcss flips padding, make sure the marker sits on
 * the right and never overflows the container. */
.post_content ul,
.post_content ol,
.widget ul,
.widget ol {
	padding-right: 1.3em;
	padding-left: 0;
}

/* Menu drop-down arrows / sub-menu carets: mirror the horizontal ones. */
.menu_main_nav > li.menu-item-has-children > a:after,
.sc_services_item .icon-right:before {
	transform: scaleX(-1);
	display: inline-block;
}

/* Blockquotes: the decorative quote/border should sit on the right. */
blockquote {
	border-right: 4px solid;
	border-left: none;
	padding-right: 1.5em;
	padding-left: 0;
}

/* Search & form fields: align placeholder/text to the right. */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
textarea,
.search_form input.search_field {
	text-align: right;
}

/* Breadcrumb separators read right-to-left now; nudge spacing symmetric. */
.breadcrumbs .separator {
	margin: 0 6px;
}
