@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir.eot');
    src: url('../fonts/Vazir.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir.woff2') format('woff2'),
    url('../fonts/Vazir.woff') format('woff'),
    url('../fonts/Vazir.ttf') format('truetype');
    font-weight: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Bold.eot');
    src: url('../fonts/Vazir-Bold.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir-Bold.woff2') format('woff2'),
    url('../fonts/Vazir-Bold.woff') format('woff'),
    url('../fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Light.eot');
    src: url('../fonts/Vazir-Light.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir-Light.woff2') format('woff2'),
    url('../fonts/Vazir-Light.woff') format('woff'),
    url('../fonts/Vazir-Light.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Medium.eot');
    src: url('../fonts/Vazir-Medium.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir-Medium.woff2') format('woff2'),
    url('../fonts/Vazir-Medium.woff') format('woff'),
    url('../fonts/Vazir-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Thin.eot');
    src: url('../fonts/Vazir-Thin.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir-Thin.woff2') format('woff2'),
    url('../fonts/Vazir-Thin.woff') format('woff'),
    url('../fonts/Vazir-Thin.ttf') format('truetype');
    font-weight: 100;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Black.eot');
    src: url('../fonts/Vazir-Black.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir-Black.woff2') format('woff2'),
    url('../fonts/Vazir-Black.woff') format('woff'),
    url('../fonts/Vazir-Black.ttf') format('truetype');
    font-weight: 900;
}

/*---------------------------------- End of fonts ---------------------------------- */
body {
    font-family: 'Vazir', sans-serif !important;
}

.ltr {
    direction:ltr;
}


ul {
    padding-inline-start: 0px;
}

.dropdown-item {
    text-align: right;
}
.dropdown-footer, .dropdown-header {
    text-align: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    padding-left: .5rem;
}


/*------------------------------------ contacts-list ------------------------------------*/

.contacts-list-img {
    float: right;
}

.contacts-list-info {
    margin-right: 45px;
    margin-left: 0;
}


/* sidebar */

.sidebar > div:first-child {
    direction: rtl;
}

.control-sidebar, .control-sidebar:before {
    left: -250px;
    right: auto;
    transition: left .3s ease-in-out;
}

.control-sidebar-slide-open .control-sidebar, .control-sidebar-slide-open .control-sidebar:before {
    left: 0;
    right: auto;
}

.small-box .icon {
    right:auto;
    left:10px;
}

.nav-sidebar .nav-link>p>.right {
    left: 1rem;
    right: auto;
}

.nav-sidebar>.nav-item .nav-icon {
    margin-right: 0;
    margin-left: .2rem;
}

@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .content-wrapper, .sidebar-mini.sidebar-collapse .main-footer, .sidebar-mini.sidebar-collapse .main-header {
        margin-right: 4.6rem;
        margin-left: 0;
    }
}

@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .content-wrapper, .sidebar-mini.sidebar-collapse .main-footer, .sidebar-mini.sidebar-collapse .main-header {
        margin-left: 0rem !important;
        margin-right: 4.6rem !important;
        z-index:100;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar, .sidebar-mini.sidebar-collapse .main-sidebar:before {
        margin-right: 0;
        width: 4.6rem;
    }
}


@media (min-width: 768px) {
    .content-wrapper, .main-footer, .main-header {
        transition: margin-right .3s ease-in-out;
        margin-right: 256px;
        margin-left : 0;
        z-index: 3000;
    }
    .dataTable {
        width: 1270px !important;
    }
}

@media (max-width: 991.98px) {
    .main-sidebar, .main-sidebar:before {
        box-shadow: none!important;
        margin-right: -250px;
        margin-left: 0;
    }

    .sidebar-open .main-sidebar, .sidebar-open .main-sidebar:before {
        margin-right: 0;
        z-index: 4000;
    }
}

.sidebar-collapse .main-sidebar, .sidebar-collapse .main-sidebar:before {
    margin-right: -250px;
}

.main-sidebar {
    left: auto;
    right:0;
}

/* Cards */

.card-header>.card-tools {
    right:auto;
    left:1rem;
}

.user-block img {
     float: right;
}

.attachment-block .attachment-img {
    float: right;
}

.attachment-block .attachment-pushed {
    margin-left: 0px;
    margin-right: 110px;
}

