/* RTL overrides for nomenclature tool — load after nomenclature.css */

html[dir="rtl"] .search-input,
html[dir="rtl"] .search-btn,
html[dir="rtl"] .filter-chip,
html[dir="rtl"] .nomenclature-intro-text,
html[dir="rtl"] .sidebar-title,
html[dir="rtl"] .active-filters-info,
html[dir="rtl"] .cart-empty-text,
html[dir="rtl"] .legend-text {
    font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] .nomenclature-grid {
    direction: rtl;
}

html[dir="rtl"] .nomenclature-table {
    text-align: right;
}

html[dir="rtl"] .col-designation {
    text-align: right;
}

html[dir="rtl"] .tree-node-children {
    padding: 5px 15px 5px 0;
    border-left: none;
    border-right: 1px dashed var(--border-color);
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .tree-node.expanded .tree-node-arrow {
    transform: rotate(-90deg);
}

html[dir="rtl"] .tree-node-label-wrapper,
html[dir="rtl"] .tree-child-item {
    text-align: right;
}

html[dir="rtl"] .filter-chip-label {
    margin-right: 0;
    margin-left: 5px;
}

html[dir="rtl"] .filters-top-bar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .class-filter-chips {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pagination-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .cart-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .cart-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .cart-item-info {
    text-align: right;
}

html[dir="rtl"] .cart-item-code-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-checkout,
html[dir="rtl"] .btn-export,
html[dir="rtl"] .add-to-list-btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-checkout .fa-arrow-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .mobile-cart-toggle {
    right: auto;
    left: 25px;
}

html[dir="rtl"] .mobile-cart-badge {
    right: auto;
    left: -5px;
}

html[dir="rtl"] .nomenclature-sidebar-right.mobile-drawer {
    right: auto;
    left: -340px;
}

html[dir="rtl"] .nomenclature-sidebar-right.mobile-drawer.open {
    left: 0;
    right: auto;
}

html[dir="rtl"] .hazard-tooltip {
    font-family: 'Cairo', sans-serif;
    text-align: right;
}

html[dir="rtl"] .print-company-info {
    text-align: left;
}

html[dir="rtl"] .print-table th,
html[dir="rtl"] .print-table td {
    text-align: right;
}

@media print {
    html[dir="rtl"] #print-area {
        left: auto;
        right: 0;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .filters-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
