/* ========================================
   RTL Override - based on proven s3 values
   Loaded AFTER compact.css to override safely
   ======================================== */

/* الأعمدة الثلاثة: قلب float من left الى right */
div#side_navi { float: right !important; }
div#side_info { float: right !important; }
div#content   { float: right !important; }

/* الشريط العلوي #mtop - الحل السحري من s3 (توسيط مرن بدل بكسل ثابت) */
div#mtop {
    left: auto !important;
    right: 50% !important;
    margin-right: -241px !important;
    margin-left: 0 !important;
}

/* أيقونات الشريط العلوي: قلب اتجاهها */
div#mtop a#n1,
div#mtop a#n2,
div#mtop a#n3,
div#mtop a#n4,
div#mtop div#n5 { float: right !important; }

div#mtop a#plus { float: right !important; }

/* ========================================
   تصحيح الهوامش: قلب left الى right (قيم s3)
   ======================================== */

/* side_info: قلب padding من يسار ليمين */
div#side_info {
    padding-left: 0 !important;
    padding-right: 10px !important;
}

/* وضع mod3: قلب margin (يمنع قطع العمود) */
body.mod3 div#side_info {
    margin-left: 0 !important;
    margin-right: 132px !important;
}

/* side_navi: تأكيد المحاذاة لليمين */
div#side_navi {
    text-align: right;
}

/* ========================================
   تصحيح mod3: قلب plus_div + ضبط القائمة اليمنى
   ======================================== */

/* plus_div: قلب margin (قيمة s3) */
body.mod3 div#plus_div {
    margin-left: 0 !important;
    margin-right: 237px !important;
}

/* القائمة اليمنى side_navi: تثبيتها يمين بدون قطع */
div#side_navi {
    float: right !important;
    margin-right: 0 !important;
    padding-right: 5px;
    box-sizing: border-box;
}

/* ========================================
   اللمسة الأخيرة: منع القائمة اليمنى من الخروج
   ======================================== */
div#side_navi {
    padding-right: 20px !important;
    padding-left: 0 !important;
    box-sizing: border-box !important;
    overflow: visible;
    white-space: nowrap;
}

/* تأكيد أن الإطار لا يقص المحتوى الخارج */
div#mid {
    overflow: visible !important;
}

/* ========================================




/* تصغير خط الموارد ليظهر الجميع بدون قص (بدون تغيير position) */
div#res table td {
    font-size: 11px !important;
    padding: 0 1px !important;
}

/* الموارد: تبقى من اليسار (الأرقام تُقرأ يسار-يمين حتى بالعربي) */
div#res {
    left: 130px !important;
    right: auto !important;
    direction: ltr !important;
}

/* ========================================
   قائمة القرى #vlist: ترتيب صحيح RTL
   النقطة جنب الاسم على اليمين
   ======================================== */
table#vlist {
    direction: rtl !important;
}
table#vlist td.dot {
    text-align: right !important;
}
table#vlist td.link {
    text-align: right !important;
}
table#vlist td.aligned_coords {
    direction: ltr !important;
    text-align: left !important;
}


/* === إكمال RTL لـ dorf1 (3 تصحيحات داخلية) === */
/* 1) خريطة الحقول تنتقل يمين */
div.village1 div#village_map{ float:right !important; }
/* 2) لوحة الإنتاج/القوات تنتقل يسار + قلب الهامش */
div.village1 div#map_details{
  float:left !important;
  margin-left:1px !important;
  margin-right:0 !important;
}
/* 3) الخط الفاصل العمودي ينتقل لجهة اليسار (يفصل القائمة عن المحتوى) */
div#mid{ background-position:right 0 !important; }

/* === فواصل dorf1 بـ CSS (بدل صورة rand.gif) === */
/* نلغي صورة الفواصل القديمة، ونرسم خطين على جانبي العمود الأوسط */
div#mid{ background-image:none !important; }
div.village1 div#content{
  border-right:1px solid #cdddcd !important;
  border-left:1px solid #cdddcd !important;
  box-sizing:border-box;
}

