/*
 * RTL (Right-to-Left) Language Support
 *
 * Mirrors directional CSS properties from style.css for RTL languages
 * such as Arabic, Hebrew, Persian, and Urdu.
 *
 * Loaded automatically by WordPress when the site language is RTL
 * via wp_style_add_data( 'fanspaysite-style', 'rtl', 'replace' ).
 *
 * @package FansPaysite
 * @since   2.3
 */

/* ==============================================
   Layout System
   ============================================== */

/* Dropdown menu: mirror flyout direction */
.ui.dropdown.fpsDropdown .menu {
  left: auto !important;
  right: 4px !important;
}

/* ==============================================
   Sidebar Widgets
   ============================================== */

.widget_block ul,
.wp-block-archives-list {
  padding-right: 0;
  padding-left: initial;
  margin-right: 0;
  margin-left: initial;
}

.wp-block-archives-list li {
  padding-right: 0;
  padding-left: initial;
}

.widget_recent_comments .wp-block-latest-comments {
  padding-right: 0;
  padding-left: initial;
}

/* ==============================================
   Sticky Post
   ============================================== */

.sticky {
  border-left: none;
  border-right: 2px solid #553344;
}

/* ==============================================
   Post Author Comments
   ============================================== */

.bypostauthor {
  border-left: none;
  border-right: 4px solid;
  padding-left: 0;
  padding-right: 16px;
}

/* ==============================================
   Alignments
   ============================================== */

.alignright {
  float: left;
  margin: 0 20px 20px 0;
}

.alignleft {
  float: right;
  margin: 0 0 20px 20px;
}

/* ==============================================
   Badge Spacing
   ============================================== */

.badge.bg-secondary {
  margin-right: 0;
  margin-left: 5px;
}

/* ==============================================
   Accessibility
   ============================================== */

.screen-reader-text:focus {
  right: auto;
  left: 5px;
}

/* ==============================================
   Main Menu Display Modes
   ============================================== */

/* Big icon mode: submenus open to the left in RTL */
.menu-display-big_icon .ui.dropdown.fpsDropdown .menu {
  left: auto !important;
  right: 100% !important;
}

/* Auto mode (narrow): submenus open to the left */
@media (max-width: 768px) {
  .menu-display-auto .ui.dropdown.fpsDropdown .menu {
    left: auto !important;
    right: 100% !important;
  }
}

/* Touch mode: submenus open to the left */
.menu-display-touch .ui.dropdown.fpsDropdown .menu {
  left: auto !important;
  right: 100% !important;
}

/* ==============================================
   Secondary Menus (Submenus)
   ============================================== */

.fps-parent-link {
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

/* ==============================================
   Top Bar Layout
   ============================================== */

.topbar-logo .site-title {
  text-align: right;
}

/* Submenu dropdown: open from right edge */
.topbar-item .topbar-submenu {
  left: auto;
  right: 0;
}

/* Nested submenu arrow */
.topbar-nested-arrow {
  margin-left: 0;
  margin-right: auto;
}

/* Nested submenu flyout: opens to the left */
.topbar-submenu-nested {
  left: auto;
  right: 100%;
}

/* Submenu item icon alignment */
.topbar-submenu-item .menu-item-icon {
  text-align: center;
}

/* Right sidebar border */
.layout-top-bar .site-sidebar-right {
  border-left: none;
  border-right: 1px solid rgba(128, 128, 128, 0.2);
}

/* ==============================================
   Burger Menu Controls
   ============================================== */

/* Close button: flip float */
.sidebar-panel-close {
  float: left;
}

.fps-burger-close {
  float: left;
}

/* Open overlay: normalize menu text alignment */
.sidebar-menu-panel.fps-open .main-navigation > div > .item > .menu-item-icon,
.sidebar-menu-panel.fps-open .main-navigation > div > .fpsDropdown > a > .menu-item-icon {
  text-align: right;
}

/* Inline submenus in overlays: indent from right */
.sidebar-menu-panel.fps-open .ui.dropdown.fpsDropdown .menu {
  padding-left: 0;
  padding-right: 16px;
}

.sidebar-menu-panel.fps-open .fps-has-submenu:not(.fpsDropdown) > .fps-submenu {
  padding-left: 0;
  padding-right: 16px;
}

/* Expanded menu (top bar hamburger): indent from right */
.site-topbar-expanded .ui.dropdown.fpsDropdown .menu {
  padding-left: 0;
  padding-right: 16px;
}

.site-topbar-expanded .fps-has-submenu:not(.fpsDropdown) > .fps-submenu {
  padding-left: 0;
  padding-right: 16px;
}

/* ==============================================
   Expanded Menu Inner
   ============================================== */

.topbar-expanded-inner {
  direction: rtl;
}
