/* ─── E'elancom Platform Styles ─────────────────────────────────── */

/* Arabic font import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ─── RTL Global Overrides ──────────────────────────────────────── */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }

/* ─── Navbar RTL ────────────────────────────────────────────────── */
[dir="rtl"] .navbar-nav { margin-right: auto; margin-left: 0; }
[dir="rtl"] .dropdown-menu-end { right: auto; left: 0; }

/* ─── Breadcrumb ────────────────────────────────────────────────── */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  content: "\\";
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
}

/* ─── Form inputs ───────────────────────────────────────────────── */
[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
  text-align: right;
}

/* ─── Table alignment ───────────────────────────────────────────── */
[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}

/* ─── Card layout ───────────────────────────────────────────────── */
[dir="rtl"] .card-header {
  text-align: right;
}

/* ─── Icons in RTL — flip directional icons ─────────────────────── */
[dir="rtl"] .bi-arrow-left::before { content: "\F135"; } /* arrow-right */
[dir="rtl"] .bi-arrow-right::before { content: "\F12F"; } /* arrow-left */
[dir="rtl"] .bi-chevron-left::before { content: "\F285"; }
[dir="rtl"] .bi-chevron-right::before { content: "\F282"; }

/* ─── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .table-responsive { -webkit-overflow-scrolling: touch; }

  /* Stack wizard steps */
  .wizard-steps { flex-direction: column; }

  /* Screen cards: 1 col on mobile */
  .screen-grid .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
}

/* ─── Loading spinners ───────────────────────────────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.btn-loading .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* ─── Empty state ────────────────────────────────────────────────── */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #6c757d;
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty-state h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.875rem;
}

/* ─── Status badges ──────────────────────────────────────────────── */
.badge-active    { background-color: #198754; }
.badge-pending   { background-color: #fd7e14; }
.badge-inactive  { background-color: #6c757d; }
.badge-rejected  { background-color: #dc3545; }
.badge-approved  { background-color: #0d6efd; }

/* ─── Currency display ───────────────────────────────────────────── */
.amount-omr {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
