/* Import Cairo font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

/* RTL and Cairo Font Styles */
body, html {
    font-family: 'Cairo', sans-arabic, sans-serif;
    direction: rtl;
    /* Increase base font size for better Cairo font readability */
    font-size: 15px;
}

/* Increase text sizes globally for Arabic - Cairo font appears smaller */
:root {
    --text-2xs: 0.75rem;   /* 11.25px instead of ~10px */
    --text-xs: 0.8125rem;  /* 12.2px instead of ~11px */
    --text-sm: 0.9375rem;  /* 14px instead of 13px */
    --text-base: 1.0625rem; /* 16px instead of 15px */
}

/* Ensure form elements and buttons have readable text */
.kt-btn,
.kt-input,
.kt-select,
select,
input,
textarea,
button {
    font-size: 0.9375rem; /* 14px minimum */
}

/* Table cells */
.kt-table td,
.kt-table th {
    font-size: 0.9375rem;
}

/* Labels */
label {
    font-size: 0.9375rem;
}

/* ================================
   SIDEBAR - ALWAYS DARK THEME
   ================================ */
.kt-sidebar,
.kt-sidebar * {
    /* Force dark background */
    --sidebar-bg: #1e1e2d;
    --sidebar-border: #2b2b40;
    --sidebar-text: #a1a5b7;
    --sidebar-text-active: #ffffff;
    --sidebar-heading: #4a4a68;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
}

.kt-sidebar {
    background-color: var(--sidebar-bg) !important;
    border-color: var(--sidebar-border) !important;
}

/* Menu links - RTL layout */
.kt-sidebar .kt-menu-link {
    display: flex;
    flex-direction: row !important; /* Keep normal row - RTL handles the rest */
    justify-content: flex-start;
    color: var(--sidebar-text);
}

.kt-sidebar .kt-menu-link:hover {
    background-color: var(--sidebar-hover-bg) !important;
}

.kt-sidebar .kt-menu-item-active .kt-menu-link,
.kt-sidebar .kt-menu-link.active {
    background-color: var(--sidebar-active-bg) !important;
    color: var(--sidebar-text-active) !important;
}

/* Menu icon - appears on the right in RTL */
.kt-sidebar .kt-menu-icon {
    color: var(--sidebar-text);
    order: 0; /* Icon first (which means right side in RTL) */
    margin-inline-start: 0;
    margin-inline-end: 10px; /* Space between icon and text */
}

/* Menu title */
.kt-sidebar .kt-menu-title {
    color: var(--sidebar-text);
    text-align: right;
    order: 1; /* Text after icon */
}

.kt-sidebar .kt-menu-item-active .kt-menu-title {
    color: var(--sidebar-text-active);
}

/* Menu headings */
.kt-sidebar .kt-menu-heading {
    color: var(--sidebar-heading);
    text-align: right;
}

/* Sidebar header */
.kt-sidebar .kt-sidebar-header {
    flex-direction: row !important;
}

/* Toggle button icon */
.kt-sidebar .kt-btn i {
    color: var(--sidebar-text);
}

/* Fix logo display - show dark logo always in dark sidebar */
.kt-sidebar .dark\:hidden {
    display: none !important;
}

.kt-sidebar .hidden.dark\:block {
    display: block !important;
}

/* ================================
   RTL ADJUSTMENTS
   ================================ */

/* Ensure proper text rendering for Arabic */
.arabic-text {
    font-feature-settings: "init", "medi", "fina";
    text-rendering: optimizeLegibility;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kt-sidebar {
        width: 250px;
    }
}