/* ========================================
   ChabokTool Custom RTL Styles
   Persian Version - نسخه فارسی
======================================== */

/* =====================================
   1. Yekan Font Family
===================================== */
@font-face {
    font-family: 'Yekan';
    src: url('../fonts/Yekan-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Yekan';
    src: url('../fonts/Yekan-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Yekan';
    src: url('../fonts/Yekan-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =====================================
   2. Global Font Application
===================================== */
body,
html,
* {
    font-family: 'Yekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Thin weight for small text */
small,
.small,
.text-muted,
.form-text,
.text-sm {
    font-weight: 100;
}

/* Regular weight */
p, span, div, td,
input, textarea, select,
.form-control, .form-label,
.btn, .badge, .alert {
    font-weight: 400;
}

/* Bold weight for headings and emphasis */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
strong, b,
.font-weight-bold,
.fw-bold,
.fw-semibold,
th {
    font-weight: 700;
}

/* =====================================
   3. RTL Layout Fixes
===================================== */
body {
    direction: rtl;
    text-align: right;
}

/* Sidebar positioning */
.sidebar {
    left: auto !important;
    right: 0 !important;
}

/* Navbar positioning */
.navbar,
.dashboard-main {
    margin-right: 260px !important;
    margin-left: 0 !important;
}

/* Breadcrumb icons */
.breadcrumb-item + .breadcrumb-item::before {
    content: "←" !important;
}

/* Dropdown positioning */
.dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* Icons flip for RTL */
.icon-flip-rtl {
    transform: scaleX(-1);
}

/* =====================================
   4. Number & English Text
===================================== */
/* Keep numbers and English text LTR */
.number,
.badge,
.pagination,
input[type="number"],
.ltr-text {
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* =====================================
   5. Table Enhancements
===================================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.bordered-table th,
.bordered-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
}

.bordered-table thead th {
    background-color: #f8f9fa;
    font-weight: 700;
    border-bottom-width: 2px;
}

.bordered-table tbody tr:hover {
    background-color: #f1f3f5;
}

/* =====================================
   6. Custom Animations
===================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* =====================================
   7. Responsive Fixes
===================================== */
@media (max-width: 991.98px) {
    .navbar,
    .dashboard-main {
        margin-right: 0 !important;
    }
}

/* =====================================
   8. Print Styles
===================================== */
@media print {
    body {
        font-family: 'Yekan', Arial, sans-serif;
    }
    
    .sidebar,
    .navbar,
    .btn,
    .card-footer {
        display: none !important;
    }
}

/* =====================================
   9. Future LTR Support (English)
   Uncomment when needed
===================================== */
/*
[lang="en"],
.lang-en,
body.ltr {
    direction: ltr;
    text-align: left;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body.ltr .sidebar {
    left: 0 !important;
    right: auto !important;
}

body.ltr .navbar,
body.ltr .dashboard-main {
    margin-left: 260px !important;
    margin-right: 0 !important;
}
*/