﻿
/* Body For All The Site 
--------------------------------*/
body {
    font-family: 'Tajawal-bold';
 font-size: 14px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 0px;
    padding-right: 0px;
}

.fullControl-text {
    text-align: right;
    position: absolute;
    top: 20%;
    right: 20%;
    color: black;
}

.normal-text {
    text-align: right;
    top: 35%;
    right: 20%;
    color: black;
}

.center-text {
    text-align: center;
    color: black;
}

.form-control {
    font-family: 'Cairo-Regular';
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.form-select {
    font-family: 'Cairo-Regular';
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    direction: rtl !important;
    background-position: left 0.75rem center !important; /* arrow goes left not right */
}

/* ----- Select2 RTL fix for Bootstrap 5 theme ----- */
/* Make sure the selection wrapper can anchor the children */
.select2-container--bootstrap-5[dir="rtl"] .select2-selection--single {
    position: relative !important;
}

    /* --- Clear (×) on the LEFT --- */
    .select2-container--bootstrap-5[dir="rtl"]
    .select2-selection--single .select2-selection__clear {
        position: absolute !important;
        left: .75rem !important;
        right: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 3;
    }

    /* --- Arrow on the RIGHT (no border) --- */
    .select2-container--bootstrap-5[dir="rtl"]
    .select2-selection--single .select2-selection__arrow {
        position: absolute !important;
        right: .75rem !important;
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 2rem !important;
        height: 100% !important;
        /* remove any border or divider the theme adds */
        border: none !important;
        background: none !important;
        box-shadow: none !important;
        z-index: 2;
    }

    /* --- Text padding so nothing overlaps --- */
    .select2-container--bootstrap-5[dir="rtl"]
    .select2-selection--single .select2-selection__rendered {
        padding-left: 2.25rem !important; /* space for clear (×) */
        padding-right: 2.25rem !important; /* space for arrow */
    }

/*--------------------------------------------------------------------------------------------------------------------------*/
.btn {
    font-size: 14px;
    font-weight: 400;
    font-family: 'Cairo-Regular';
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: calc(var(--bs-border-width) * -1);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3),
.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control,
.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/*-------------------------------------------------------------------------------------------------------------*/
/* cart */

.btnAddToCart {
    right: 25%;
}

@media screen and (max-width: 768px) {

    .btnAddToCart {
        right: 30%;
    }
}

.popup {
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 100%;
    width: 300px;
    margin-top: 0;
    background: #ffffff;
    margin-left: 0px;
    left: 0px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -moz-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
}
/*-------------------------------------------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------------------------------------------*/
/*# Header Override
--------------------------------------------------------------*/
.header {
    /*padding-right: 20px;*/
}

    .header .search-form button {
        margin-right: -30px;
    }

.logo img {
    margin-left: 6px;
}

.header-nav .nav-icon {
    margin-left: 25px;
}

.header .toggle-sidebar-btn {
    padding-right: 10px;
}

.header-nav .profile .dropdown-item i {
    margin-left: 10px;
}
/*--------------------------------------------------------------
/*--------------------------------------------------------------
# Sidebar Override
--------------------------------------------------------------*/

/*.sidebar {
    right: 0;
}*/

@media (max-width: 1199px) {
    .toggle-sidebar .sidebar {
        right: -300px;
    }
}

@media (min-width: 1200px) {

    .toggle-sidebar #main,
    .toggle-sidebar #footer {
        margin-right: 0;
    }

    .toggle-sidebar .sidebar {
        right: -300px;
    }
}

.sidebar-nav .nav-link i {
    margin-left: 10px;
}

.sidebar-nav .nav-link .bi-chevron-down {
    margin-left: 0;
}

.sidebar-nav .nav-content a {
    padding: 10px 40px 10px 0;
}

    .sidebar-nav .nav-content a i {
        margin-left: 8px;
    }