/* === عنوان القرية + (Capital) في RTL === */
div.village1 h1{
  left:auto !important;
  right:10px !important;
  text-align:right !important;
}
div.village1 h1 div{ float:right !important; }
div.village1 h1 div#loyality{ float:none !important; }
div#cap{
  text-align:right !important;
  margin-right:10px;
}
div#cap font{ display:inline !important; }

/* ===== نظام فواصل tatar-w (صور الظل) ===== */
/* إلغاء صورة rand.gif القديمة (الفواصل تأتي من ظلال القائمتين) */
div#mid{ background-image:none !important; }

/* القائمة اليمنى (side_navi): ظل عمودي على يسارها يفصلها عن المحتوى */
div#side_navi{
  background:transparent url("img/vip/shadow-a-rtl.png") no-repeat left top !important;
  width:155px !important;
  min-height:453px;
  position:relative;
}

/* قائمة القرى (side_info): ظل عمودي على يمينها يفصلها عن المحتوى */
div#side_info,
body.mod1 div#side_info,
body.mod2 div#side_info,
body.mod3 div#side_info{
  background:transparent url("img/vip/shadow-b-rtl.png") no-repeat right top !important;
  width:257px !important;
  min-height:453px;
  padding-right:16px !important;
  margin-right:0 !important;
  position:relative;
  z-index:3;
}

/* hover روابط القائمة بخلفية tatar-w */
div#side_navi a:hover{
  background:transparent url("img/vip/menu-bg-rtl.gif") no-repeat right top !important;
}
div#side_navi p.deltimer a:hover,
div#side_navi a#logo:hover{
  background:none !important;
}

/* إزالة حدود الـ border التجريبية السابقة لو بقيت */
div.village1 div#content{
  border-right:none !important;
  border-left:none !important;
}

/* === محاذاة نصوص RTL لمحتوى القرية === */
div.village1 div#content{ direction:rtl; }
div.village1 table thead th,
div.village1 table thead td{ text-align:right !important; }
div.village1 table td{ text-align:right; }
/* الأرقام تبقى يسار (قراءة طبيعية للأرقام) */
div.village1 table td.num{ text-align:left !important; }
/* لوحة الإنتاج/القوات/الحركة: محاذاة يمين */
div.village1 table#production td,
div.village1 table#troops td,
div.village1 table#movements td{ text-align:right; }
div.village1 table#production td.num,
div.village1 table#troops td.num{ text-align:left !important; }
/* شريط الموارد يبقى LTR عمدا (لا نلمسه) */

/* === محاذاة نصوص RTL لقائمة القرى (side_info) === */
div#side_info{ direction:rtl; text-align:right; }
div#side_info table{ direction:rtl; }
div#side_info td.link{ text-align:right; }
div#side_info td.dot{ text-align:right; }
/* الإحداثيات تبقى LTR (أرقام مثل -100 | -53) */
div#side_info td.aligned_coords{ direction:ltr; text-align:left; }
/* حقل البحث */
div#side_info input#village-search{ direction:rtl; text-align:right; }

/* === محاذاة عنوان قائمة القرى (thead) يمين === */
div#side_info table thead td,
div#side_info table thead td a{
  text-align:right !important;
}

/* === حماية خريطة مباني dorf2 من قلب RTL === */
div.village2 div#village_map{ direction:ltr !important; float:none !important; }
div.village2 div#village_map img{ direction:ltr !important; }

/* === محاذاة نصوص dorf2 (village2) يمين === */
div.village2 div#content{ direction:rtl; }
div.village2 h1{ left:auto !important; right:25px !important; text-align:right !important; }
div.village2 h1 div#loyality{ float:none !important; }
div.village2 table#building_contract thead th{ text-align:right !important; }
div.village2 table#building_contract tbody td{ text-align:right; }

/* ===== RTL: صفحة الملف الشخصي (div.player) ===== */
/* رفع طبقة المحتوى فوق #side_info (z-index:3) لتحرير نقر التبويبات #textmenu */
div#content.player, div#content.reports { position: relative; z-index: 5; }
div#content.player { direction: rtl; }
div#content.player table#profile td.details table td { text-align: right; }
div#content.player table#profile td.details table th { text-align: right; }
div#content.player table#villages td.nam { text-align: right; }
/* أيقونات إجراءات القرى (inline float:right) تُقلب يساراً كي لا تزاحم الاسم */
div#content.player table#villages td.nam > span { float: left !important; }
/* عناوين الجداول تقاوم RTL — فرض اليمين */
div#content.player table#profile thead th,
div#content.player table#profile thead td,
div#content.player table#villages thead th,
div#content.player table#villages thead td { text-align: right !important; }
/* الإحداثيات تبقى LTR */
div#content.player td.aligned_coords { direction: ltr; }

