/**
 * Extreme Medical Admin Dashboard - Custom Theme Enhancements
 * Matches Sneat Bootstrap 5 PRO Theme
 */

:root {
  --em-primary: #696cff;
  --em-secondary: #8592a3;
  --em-success: #71dd37;
  --em-danger: #ff3e1d;
  --em-warning: #ffab00;
  --em-info: #03c3ec;
  --em-gradient: linear-gradient(135deg, #696cff 0%, #a855f7 100%);
  --em-glow: 0 4px 18px rgba(105, 108, 255, 0.35);
}

/* Custom Gradients & Shadows */
.hidden {
  display: none !important;
}

.bg-gradient-primary {
  background: var(--em-gradient) !important;
  color: #fff !important;
}

.shadow-primary-glow {
  box-shadow: var(--em-glow) !important;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.375rem;
  line-height: 1;
}
.status-badge i {
  font-size: 0.6rem;
}

.status-badge.success, .status-badge-success {
  background-color: rgba(113, 221, 55, 0.16) !important;
  color: #71dd37 !important;
}

.status-badge.danger, .status-badge-danger {
  background-color: rgba(255, 62, 29, 0.16) !important;
  color: #ff3e1d !important;
}

.status-badge.warning, .status-badge-warning {
  background-color: rgba(255, 171, 0, 0.16) !important;
  color: #ffab00 !important;
}

.status-badge.primary, .status-badge-primary {
  background-color: rgba(105, 108, 255, 0.16) !important;
  color: #696cff !important;
}

/* Map Containers */
.leaflet-map-container {
  min-height: 380px;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(133, 146, 163, 0.2);
}

/* Stepper Node state styles */
.step-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  transition: all 0.2s ease;
}
.step-node > .step-number {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(133, 146, 163, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.step-node.active {
  color: var(--bs-primary) !important;
}
.step-node.active > .step-number {
  background: var(--bs-primary) !important;
  color: #fff !important;
  box-shadow: var(--em-glow);
}
.step-node.completed {
  color: var(--bs-success) !important;
}
.step-node.completed > .step-number {
  background: var(--bs-success) !important;
  color: #fff !important;
}

/* DataTables Styling in Sneat */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.375rem 0.75rem !important;
  border-radius: 0.375rem !important;
  margin: 0 0.15rem !important;
  font-size: 0.8125rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--bs-primary) !important;
  color: #fff !important;
  border-color: var(--bs-primary) !important;
}

/* Custom scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(133, 146, 163, 0.25);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(133, 146, 163, 0.45);
}

/* Glassmorphic Toast for showToast fallback */
#customAlert {
  z-index: 1090;
  min-width: 280px;
}

/* ==========================================================================
   Pointer Events & Layout Interception Guards
   Prevents invisible backdrops, overlays, or loading divs from trapping mouse/touch events
   ========================================================================== */
.pointer-events-none {
  pointer-events: none !important;
}

.pointer-events-auto {
  pointer-events: auto !important;
}

/* Inactive layout backdrops must never intercept clicks or hover */
.content-backdrop:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

.layout-overlay:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

.drag-target {
  pointer-events: none !important;
}

/* Guarantee that all form controls, buttons, and clickable elements receive events */
input, select, textarea, button, .form-control, .form-select, .form-check-input, .btn {
  pointer-events: auto !important;
}

/* ==========================================================================
   SweetAlert2 Modern Compact & Theme-Adaptive (Light & Dark Mode Harmony)
   ========================================================================== */
/* Common Geometry & Proportions (Both Light & Dark) */
div:where(.swal2-container) div:where(.swal2-popup) {
  width: 25rem !important;
  max-width: 92vw !important;
  padding: 1.5rem 1.25rem !important;
  border-radius: 0.75rem !important;
  font-family: inherit !important;
}

div:where(.swal2-container) h2:where(.swal2-title) {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  padding: 0.5rem 1rem 0 !important;
  line-height: 1.4 !important;
}

div:where(.swal2-container) div:where(.swal2-html-container) {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0.5rem 0 0 !important;
}

div:where(.swal2-container) .swal2-icon {
  width: 3.25rem !important;
  height: 3.25rem !important;
  margin: 0.75rem auto 0.25rem !important;
  border-width: 0.2rem !important;
}

div:where(.swal2-icon) .swal2-icon-content {
  font-size: 2.25rem !important;
}

div:where(.swal2-container) .swal2-actions {
  margin-top: 1.25rem !important;
  gap: 0.5rem !important;
}

div:where(.swal2-container) .swal2-actions button {
  font-size: 0.8125rem !important;
  padding: 0.45rem 1.25rem !important;
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
}