/*--------------------------------------------------------------
# DATATABLES RTL FIXES (Bootstrap 5 + DataTables 2)
--------------------------------------------------------------*/

/* Force RTL direction */
.dt-container {
    direction: rtl !important;
}

    /*--------------------------------------------------------------
# Layout Rows (length + search) (info + paging)
--------------------------------------------------------------*/
    .dt-container .dt-layout-row {
        display: flex !important;
        flex-wrap: wrap;
        flex-direction: row-reverse !important;
        align-items: center;
    }

    /* Remove auto-margins that break RTL alignment */
    .dt-container .dt-layout-start,
    .dt-container .dt-layout-end {
        margin: 0 !important;
    }

    /*--------------------------------------------------------------
# Search and Length Box RTL alignment
--------------------------------------------------------------*/
    .dt-container .dt-search {
        text-align: right !important;
    }

        .dt-container .dt-search label {
            margin-left: 8px !important;
        }

    .dt-container .dt-length select {
        direction: rtl !important;
        background-position: left center !important;
        text-align: center !important;
    }

    /*--------------------------------------------------------------
# Pagination RTL
--------------------------------------------------------------*/
    .dt-container .dt-paging .pagination {
        direction: rtl !important;
        justify-content: flex-start !important; /* paging left in RTL */
    }

/* Fix Bootstrap pagination border rounding */
.page-item:first-child .page-link {
    border-radius: 0 var(--bs-pagination-border-radius) var(--bs-pagination-border-radius) 0 !important;
}

.page-item:last-child .page-link {
    border-radius: var(--bs-pagination-border-radius) 0 0 var(--bs-pagination-border-radius) !important;
}

/*--------------------------------------------------------------
# Table Headers + Sorting Icons RTL
--------------------------------------------------------------*/
table.dataTable thead th,
table.dataTable thead td {
    text-align: right !important;
}

/* Optional: reverse sorting icons */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    right: auto;
    left: 8px; /* move icon left side */
}

/*--------------------------------------------------------------
# Rows + Responsive Details RTL
--------------------------------------------------------------*/
table.dataTable tbody td,
table.dataTable tbody th {
    text-align: right !important;
}

/* Responsive child row arrow */

table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before {
    right: auto !important;
    left: 10px !important;
}

/*--------------------------------------------------------------
# Group rows (when grouping is used)
--------------------------------------------------------------*/
table.dataTable.table > tbody > tr.dtrg-group > th {
    text-align: right !important;
}

/*--------------------------------------------------------------
# Info text RTL
--------------------------------------------------------------*/
.dt-container .dt-info {
    text-align: right !important;
}

/*--------------------------------------------------------------
# Fix Filters (select, search, etc.)
--------------------------------------------------------------*/
.dataTables_filter {
    float: right !important;
}

.dataTables_length {
    float: left !important;
}

/*--------------------------------------------------------------
# Scroll Head RTL support
--------------------------------------------------------------*/
.dataTables_scrollHead {
    direction: rtl !important;
}

.dataTables_scrollBody {
    direction: rtl !important;
}

/*--------------------------------------------------------------
# Buttons spacing in RTL
--------------------------------------------------------------*/
.dt-buttons {
    float: right !important;
}

    .dt-buttons .dt-button {
        margin-left: 5px !important;
        margin-right: 0 !important;
    }

/*-------------------------------------------------------------*
# breadcrumb in RTL
--------------------------------------------------------------*/
.breadcrumb-item + .breadcrumb-item {
    padding-right: var(--bs-breadcrumb-item-padding-x);
}

    .breadcrumb-item + .breadcrumb-item::before {
        float: right;
        padding-left: 5px;
        padding-right: 0;
        color: var(--bs-breadcrumb-divider-color);
        content: var(--bs-breadcrumb-divider, "/")
        /* rtl: var(--bs-breadcrumb-divider, "/") */;
    }
/*--------------------------------------------------------------*/