/* ===== RTL: صفحة التقارير (div.reports) ===== */
div#content.reports { direction: rtl; }
/* محاذاة عنوان التقرير (td.sub > div) يميناً */
div#content.reports table#overview td.sub { text-align: right; }
div#content.reports table#overview td.sub div { text-align: right; }
div#content.reports table#overview td.sub img { float: right; }
div#content.reports table#overview td.sub div { padding-left: 0; padding-right: 24px; }
/* حقيبة النهب (Phase C/E+F) تطفو كعنصر شقيق مستقل بموضع ثابت (يسار) —
   عكس أيقونة نوع التقرير الرئيسية (يمين) — لا كصورة متداخلة بصندوق
   العنوان المتغيّر الطول (float:left+width ثابت مُعرَّفة بـcompact.css
   على .reportBagTip نفسها، مطابقةً لـtd.c-vil .farmBagTip). تُلغى قاعدة
   float:right العامة أعلاه لصورتها الداخلية تحديداً كي لا يطفو عنصران
   متداخلان بالاتجاهين المتعاكسين داخل نفس الصندوق الصغير. */
div#content.reports table#overview td.sub .reportBagTip img.flBag { float: none; }
div#content.reports table#overview tfoot th.buttons { text-align: right !important; }
/* عناوين الجداول */
div#content.reports table#overview thead th,
div#content.reports table#overview thead td { text-align: right !important; }
/* التاريخ والـ checkbox يبقيان توسيطاً (مناسب) — لا تغيير */

/* ===== RTL: صفحة الرسائل (div.messages) ===== */
div#content.messages { direction: rtl; position: relative; z-index: 5; }
div#content.messages table#overview td.top { text-align: right; }
div#content.messages table#overview td.send { text-align: right; }
div#content.messages table#overview thead th,
div#content.messages table#overview thead td { text-align: right !important; }
/* td.dat (التاريخ) يبقى توسيطاً — لا تلمسه */

/* ===== RTL: crop_finder (table#member داخل #content.player) ===== */
div#content.player table#member { direction: rtl; }
div#content.player table#member thead th,
div#content.player table#member thead td { text-align: right !important; }
div#content.player table#member tbody td { text-align: right; }
/* عمود المسافة (Distance) فيه div توسيط داخلي — يبقى كما هو */

/* ===== RTL: صفحات الحساب (login/signup/activate/logout) ===== */
div#content.login,
div#content.signup,
div#content.activate,
div#content.logout { direction: rtl; }

/* جداول النماذج: عناوين الحقول (th) يمين */
div#content.login table#login_form th,
div#content.signup table#sign_input th,
div#content.signup table#sign_select th { text-align: right !important; }

/* خلايا النماذج يمين */
div#content.signup table#sign_input td,
div#content.signup table#sign_select td { text-align: right; }

/* side_info الخاص بصفحات الحساب (outgame) يمين */
div#side_info.outgame { direction: rtl; text-align: right; }

/* ===== RTL: صفحات النظام (banned/maintenance/winner/rules) ===== */
/* مرسى body مميّز — لا نستخدم #content.village1/.village2 كي لا نكسر dorf */
body.pageBanned div#content,
body.pageMaint div#content,
body.pageWinner div#content,
body.pageRules div#content { direction: rtl; text-align: right; }

/* winner: صورة الفوز كانت align=right — في RTL نريدها يسار */
body.pageWinner div#content img[align="right"] { float: left; }