/* Toast Common Geometry */
div:where(.swal2-container).swal2-top-end > .swal2-popup.swal2-toast,
.swal2-popup.swal2-toast {
  width: auto !important;
  min-width: 260px !important;
  max-width: 380px !important;
  padding: 0.65rem 1rem !important;
  border-radius: 0.5rem !important;
}

.swal2-popup.swal2-toast .swal2-title {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  margin: 0 0.5rem !important;
}

.swal2-popup.swal2-toast .swal2-icon {
  width: 1.4rem !important;
  height: 1.4rem !important;
  margin: 0 !important;
  border-width: 0.12rem !important;
}

/* --------------------------------------------------------------------------
   LIGHT MODE: SweetAlert2 Colors (Crisp clean white theme)
   -------------------------------------------------------------------------- */
:root:not([data-bs-theme="dark"]) div:where(.swal2-container) div:where(.swal2-popup),
[data-bs-theme="light"] div:where(.swal2-container) div:where(.swal2-popup) {
  background-color: #ffffff !important;
  color: #54667a !important;
  border: 1px solid rgba(34, 48, 62, 0.12) !important;
  box-shadow: 0 12px 32px rgba(34, 48, 62, 0.15) !important;
}

:root:not([data-bs-theme="dark"]) div:where(.swal2-container) h2:where(.swal2-title),
[data-bs-theme="light"] div:where(.swal2-container) h2:where(.swal2-title) {
  color: #22303e !important;
}

:root:not([data-bs-theme="dark"]) div:where(.swal2-container) div:where(.swal2-html-container),
[data-bs-theme="light"] div:where(.swal2-container) div:where(.swal2-html-container) {
  color: #54667a !important;
}

:root:not([data-bs-theme="dark"]) div:where(.swal2-container) .swal2-close,
[data-bs-theme="light"] div:where(.swal2-container) .swal2-close {
  color: #8592a3 !important;
}

:root:not([data-bs-theme="dark"]) div:where(.swal2-container) .swal2-close:hover,
[data-bs-theme="light"] div:where(.swal2-container) .swal2-close:hover {
  color: #22303e !important;
}

:root:not([data-bs-theme="dark"]) .swal2-popup.swal2-toast,
[data-bs-theme="light"] .swal2-popup.swal2-toast {
  background-color: #ffffff !important;
  color: #54667a !important;
  border: 1px solid rgba(34, 48, 62, 0.14) !important;
  box-shadow: 0 4px 18px rgba(34, 48, 62, 0.14) !important;
}

:root:not([data-bs-theme="dark"]) .swal2-popup.swal2-toast .swal2-title,
[data-bs-theme="light"] .swal2-popup.swal2-toast .swal2-title {
  color: #22303e !important;
}

:root:not([data-bs-theme="dark"]) .swal2-popup .swal2-icon.swal2-success [class^=swal2-success-circular-line],
:root:not([data-bs-theme="dark"]) .swal2-popup .swal2-icon.swal2-success .swal2-success-fix,
[data-bs-theme="light"] .swal2-popup .swal2-icon.swal2-success [class^=swal2-success-circular-line],
[data-bs-theme="light"] .swal2-popup .swal2-icon.swal2-success .swal2-success-fix {
  background-color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   DARK MODE: SweetAlert2 Colors (Sneat dark background #2b2c40)
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] div:where(.swal2-container) div:where(.swal2-popup) {
  background-color: #2b2c40 !important;
  color: #a1acb8 !important;
  border: 1px solid #4e4f6c !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

[data-bs-theme="dark"] div:where(.swal2-container) h2:where(.swal2-title) {
  color: #d5d5e2 !important;
}

[data-bs-theme="dark"] div:where(.swal2-container) div:where(.swal2-html-container) {
  color: #a1acb8 !important;
}

[data-bs-theme="dark"] div:where(.swal2-container) .swal2-close {
  color: #7e7f96 !important;
}

[data-bs-theme="dark"] div:where(.swal2-container) .swal2-close:hover {
  color: #d5d5e2 !important;
}

[data-bs-theme="dark"] .swal2-popup.swal2-toast {
  background-color: #2b2c40 !important;
  color: #b2b2c4 !important;
  border: 1px solid #4e4f6c !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

[data-bs-theme="dark"] .swal2-popup.swal2-toast .swal2-title {
  color: #d5d5e2 !important;
}

[data-bs-theme="dark"] .swal2-popup .swal2-icon.swal2-success [class^=swal2-success-circular-line],
[data-bs-theme="dark"] .swal2-popup .swal2-icon.swal2-success .swal2-success-fix {
  background-color: #2b2c40 !important;
}


/* ==========================================================================
   Table Section & DataTables Modern Enhancements
   ========================================================================== */
.table-responsive {
  border-radius: 0 0 0.5rem 0.5rem;
}

.table-card-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-card-bg);
  border-radius: 0 0 0.5rem 0.5rem;
}

.pagination-custom .page-link {
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  margin: 0 2px;
}

.pagination-custom .page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* ==========================================================================
   Chat Console Clinic Grouping & Timeline Enhancements
   ========================================================================== */
.clinic-contact-card {
  transition: all 0.18s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.clinic-contact-card:hover {
  background-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.04);
}
.clinic-contact-card.active {
  background-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.08);
  border-left-color: var(--bs-primary);
}

