/* RTL Overrides for SignVision CMS — Arabic language support */

/* ===== BASE DIRECTION ===== */
html[dir="rtl"] { direction: rtl; text-align: right; }
html[dir="rtl"] body { direction: rtl; text-align: right; }

/* ===== NAVIGATION ===== */
html[dir="rtl"] .nav-menu a { text-align: right; }

/* ===== SIDEBAR — mirror to right side ===== */
html[dir="rtl"] .dashboard { flex-direction: row-reverse; }
html[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.1);
}
html[dir="rtl"] .sidebar-menu a {
    flex-direction: row-reverse;
    text-align: right;
}
html[dir="rtl"] .sidebar-menu a:hover,
html[dir="rtl"] .sidebar-menu a.active {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* ===== GROUPS SIDEBAR ===== */
html[dir="rtl"] .groups-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}
html[dir="rtl"] .group-tree-children {
    padding-left: 0;
    padding-right: 24px;
}

/* ===== TABLES ===== */
html[dir="rtl"] .data-table th,
html[dir="rtl"] .data-table td,
html[dir="rtl"] .table th,
html[dir="rtl"] .table td { text-align: right; }

/* ===== FORMS ===== */
html[dir="rtl"] .form-control { text-align: right; }
html[dir="rtl"] .form-control[placeholder] { direction: rtl; }

/* ===== ALERTS — border on right instead of left ===== */
html[dir="rtl"] .alert-success { border-left: none; border-right: 4px solid var(--success-color); }
html[dir="rtl"] .alert-error { border-left: none; border-right: 4px solid var(--danger-color); }
html[dir="rtl"] .alert-warning { border-left: none; border-right: 4px solid var(--warning-color); }

/* ===== OVERRIDES & BADGES ===== */
html[dir="rtl"] .override-badge { margin-left: 0; margin-right: 5px; }

/* ===== MODAL ===== */
html[dir="rtl"] .modal-content { text-align: right; }

/* ===== HEADER — flip margin on tenant caret ===== */
html[dir="rtl"] .header-content [style*="margin-left: 5px"] {
    margin-left: 0 !important;
    margin-right: 5px;
}

/* ===== LOGIN ===== */
html[dir="rtl"] .login-container .form-control { text-align: right; direction: rtl; }

/* ===== MOBILE MENU ===== */
@media (max-width: 992px) {
    html[dir="rtl"] .nav-menu a { text-align: right; }
    html[dir="rtl"] .sidebar-menu { justify-content: center; }
}

/* ===== SCROLLBAR RTL FIX ===== */
html[dir="rtl"] ::-webkit-scrollbar { direction: rtl; }

/* ===== FORM GRID ===== */
html[dir="rtl"] .grid-2 { direction: rtl; }
