/* Right-to-left layout (Arabic). Loaded only when the page language is RTL.
   <html dir="rtl"> already mirrors flex rows, tables, text and inline order; this file flips the
   places the stylesheet pins to a physical side (left/right margins, borders, drawers, dropdowns). */
html[dir="rtl"] body{text-align:right;}
html[dir="rtl"] input,html[dir="rtl"] textarea,html[dir="rtl"] select{text-align:right;}
html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="url"],html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[name="email"],html[dir="rtl"] .mono,html[dir="rtl"] code{direction:ltr;text-align:left;}

/* header, menus, dropdowns */
html[dir="rtl"] .navbtn-dropdown{left:auto;right:0;}
html[dir="rtl"] .navbtn-dropdown a{text-align:right;}
html[dir="rtl"] .notif-badge{right:auto;left:2px;}
html[dir="rtl"] .search-wrap svg{left:auto;right:8px;}
html[dir="rtl"] .search-input{padding-left:10px;padding-right:28px;}
html[dir="rtl"] .nav-icon{margin-right:0;margin-left:6px;}
html[dir="rtl"] .section-head .num{margin-right:0;margin-left:8px;}
html[dir="rtl"] .view-menu-list{right:auto;left:0;}
html[dir="rtl"] .lang-switch-menu{left:0;right:auto;}
@media (max-width:768px){
  html[dir="rtl"] .navbtn{text-align:right;}
  html[dir="rtl"] .navbtn-dropdown a{padding:12px 40px 12px 24px;}
}

/* tables and numbers */
html[dir="rtl"] th{text-align:right;}
html[dir="rtl"] .right,html[dir="rtl"] .cx-raised{text-align:left;}
html[dir="rtl"] .next-launch-countdown #countdownTimer{margin-left:0;margin-right:auto;}
html[dir="rtl"] .chain-breakdown .chip .muted{margin-left:0;margin-right:5px;}
html[dir="rtl"] .trust-chip{margin-left:0;margin-right:6px;}

/* drawer slides in from the left */
html[dir="rtl"] .drawer{right:auto;left:0;transform:translateX(-100%);border-left:none;border-right:2px solid var(--ink);}
html[dir="rtl"] .drawer.open{transform:translateX(0);}
html[dir="rtl"] .drawer-close{float:left;}

/* article and editor typography */
html[dir="rtl"] .article-content ul,html[dir="rtl"] .article-content ol,
html[dir="rtl"] .rich-editor ul,html[dir="rtl"] .rich-editor ol,html[dir="rtl"] .price-card ul{padding-left:0;padding-right:24px;}
html[dir="rtl"] .article-content blockquote,html[dir="rtl"] .rich-editor blockquote{padding-left:0;padding-right:18px;border-left:none;border-right:3px solid var(--accent);}

/* ad close buttons, cookie notice, toast */
html[dir="rtl"] .float-ad-close{right:auto;left:-12px;}
html[dir="rtl"] .float-ad-popup .float-ad-close{right:auto;left:8px;}
html[dir="rtl"] .float-ad-left{left:auto;right:12px;}

/* listing page and decorative rails */
html[dir="rtl"] .news-promo-row{border-left:none;border-right:5px solid #f2b705;}
html[dir="rtl"] .lp-lead{padding:0 18px 0 0;border-left:none;border-right:4px solid var(--accent);}
html[dir="rtl"] .lp-timeline{padding:0 26px 0 0;border-left:none;border-right:2px solid var(--line);}
html[dir="rtl"] .lp-dot{left:auto;right:-34px;}
html[dir="rtl"] .lp-toc{border-left:none;border-right:2px solid var(--line);padding-left:0;padding-right:12px;}
html[dir="rtl"] .lp-poster-body .side-card{text-align:right;}
html[dir="rtl"] .pc-hot a+a:before,html[dir="rtl"] .pc-sh h2:before,html[dir="rtl"] .pc-side h3:before{margin-right:0;margin-left:8px;}

/* arrows used as "next" cues read the other way */
html[dir="rtl"] .flip-rtl{display:inline-block;transform:scaleX(-1);}

/* Arabic reads better with a system Arabic face and a little more line height */
html[dir="rtl"] body{font-family:"Noto Naskh Arabic","Segoe UI",Tahoma,"Geeza Pro","Arial",var(--font-body,sans-serif);line-height:1.7;}
html[dir="rtl"] .brand-mark,html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3{letter-spacing:0;}