/* Horizontal Ticket Timeline Chips */
.clinic-ticket-chip {
  min-width: 210px;
  max-width: 240px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bs-card-bg, #fff);
  border: 1px solid var(--bs-border-color, #e0e0e0);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}
.clinic-ticket-chip:hover {
  border-color: var(--bs-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.clinic-ticket-chip.is-active-selection {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.08);
  box-shadow: 0 0 0 1px var(--bs-primary);
}
.clinic-ticket-chip.is-open-ticket {
  border-left: 3px solid var(--bs-danger);
}
.clinic-ticket-chip.is-resolved-ticket {
  border-left: 3px solid var(--bs-success);
}

/* Pulsing Status Dot */
.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bs-danger);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 62, 29, 0.7);
  animation: pulse-dot-anim 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot-anim {
  0% { box-shadow: 0 0 0 0 rgba(255, 62, 29, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(255, 62, 29, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 62, 29, 0); }
}

/* Vertical Timeline for Clinic Tickets in Sidebar */
.clinic-v-timeline {
  position: relative;
  padding-left: 1.5rem;
  margin: 0;
  list-style: none;
}
.clinic-v-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 2px;
  background: var(--bs-border-color, #e0e0e0);
}
.clinic-v-timeline-item {
  position: relative;
  margin-bottom: 1rem;
}
.clinic-v-timeline-item:last-child {
  margin-bottom: 0;
}
.clinic-v-timeline-point {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bs-card-bg, #fff);
  border: 2.5px solid var(--bs-primary);
  z-index: 1;
}
.clinic-v-timeline-point.point-danger {
  border-color: var(--bs-danger);
  background: rgba(var(--bs-danger-rgb, 255, 62, 29), 0.15);
}
.clinic-v-timeline-point.point-warning {
  border-color: var(--bs-warning);
  background: rgba(var(--bs-warning-rgb, 255, 171, 0), 0.15);
}
.clinic-v-timeline-point.point-success {
  border-color: var(--bs-success);
  background: rgba(var(--bs-success-rgb, 113, 221, 55), 0.15);
}
.clinic-v-timeline-card {
  background: var(--bs-card-bg, #fff);
  border: 1px solid var(--bs-border-color, #e0e0e0);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.clinic-v-timeline-card:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.clinic-v-timeline-card.is-active {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.06);
  box-shadow: 0 0 0 1px var(--bs-primary);
}

/* ==========================================================================
   Executive Dashboard Command Center Styling
   ========================================================================== */
.dashboard-hero {
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.08) 0%, rgba(3, 195, 236, 0.05) 100%);
  border: 1px solid rgba(105, 108, 255, 0.15);
  position: relative;
  overflow: hidden;
}

[data-bs-theme="dark"] .dashboard-hero {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.12) 0%, rgba(3, 195, 236, 0.06) 100%);
  border-color: rgba(105, 108, 255, 0.25);
}

.quick-launch-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 50rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.quick-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.2);
}

.kpi-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.75rem;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gateway-card {
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
}
.gateway-card:hover {
  transform: translateY(-3px);
  border-color: var(--bs-primary) !important;
  box-shadow: 0 8px 20px rgba(105, 108, 255, 0.15);
}
.gateway-card:hover .gateway-icon {
  transform: scale(1.1);
}
.gateway-icon {
  transition: transform 0.2s ease;
}

.hardware-preview-chip {
  padding: 0.65rem;
  border-radius: 0.5rem;
  background: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  transition: all 0.18s ease;
}
.hardware-preview-chip:hover {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
}

/* ========================================================= */
/* Doctor & Clinic Dossier Enhancements (Support & Chat)    */
/* ========================================================= */
.doctor-profile-badge {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(105, 108, 255, 0.3);
  color: var(--em-primary);
  font-weight: 600;
}

.btn-whatsapp {
  background-color: #25d366 !important;
  border-color: #25d366 !important;
  color: #ffffff !important;
  transition: all 0.2s ease;
}
.btn-whatsapp:hover {
  background-color: #1ebd5a !important;
  border-color: #1ebd5a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
  transform: translateY(-1px);
}