.card-comments .card-comment img, .img-lg, .img-md, .img-sm, .user-block.user-block-sm img {
    float: right;
}

.card-comments .comment-text {
    margin-right: 40px;
    margin-left: 0;
}

.card-comments .card-comment img+.img-push, .img-sm+.img-push, .user-block.user-block-sm img+.img-push {
    margin-left: 0px;
    margin-right: 40px;
}

.user-block .comment, .user-block .description, .user-block .username {
    margin-right: 50px;
    margin-left: 0px;
}

.btn-group-vertical {
    align-items: center;
}


/*------------------------- Form ----------------------------*/
.select2-container .select2-search--inline {
    float: right;
}

.select2-container--default .select2-search--inline .select2-search__field {
    text-align: right;
}

/*----------------------- Extra Page ---------------------------*/
.error-page>.headline {
    float: right;
}

.error-page>.error-content {
    margin-right: 190px;
    margin-left: 0;
}

.lockscreen-image {
    left: auto;
    right:-10px;
}

.lockscreen-credentials {
    margin-left: 0px;
    margin-right: 70px;
}

.nav {
    padding-inline-start: 0px !important;
}

/*---------------------------------- Persian Date Picker ---------------------------------- */
.datepicker-plot-area {
    font-family: 'Vazir', sans-serif;
}

/*---------------------------------- modal section ---------*/
.modal-wrapper{
    width:40%;
  }
  
  @media screen and (max-width: 600px) {
    .modal-wrapper{
      width:60%;
    }
  }
  
  .modal-show{
    display:none;
  }

/*---------------------------------- product list section ---------*/
  #products-list .form-control {
    font-size: 0.8rem !important;
  }

  #products-list td{
    padding : 0.5rem !important;
  }
  
  .custom-mobile-responsive .form-control {
    font-size: 0.8rem !important;
  }

  .custom-mobile-responsive td{
    padding : 0.5rem !important;
  }

  /* Smooth row animation */
 #products-list tbody tr {
    transition: transform 0.25s ease;
  }

  /* Arrow cell */
  #products-list td.row-move {
    text-align: center;
    vertical-align: middle;
    width: 40px;
  }

  /* Arrows hidden until hover */
  #products-list td.row-move .controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  #products-list tbody tr:hover td.row-move .controls {
    display: flex;
  }

  #products-list td.row-move i {
    cursor: pointer;
    font-size: 0.7rem;
    color: #666;
    transition: color 0.2s;
  }

  #products-list td.row-move i:hover {
    color: #007bff;
  }

/*---------------------------------- show order horizantal timeline section ---------*/
  .timeline_h {
    list-style-type: none;
    display: flex;
    color: #758D96
    }
  
  
  .timestamp {
    margin-bottom: 20px;
    padding: 0px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 100;
    position: relative;
}
  
    .date{
        position: absolute;
        bottom: 2px;
    }
  .status {
    padding: 0px 40px;
    display: flex;
    justify-content: center;
    border-top: 2px solid #D6DCE0;
    position: relative;
    transition: all 200ms ease-in; }
  
  .status:before {
      content: '';
      width: 40px;
      height: 40px;
      background-color: white;
      border-radius: 25px;
      border: 1px solid #ddd;
      position: absolute;
      top: -20px;
      left: 42%;
      transition: all 200ms ease-in; }
  
  .li.complete .status {
    border-top: 2px solid #66DC71; }
    .li.complete .status:before {
      background-color: #66DC71;
      border: none;
      transition: all 200ms ease-in; }
    .li.complete .status h4 {
      color: #66DC71; }
  
  @media (min-device-width: 320px) and (max-device-width: 700px) {
    .timeline2 {
      list-style-type: none;
      display: block; }
    .li {
      transition: all 200ms ease-in;
      display: flex;
      width: inherit; }
    .timestamp {
      width: 100px; }
    .status:before {
      left: -8%;
      top: 30%;
      transition: all 200ms ease-in; }
     }

/*---------------------------------- toggle button for checkbox---------*/
  
.switch {
    position: relative;
    display: inline-block;
    width: 39px;
    height: 18px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 0px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
} 

/*--------------put placeholder RTL and text LTR in order page phonenumber search field--------*/

#searchCustomer::placeholder {
    text-align: right;
}
/* for Edge browser*/

#searchCustomer::-webkit-input-placeholder {
    text-align: right;
}


