/* LTR Override: flips RTL-specific CSS when html[dir="ltr"] */
html[dir="ltr"] .section-title {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .quick-actions-grid {
  direction: ltr !important;
}

html[dir="ltr"] .accounts-grid {
  direction: ltr !important;
}

html[dir="ltr"] .audit-stats-row {
  direction: ltr !important;
}

html[dir="ltr"] .mou_admin_table {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .mou_container {
  direction: ltr !important;
}

html[dir="ltr"] .input-group {
  text-align: left !important;
}

html[dir="ltr"] .op-card-title {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 60px !important;
}

html[dir="ltr"] .op-card-subtitle {
  text-align: left !important;
}

html[dir="ltr"] input.form-control,
html[dir="ltr"] .filter-input,
html[dir="ltr"] .custom-option {
  text-align: left !important;
}

html[dir="ltr"] .real-header {
  direction: ltr !important;
}

html[dir="ltr"] #captureArea {
  direction: ltr !important;
}

/* Table headers - RTL was text-align:right, flip to left */
html[dir="ltr"] .mou_admin_table th,
html[dir="ltr"] .mou_admin_table td {
  text-align: left !important;
}

html[dir="ltr"] .form-group select,
html[dir="ltr"] .form-group input,
html[dir="ltr"] .form-group textarea {
  text-align: left !important;
}

/* Fix for icon spacing in LTR */
html[dir="ltr"] .input-wrapper i {
  right: auto !important;
  left: 14px !important;
}

html[dir="ltr"] .search-icon {
  right: auto !important;
  left: 15px !important;
}

html[dir="ltr"] .op-card-badge {
  left: auto !important;
  right: 15px !important;
}

html[dir="ltr"] .checkmark {
  left: auto !important;
  right: 0 !important;
}

html[dir="ltr"] .checkbox_container {
  padding-left: 0 !important;
  padding-right: 35px !important;
}

html[dir="ltr"] .sidebar-submenu {
  border-right: none !important;
  border-left: 2px solid rgba(255, 204, 0, 0.3) !important;
  margin: 2px 0 4px 15px !important;
  padding: 8px !important;
}

html[dir="ltr"] .dropdown-toggle {
  border-right: 3px solid transparent !important;
  border-left: none !important;
}

html[dir="ltr"] .sidebar-dropdown-wrapper.open .dropdown-toggle {
  border-right-color: transparent !important;
  border-left-color: #ffcc00 !important;
  border-radius: 10px 0 0 10px !important;
}

html[dir="ltr"] .dropdown-arrow {
  margin-left: auto !important;
  margin-right: 0 !important;
}

html[dir="ltr"] .input-group label {
  padding-right: 0 !important;
  padding-left: 4px !important;
}

html[dir="ltr"] .mou_alert-icon {
  margin-right: 12px !important;
  margin-left: 0 !important;
}

/* Calculator */
html[dir="ltr"] .calc-display {
  text-align: left !important;
}

html[dir="ltr"] .calc-input {
  padding-right: 0 !important;
  padding-left: 40px !important;
}


html[dir="ltr"] .input.placertl::placeholder {
  text-align: left !important;
}

/* Popup header */
html[dir="ltr"] .mou_popup_header {
  direction: ltr !important;
}

/* Fix badge positioning */
html[dir="ltr"] .op-card-badge {
  left: auto !important;
  right: 15px !important;
}

/* Real phone direction */
html[dir="ltr"] .real-phone {
  direction: ltr !important;
}

/* Toast centering */
html[dir="ltr"] .toastify {
  direction: ltr !important;
}

/* Main page header actions right align in LTR */
html[dir="ltr"] .header-right {
  direction: ltr !important;
}

html[dir="ltr"] .header-left {
  direction: ltr !important;
}

/* Navigation bottom bar */
html[dir="ltr"] .navigation ul {
  direction: ltr !important;
}

/* Sidebar menu */
html[dir="ltr"] .sidebar-menu {
  direction: ltr !important;
}

html[dir="ltr"] .sidebar-menu .menu-item,
html[dir="ltr"] .menu-group-title {
  text-align: left !important;
}

/* LTR: sidebar slides from the left */
html[dir="ltr"] .sidebar-content {
  right: auto !important;
  left: 0 !important;
  border-left: none !important;
  border-right: 1px solid rgba(255, 204, 0, 0.15) !important;
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
}

html[dir="ltr"] .sidebar-drawer.open .sidebar-content {
  -webkit-transform: translateX(0);
  transform: translateX(0);
  right: auto !important;
}

/* LTR desktop sidebar on the left */
@media (min-width: 992px) {
  html[dir="ltr"] .sidebar-drawer {
    left: 0 !important;
    right: auto !important;
  }

  html[dir="ltr"] .sidebar-content {
    left: 0 !important;
    right: auto !important;
    border-right: 1px solid rgba(255, 204, 0, 0.1) !important;
    border-left: none !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
    -webkit-transform: translateX(0) !important;
    transform: translateX(0) !important;
    will-change: auto;
  }

  html[dir="ltr"] .app-header {
    right: auto !important;
    left: 280px !important;
  }

  html[dir="ltr"] .full_view {
    right: auto !important;
    left: 280px !important;
  }
}

/* LTR: overlay على الشمال عشان السايدبار على اليمين */
html[dir="ltr"] #sidebar-overlay {
  right: 0 !important;
  left: 280px !important;
}

/* Flip pagination arrows in LTR (RTL has chevron-right for prev, chevron-left for next) */
html[dir="ltr"] #page-prev i,
html[dir="ltr"] #page-next i,
html[dir="ltr"] #logs-page-prev i,
html[dir="ltr"] #logs-page-next i {
  transform: scaleX(-1);
}