/* ===== RTL: الإحصائيات/الترتيب (#content.statistics) ===== */
div#content.statistics { direction: rtl; position: relative; z-index: 5; }
/* عناوين الأعمدة (في thead td) والعنوان الكبير (thead th) يمين */
div#content.statistics table thead th,
div#content.statistics table thead td { text-align: right !important; }
/* خلايا المحتوى يمين */
div#content.statistics table tbody td { text-align: right; }
/* عمود رقم الترتيب (td.ra) يبقى يميناً ومضغوطاً */
div#content.statistics table tbody td.ra { text-align: right; white-space: nowrap; }
/* الإحداثيات (إن وُجدت في القرى/المناطق) تبقى LTR */
div#content.statistics td.aligned_coords { direction: ltr; }
/* أعمدة الأسماء يمين (تخصيص أعلى عبر !important) */
div#content.statistics table td.pla,
div#content.statistics table td.al,
div#content.statistics table td.hero,
div#content.statistics table td.vil { text-align: right !important; }
/* أعمدة الأرقام توسيط */
div#content.statistics table td.pop,
div#content.statistics table td.lev,
div#content.statistics table td.xp,
div#content.statistics table td.ra { text-align: center !important; }
/* أعمدة جدول ترتيب الأبطال المضافة لاحقاً (%هجوم/%دفاع/%سرعة/الحالة) —
   لم تكن موجودة وقت القائمة العامة أعلاه، فتبقى بالافتراض يمين (سطر 317)
   بدل التوسيط المطلوب. قاعدة جديدة مقيَّدة بـ#heroes تحديداً بدل توسيع
   القائمة العامة أعلاه (لا تؤثر على أي جدول آخر) */
div.statistics table#heroes td.atkp,
div.statistics table#heroes td.defp,
div.statistics table#heroes td.spdp,
div.statistics table#heroes td.stat { text-align: center !important; }

/* أيقونات الترتيب (submenu/submenu2): كتلة "عكس الجهتين لـRTL" هذه أُزيلت
   Follow-up 2026-07-18 — كانت مبنية على افتراض خاطئ أن compact.css يحمل
   قيماً LTR افتراضية تحتاج عكساً هنا. القيم الحقيقية الآن منقولة حرفياً
   من مرجع utatar RTL الفعلي (/root/_Qs_.css) مباشرة إلى compact.css
   (position:relative+float، بلا top إطلاقاً) — فلا حاجة لعكس، وهذه الكتلة
   (position:absolute + top:120px !important) كانت تُبطِل الإصلاح الجديد
   كلياً عبر !important + specificity أعلى (#content). راجع compact.css
   ~سطر 2615 للقيم الفعلية الحالية. */

/* ===== RTL: plus + plus1 (مرسى #content.plus من pmenu) ===== */
div#content.plus { direction: rtl; position: relative; z-index: 5; }
div#content.plus table.plusFunctions thead th,
div#content.plus table.plusFunctions thead td { text-align: right !important; }
div#content.plus table.plusFunctions tbody td.desc { text-align: right; }
/* جداول أسعار PayPal مصمّمة LTR عمداً (lang_ltr) — أبقِها LTR */
div#content.plus table.rate_details { direction: ltr; }

/* ===== RTL: packages (صنف body، لا village1) ===== */
body.pagePackages div#content { direction: rtl; text-align: right; position: relative; z-index: 5; }

/* ===== RTL: support (نموذج في #mid) ===== */
body.pageSupport div#mid { direction: rtl; }
body.pageSupport table.form_table td.form_table_label { text-align: right; }
body.pageSupport h1, body.pageSupport p { text-align: right; }

/* ===== RTL: الدليل (manual iframe) ===== */
body.manual { direction: rtl; text-align: right; }

/* ===== RTL: الخريطة (إطار يمين، الشبكة تبقى LTR) ===== */
div#content.map { direction: rtl; }
/* ⚠️ حماية الخريطة نفسها — إحداثيات بكسل مطلقة، تبقى LTR (درس dorf2) */
div#content.map div#map,
div#content.map div#map_content,
div#content.map div#map_rulers,
div#content.map map#map_overlay,
div#content.map #map_links,
div#content.map #map_navibox { direction: ltr !important; }
/* عنوان الخريطة + صندوق المعلومات: نص يمين */
div#content.map h1 { text-align: right; }
div#content.map table#map_infobox th { text-align: right !important; }
/* ملاحظة: table#brought_in غير موجود في القوالب — حُذفت قاعدته */
/* صندوق التفاصيل يساراً (كبقية المواقع) + منع تراكبه مع العنوان */
div#content.map table#map_infobox { left: 0 !important; right: auto !important; }
div#content.map h1 { clear: both; position: relative; z-index: 6; }

