html[lang="ar"] body { font-family:Tahoma, Arial, sans-serif; line-height:1.7; }
/* Arabic follows document direction; media timelines and technical values stay LTR. */
html[dir="rtl"] .sidebar { left:auto; right:var(--safe-area-right); }
html[dir="rtl"] .workspace { padding-left:var(--safe-area-left); padding-right:0; }
html[dir="rtl"] .header-popover,
html[dir="rtl"] .watch-more-menu { right:auto; left:0; }
html[dir="rtl"] .header-menu-row,
html[dir="rtl"] .watch-more-menu .button,
html[dir="rtl"] .comments-preview,
html[dir="rtl"] th { text-align:start; }
html[dir="rtl"] .watch-actions,
html[dir="rtl"] .channel-header .subscription-form,
html[dir="rtl"] .comments-preview-heading::after { margin-left:0; margin-right:auto; }
html[dir="rtl"] .watch-channel-row > .button { margin-left:0; margin-right:8px; }
html[dir="rtl"] .comment-card > [data-comment-content] { padding-right:0; padding-left:36px; }
html[dir="rtl"] .comment-menu { right:auto; left:0; }
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[name="handle"],
html[dir="rtl"] input[name="code"],
html[dir="rtl"] code,
html[dir="rtl"] pre,
html[dir="rtl"] .persistent-player,
html[dir="rtl"] .persistent-live-player,
html[dir="rtl"] .player-controls,
html[dir="rtl"] .live-player-controls { direction:ltr; }
html[dir="rtl"] .comment-body,
html[dir="rtl"] .live-chat-message-copy p,
html[dir="rtl"] .media-description { unicode-bidi:plaintext; }
html[dir="rtl"] .global-search input { border-radius:0 24px 24px 0; }
html[dir="rtl"] .global-search button { border-radius:24px 0 0 24px; }
@media (min-width:701px) and (max-width:900px) {
  html[dir="rtl"] .sidebar { transform:translateX(110%); }
  html[dir="rtl"] body.sidebar-open .sidebar { transform:translateX(0); }
}
@media (max-width:700px) {
  html[dir="rtl"] .watch-actions { margin-right:0; }
  html[dir="rtl"] .watch-more-menu { left:auto; right:0; }
  html[dir="rtl"] .mobile-account-link > svg:last-child,
  html[dir="rtl"] .mobile-search-back svg { transform:scaleX(-1); }
}