.contact-action-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.contact-action-item:hover {
  border-color: rgba(105, 108, 255, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   GLOBAL ARABIC (i18n) & RTL TYPOGRAPHY & LAYOUT SYSTEM
   ========================================================================== */
html[dir="rtl"],
html[lang="ar"],
[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] button,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .btn,
html[dir="rtl"] .dropdown-item,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .menu-link,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* RTL Sidebar Layout */
html[dir="rtl"] .layout-menu-fixed .layout-menu,
html[dir="rtl"] .layout-menu {
  right: 0 !important;
  left: auto !important;
  border-left: 1px solid var(--bs-border-color, rgba(67, 89, 113, 0.1));
  border-right: none !important;
}

@media (min-width: 1200px) {
  html[dir="rtl"] .layout-navbar-fixed .layout-page,
  html[dir="rtl"] .layout-page {
    padding-right: 16.25rem !important;
    padding-left: 0 !important;
  }
  html[dir="rtl"] .layout-navbar-fixed .layout-navbar {
    right: 16.25rem !important;
    left: auto !important;
    width: calc(100% - 16.25rem) !important;
  }
  html[dir="rtl"].layout-menu-collapsed .layout-navbar-fixed .layout-page,
  html[dir="rtl"].layout-menu-collapsed .layout-page {
    padding-right: 5rem !important;
    padding-left: 0 !important;
  }
  html[dir="rtl"].layout-menu-collapsed .layout-navbar-fixed .layout-navbar {
    right: 5rem !important;
    width: calc(100% - 5rem) !important;
  }
}

/* RTL Menu Items */
html[dir="rtl"] .menu-vertical .menu-item .menu-link {
  flex-direction: row;
}
html[dir="rtl"] .menu-vertical .menu-icon {
  margin-right: 0 !important;
  margin-left: 0.85rem !important;
}
html[dir="rtl"] .menu-vertical .menu-sub .menu-icon {
  margin-right: 0 !important;
  margin-left: 0.75rem !important;
}
html[dir="rtl"] .menu-header .menu-header-text {
  padding-right: 1rem;
  padding-left: 0;
}
html[dir="rtl"] .app-brand .layout-menu-toggle {
  margin-right: auto !important;
  margin-left: 0 !important;
}
html[dir="rtl"] .app-brand .layout-menu-toggle i {
  transform: rotate(180deg);
}

/* RTL Navbar Controls */
html[dir="rtl"] .navbar-nav.ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}
html[dir="rtl"] .dropdown-menu-end {
  right: auto !important;
  left: 0 !important;
}
html[dir="rtl"] .dropdown-item {
  text-align: right !important;
}
html[dir="rtl"] .modal-header .btn-close {
  margin-right: auto !important;
  margin-left: 0 !important;
}

/* RTL Tables & Form Controls */
html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
  text-align: right;
}
html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  margin-right: -1px;
  margin-left: 0;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 0.375rem !important;
  border-bottom-left-radius: 0.375rem !important;
}
html[dir="rtl"] .input-group > :first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 0.375rem !important;
  border-bottom-right-radius: 0.375rem !important;
}

/* RTL Badges & Alerts */
html[dir="rtl"] .badge-dot {
  margin-left: 0.35rem !important;
  margin-right: 0 !important;
}

/* ==========================================================================
   PREMIUM NATIVE FORM-SELECT STYLING (NATIVE BOOTSTRAP 5)
   ========================================================================== */
.form-select {
  border-radius: 0.375rem;
  border: 1px solid var(--bs-border-color, #d9dee3);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.form-select:focus {
  border-color: #696cff !important;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.16) !important;
}

/* Small Select: Crisp 31px height for chat status and headers */
.form-select-sm {
  min-height: 31px !important;
  height: 31px !important;
  font-size: 0.75rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  padding-left: 0.65rem !important;
  padding-right: 1.85rem !important;
  font-weight: 600;
  border-radius: 0.25rem;
}

/* RTL Form-Select Adjustments */
html[dir="rtl"] .form-select {
  text-align: right;
  padding-left: 2.25rem !important;
  padding-right: 0.875rem !important;
  background-position: left 0.75rem center !important;
}

html[dir="rtl"] .form-select-sm {
  padding-left: 1.85rem !important;
  padding-right: 0.65rem !important;
  background-position: left 0.5rem center !important;
}

/* SweetAlert2 RTL Tweaks */
html[dir="rtl"] .swal2-popup {
  direction: rtl !important;
  text-align: right !important;
  font-family: 'Cairo', sans-serif !important;
}
html[dir="rtl"] .swal2-title {
  text-align: center !important;
}
html[dir="rtl"] .swal2-html-container {
  text-align: center !important;
}
html[dir="rtl"] .swal2-actions {
  flex-direction: row-reverse !important;
}