/* ===== RTL: dorf3 (صنف body — لا village3 كي لا نكسر dorf1/dorf2) ===== */
body.pageDorf3 div#content { direction: rtl; position: relative; z-index: 5; }
body.pageDorf3 div#content table thead th,
body.pageDorf3 div#content table thead td,
body.pageDorf3 div#content table tr.sum th { text-align: right !important; }
body.pageDorf3 div#content table td.vil { text-align: right; }
body.pageDorf3 div#content table td.lum,
body.pageDorf3 div#content table td.clay,
body.pageDorf3 div#content table td.iron,
body.pageDorf3 div#content table td.crop,
body.pageDorf3 div#content table td.max123,
body.pageDorf3 div#content table td.max4,
body.pageDorf3 div#content table td.tra { text-align: center; }
/* إخفاء أيقونات الإجراءات (موارد/قوات/تاج) — اسم القرية فقط (آخر <a>) */
body.pageDorf3 div#content table td.vil a:not(:last-child),
body.pageDorf3 div#content table td.vil > span { display: none; }

/* ============ RTL: صفحة البناء (build.php) v39 ============ */
/* المرسى الفريد الآمن: #content.build — لا يتسرّب لـ dorf */
#content.build {
    direction: rtl;
    text-align: right;
}
/* حاوية المبنى — id="build" مكرّر، نستهدفه داخل المرسى فقط */
#content.build #build,
#content.build .build_desc {
    direction: rtl;
    text-align: right;
}
/* جدول قيم المبنى: العناوين يميناً (thead/th يقاوم RTL دائماً) */
#content.build #build_value th,
#content.build #build_value td {
    text-align: right !important;
}
/* جداول التدريب (قوالب الجيش) */
#content.build .build_details th,
#content.build .build_details td,
#content.build .under_progress th,
#content.build .under_progress td {
    text-align: right !important;
}
/* زر الترقية */
#content.build a.build {
    text-align: center;
}
/* كتلة التكلفة/الموارد: تبقى LTR لقراءة الأرقام بترتيبها (مثل res.tpl) */
#content.build #contract {
    direction: ltr;
    text-align: right;
}
/* ========================================================= */

/* ===== RTL: شاشة تشييد مبنى جديد (gid0 / new_building) ===== */
#content.build div#build.gid0 table.new_building {
    direction: rtl;
    width: 100%;
}
#content.build div#build.gid0 table.new_building td.desc {
    text-align: right !important;
    direction: rtl;
}
#content.build div#build.gid0 table.new_building td.bimg {
    text-align: left;
    padding-right: 15px;
    padding-left: 5px;
}
#content.build div#build.gid0 table.new_building td.res {
    direction: ltr;
    text-align: right !important;
}
#content.build div#build.gid0 table.new_building td.requ {
    text-align: right !important;
    direction: rtl;
}
#content.build div#build.gid0 table.new_building td.link,
#content.build div#build.gid0 table.new_building a.build {
    text-align: right !important;
    direction: rtl;
}
#content.build div#build.gid0 h2 {
    text-align: right;
    direction: rtl;
}
/* ========================================================= */

/* ===== a2b (Send Troops) RTL — v44 ===== */
div#content.a2b { direction: rtl; }

/* عناوين ونصوص عامة */
div#content.a2b h1 { text-align: right; }

/* جدول الوجهة/المالك */
div#content.a2b table#short_info th { text-align: right !important; }
div#content.a2b table#short_info td { text-align: right; }

/* thead في troop_details يقاوم دائماً */
div#content.a2b table.troop_details thead td,
div#content.a2b table.troop_details thead th { text-align: right !important; }
div#content.a2b table.troop_details tbody th { text-align: right; }

/* شبكة إدخال القوات: التدفّق ينقلب، لكن محتوى الخلية يبقى LTR لقراءة الأرقام */
div#content.a2b table#troops { direction: rtl; }
div#content.a2b table#troops td {
    direction: rtl;
    text-align: right;
    white-space: nowrap;
}
div#content.a2b table#troops td input.text { direction: ltr; }
div#content.a2b table#troops td a,
div#content.a2b table#troops td span.none { direction: ltr; unicode-bidi: embed; }

