/* ==========================================================================
   Lexora Demo & RTL Core Settings - Enterprise Layout Architecture
   ========================================================================== */

/* ---- Core Typography & Multilingual Reset ---- */
html, body {
  font-family: 'Inter', 'Cairo', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Optimize Cairo styling specifically for premium corporate Arabic readability */
[dir="rtl"], [dir="rtl"] * {
  font-family: 'Cairo', sans-serif !important;
  letter-spacing: 0 !important; /* Cairo doesn't require Latin-style tracking */
}

/* ---- Layout Spacing & Spacers ---- */
.demo-blocks > * {
  display: block !important;
}

/* RTL Safe Inline Spacing - Removes directional bias */
.demo-inline-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

[dir="ltr"] .demo-inline-spacing > * { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .demo-inline-spacing > * { margin-left: 0.5rem !important; margin-right: 0 !important; }

.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/* ---- Bootstrap Form Select Fix for RTL (Lexora Premium Precision) ---- */
[dir="rtl"] .form-select {
  background-position: left 1rem center !important;
  padding-right: 1rem !important;
  padding-left: 2.5rem !important;
}

/* ---- Premium Component Overrides & RTL Fixes ---- */

/* Fix dropdown arrow flips in RTL */
[dir="rtl"] .dropdown-toggle::after {
  margin-right: 0.25rem;
  margin-left: 0;
  vertical-align: 0.15em;
}

/* Ensure corporate modals don't shift padding when opening in RTL */
[dir="rtl"] .modal-header .btn-close {
  margin-right: auto;
  margin-left: -0.5rem;
}

/* ---- Z-Index Architecture ---- */
.content-wrapper .navbar {
  z-index: auto;
}

/* ---- Responsive Viewport Tuning ---- */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 230px;
    position: relative;
  }
}