/*--------------report page-------*/
#download{
    position: absolute;
    left: 0rem;
    top: -3.3rem;
}


/*--------------Custom CSS to set the width of order tables cells in mobile-------*/
@media (max-width: 576px) {
    /* Set the width of the second column */
    .table-responsive input[name="product_code[]"],
    .table-responsive input[name="stock[]"]
     {
        width: 6rem !important;
    }
    .table-responsive input[name="product_name[]"] {
        width: 18rem;
    }
    .table-responsive input[name="price_fi[]"],
    .table-responsive input[name="price[]"] {
        width: 8rem !important;
        font-size: 0.8rem;
    }

    .productList ul{
        right: 4rem;
    }
    .price-table th{
        width: 8rem ;
       
    }
    .list-group{
        font-size: 14px;
        width: 75%;
    }
  }

/*--------------Custom CSS to set the height of last order modal in mobile-------*/
@media (max-width: 576px){

  #customerModal{
    height: 20rem;
  }

}

/*--------------Custom CSS for print on stamp in invoice -------*/
.stamp-box {
    border: 2px solid #000;
    border-radius: 5px;
    width: 200px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px;
  }

/*--------------Custom CSS for action history modal-------*/
.timeline-header a{
    display: block;
    margin-bottom: 5px;
}

.timeline-header span{
    color: #999;
    font-size: 12px;
    margin-top : 1rem;
}

.timeline-footer{
    background-color: #fdf8c8;
    font-size: 14px;
}

.timeline img{
    height: 40px;
    width: 40px;
}

.timeline-footer span{
    color: #999;
    font-size: 12px;
}

/* Mobile-specific styles for show orders */
@media (max-width: 767.98px) {
    .timeline_h {
        flex-direction: column; 
    }

    .timeline_h .li {
        display: none; /* Hide all <li> elements by default on mobile */
    }

    .timeline_h .li.complete {
        display: block; 
        width: 100%; 
    }

}

.bg-should-open {
    background-color: #fff0f0 !important; /* light red */
}

@media (max-width: 768px) {
    table.custom-mobile-responsive thead {
      display: none; /* Hide table headers */
    }
  
    table.custom-mobile-responsive tbody, 
    table.custom-mobile-responsive tr, 
    table.custom-mobile-responsive td {
      display: block;
      width: 100%;
    }
  
    table.custom-mobile-responsive tr {
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
      border-radius: 0.5rem;
      padding: 1rem;
      background: #fff;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
  
    table.custom-mobile-responsive td {
      text-align: right;
      padding-left: 50%;
      position: relative;
    }
  
    table.custom-mobile-responsive td::before {
      top: 0.75rem;
      left: 1rem;
      width: 45%;
      padding-right: 10px;
      white-space: nowrap;
      font-weight: bold;
      color: #555;
      content: attr(data-label); /* Use data-label attr as header */
    }
  }
  
.invoice {
  page: invoice;
}


@media print {
  
  .print-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  /* Apply 15rem top margin from the second page onward */
  @page invoice {
    margin-right: 2rem;
    margin-left: 2rem;
    margin-top: 15rem;
}

  /* Force page break after every 15 rows */
  .main-table tbody tr:nth-of-type(20n) {
      page-break-after: always;
      break-after: page; /* Modern alternative */
  }

  /* Ensure table headers repeat on each page */
  .main-table thead {
      display: table-header-group;
  }

  /* Optional: Adjust padding for better print layout */
  .main-table th, .main-table td {
      padding: 5px;
  }

  thead th {
      background-image: repeating-linear-gradient(
          0deg,       /* any angle is fine */
          #ccc,       /* start color */
          #ccc 100%   /* same color, fills the whole area */
      );
      color: black;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
  }
  
}
.page-break-before {
  page-break-after: always;
}

/* ------------------css for loading on chance form------------------ */
#loadingOverlay {
    display: flex; /* always flex */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#loadingOverlay.active {
    opacity: 1;
    visibility: visible;
}

#loadingOverlay .loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

#loadingOverlay .loading-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
/* ------------------end css for loading on chance form------------------ */