/* جدول الإحداثيات: التدفّق ينقلب، حقول x/y تبقى LTR */
div#content.a2b table#coords { direction: rtl; }
div#content.a2b table#coords td.sel { text-align: right; }
div#content.a2b table#coords td.vil,
div#content.a2b table#coords td.target {
    direction: rtl;
    text-align: right;
}
div#content.a2b table#coords td.vil *,
div#content.a2b table#coords td.target * {
    float: right !important;
    margin-right: 0 !important;
    margin-left: 10px !important;
}
div#content.a2b table#coords td.target input.text { direction: ltr; }

/* صفوف الوقت تبقى LTR */
div#content.a2b div.in,
div#content.a2b div.at { direction: ltr; text-align: right; }

/* رسائل الخطأ والأزرار */
div#content.a2b p.error { text-align: right; }
div#content.a2b p.btn { text-align: right; }

/* ===== karte (vilview - village preview panel) RTL — v45 ===== */
/* div#content.map مشترك مع mapview (خريطة كاملة بإحداثيات بكسل).
   نقيّد كل قاعدة بعناصر vilview الفريدة فقط ولا نلمس الخريطة. */

/* العنوان: اسم القرية ثم الإحداثيات، يبدأ يمين */
div#content.map h1 { text-align: right; }

/* قلب التخطيط الأفقي: البيانات يسار، الصورة يمينها */
div#content.map img#detailed_map { float: right !important; left: auto !important; right: 15px; }
div#content.map div#map_details { float: left !important; margin-right: auto !important; margin-left: 3px; }

/* عناوين رؤوس الجداول (تقارير/خيارات) تقاوم RTL */
div#content.map div#map_details table.tableNone thead th,
div#content.map table#options thead th { text-align: right !important; }
div#content.map div#map_details table.tableNone thead th div,
div#content.map table#options thead th div { float: right !important; }

/* جدول معلومات القرية: اللابل يمين، القيمة يمينها مباشرة */
div#content.map table#village_info { direction: rtl; }
div#content.map table#village_info tbody th { text-align: right; }
div#content.map table#village_info tbody td { text-align: right; }

/* صفوف التقارير: تبدأ يمين */
div#content.map div#map_details table.rep { direction: rtl; }
div#content.map div#map_details table.rep td { text-align: right; }

/* قسم الخيارات: العنوان والروابط تبدأ يمين (السهم » يبقى ويظهر يميناً) */
div#content.map table#options { direction: rtl; }
div#content.map table#options tbody td { text-align: right; padding-left: 0; padding-right: 4px; }

/* جداول الأرقام (توزيع الأرض/قوات الواحة) صفوفها rtl والوصف يمين */
div#content.map div#map_details table#distribution,
div#content.map div#map_details table#troop_info,
div#content.map div#map_details table#bonus { direction: rtl; }
div#content.map div#map_details table#distribution td.desc,
div#content.map div#map_details table#troop_info td.desc { text-align: right; }

/* وسم العاصمة: قلب الموضع لـ RTL ومنع القطع */
div#content.map div#dmain {
    direction: rtl;
    left: auto !important;
    right: 25px;
    text-align: right;
    white-space: nowrap;
}

/* ===== allianz (alliance) RTL — v45 — Session 1: overview + menu ===== */
div#content.alliance { direction: rtl; }
div#content.alliance h1 { text-align: right; }

/* شريط التبويبات */
div#content.alliance div#textmenu { direction: rtl; text-align: right; }

/* قلب float الأساسي لجداول dipl (يبطل compact.css سطر 2485) */
div#content.alliance table.dipl,
div#content.alliance div#box { float: right !important; }
div#content.alliance table.infos { float: left !important; }

/* محاذاة خلايا dipl يمين (يبطل compact.css سطر 4313) */
div#content.alliance table.dipl td { text-align: right !important; }
div#content.alliance table.dipl th { text-align: right; }

/* جدول الأعضاء: الصفوف rtl، أعمدة الأرقام توسيط */
div#content.alliance table#member { direction: rtl; }
div#content.alliance table#member td.ra,
div#content.alliance table#member td.hab,
div#content.alliance table#member td.vil { text-align: center; }
div#content.alliance table#member td.pla { text-align: right; }
div#content.alliance table#member td.on { text-align: center; }

/* جدول البروفايل: الجدول الداخلي th يمين، خلايا الوصف يمين */
div#content.alliance table#profile { direction: rtl; }
div#content.alliance table#profile td.details table th { text-align: right; }
div#content.alliance table#profile td.details table td { text-align: right; }
div#content.alliance table#profile td.desc1 div.desc1div,
div#content.alliance table#profile td.desc2 div.desc2div { direction: rtl; text-align: right; }

/* صفحة Options: نص الخيار يبدأ يمين (يبطل compact.css سطر 4252) */
div#content.alliance table#options td.val { text-align: right !important; }
div#content.alliance table#options td.sel { text-align: center; }

/* ----- Session 2: news + attacks ----- */

/* الأخبار: نص الحدث يبدأ يمين (يبطل compact 4233) */
div#content.alliance table#events td.event { text-align: right !important; }

/* الهجمات: نص اللاعب يبدأ يمين، الأيقونة (سيفان) قبله يميناً (يبطل compact 4216/4219/4222) */
div#content.alliance table#offs td.sub { text-align: right !important; }
div#content.alliance table#offs td.sub img { float: right !important; margin-left: 5px; margin-right: 0; }
div#content.alliance table#offs td.sub div { padding-left: 0 !important; padding-right: 24px !important; }

/* أيقونتا التصفية (سيفين/درع) فوق: مثبّتتان absolute يمين أصلاً (مناسب RTL).
   نُنزلهما قليلاً فقط لتفادي تراكبهما مع شريط التبويبات، دون لمس right. */
div#content.alliance div#submenu { top: 165px !important; }

#content.build table.under_progress thead tr:first-child td {
    text-align: center !important;
}


/* ===== Farm List (utatar-style rebuild) — Phase 1 RTL overrides, 2026-07-09 ===== */
/* Village name column: compact.css forces text-align:left; flip it for RTL. */
#content.build table.farmTable td.c-vil,
#content.build table.farmTable th.c-vil { text-align: right !important; }
#content.build .farmListTitle { text-align: right; }
/* Keep numeric/troop headers centered even against any global left rule. */
#content.build table.farmTable thead th.c-dur,
#content.build table.farmTable thead th.c-troops { text-align: center !important; }

/* ===== Farm List — Phase 2 RTL overrides, 2026-07-10 =====
   (The old "table.farmTroopEdit td.c-un" rule was removed in Phase 5: that
   4-column table no longer exists, replaced by the .flTroopList stacked
   list, which already flows correctly in RTL via normal flex direction.) */
/* Result message: order sent (right) then failed (left) naturally in RTL flow. */
#content.build .farmResSent, #content.build .farmResFail { display: inline-block; }

/* ===== Farm List — Phase 4B RTL overrides ("بحث" search results), 2026-07-10 ===== */
/* Numeric result headers stay centered; owner header flips to the right for RTL. */
#content.build table.farmSearchResults thead th.c-pop,
#content.build table.farmSearchResults thead th.c-cost,
#content.build table.farmSearchResults thead th.c-dur { text-align: center !important; }
#content.build table.farmSearchResults td.c-own,
#content.build table.farmSearchResults th.c-own { text-align: right !important; }

/* ===== الحداد (gid=12) — عكس اتجاه float للصف المضغوط، Phase 4b (2026-07-17) ===== */
div#build div.buildActionOverview div.action div.details { float: right; }
div#build div.buildActionOverview div.action div.details div.showCosts .resources,
div#build div.buildActionOverview div.action div.details div.showCosts .clocks { float: right; }

/* Phase 3.2b — gold-transfer tab: restore RTL on the transfer FORM table.
   rtl.css:363 above forces div#content.plus table.rate_details to LTR, a rule
   aimed at the Plus PRICING tables. The transfer form reuses that same class
   (the reference requires it), so it inherited LTR. This scoped rule carries
   higher specificity (extra .goldTransfer class) and wins, for id=6 only. */
div#content.plus.goldTransfer table.rate_details { direction: rtl; }
