/* main root color palate */
:root {
  --v1-main-color: #441EA6; /*#095079;*/
  --v1-main-color-rgb-8: rgb(68, 30, 166, 0.8); /*rgb(9, 80, 121, 0.8);*/
  --v1-main-color-rgb-gray: rgb(222, 216, 238);
  --v1-main-color-light: #39198b;/*#095079;*/
}
/* end main color palate */

/* Common styles */
.strong {
  font-weight: bold !important;
}
.color-black {
  color: #000 !important;
}
.mr-3 {
  margin-right: 1rem !important;
}
.pt-3 {
  padding-top: 1rem !important;
}
.pb-3 {
  padding-bottom: 1rem !important;
}
.v1-filter-icon {
  stroke: var(--v1-main-color) !important;
}

/* Datatable controller options styles  */
.v1-options {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Left options container */
.left-options {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

/* Show entries styling */
.entries-inner {
  display: flex;
  align-items: center;
}

.entries-inner label {
  font-weight: normal;
  color: #666;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-inner select {
  width: auto !important;
  display: inline-block !important;
  min-width: 70px;
  background-color: #ffffff;
  border-color: #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111827;
}

/* Search container styling */
.search-inner {
  position: relative;
}

.search-inner label {
  margin: 0;
  position: relative;
}

.search-inner input[type="search"] {
  background-color: #ffffff;
  padding-left: 35px;
  border-color: #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111827;
}

/* Add search icon */
.search-inner label:before {
  content: "\f002";
  font-family: "Font Awesome\ 5 Free";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  z-index: 10;
}

/* Placeholder styling for search input */
.search-inner input[type="search"]::placeholder {
  color: #9ca3af;                 /* Placeholder color (light gray) */
  font-size: 0.875rem;            /* Placeholder size (14px) */
  font-weight: 300;               /* Placeholder weight (light) */
  opacity: 1;
}

.search-inner input[type="search"]::-webkit-input-placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 300;
  opacity: 1;
}

.search-inner input[type="search"]::-moz-placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 300;
  opacity: 1;
}

.search-inner input[type="search"]:-ms-input-placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 300;
  opacity: 1;
}

/* Right buttons container */
.buttons-set {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;

  @media (max-width: 620px) {
    margin-top: 10px;
  }
}

/* Add Product button styling */
.buttons-set .btn-v1 {
  background-color: var(--v1-main-color);
  border-color: var(--v1-main-color);
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 400;
  font-size: 14px;
  color: #ffffff;
}

.buttons-set .btn-v1:hover {
  background-color: var(--v1-main-color-rgb-8);
  border-color: var(--v1-main-color);
}

/* Export dropdown styling */
.dt-buttons {
  position: relative;
}

.buttons-collection {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #000;
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  position: relative;
  font-size: 14px;
}

.buttons-collection:hover {
  background-color: #e9ecef;
  text-decoration: none;
  color: #495057;
}

/* Add dropdown arrow */
.buttons-collection:after {
  content: "\f0d7";
  font-family: "Font Awesome\ 5 Free";
  margin-left: 8px;
}

/* Create dropdown menu structure with CSS */
.dt-buttons:hover .dropdown-menu {
  display: block;
}

/* Add dropdown menu (you'll need to add this HTML structure) */
.dt-buttons .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 1000;
  margin-top: 2px;
}

.dt-buttons .dropdown-menu a {
  display: block;
  padding: 8px 15px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}

.dt-buttons .dropdown-menu a:last-child {
  border-bottom: none;
}

.dt-buttons .dropdown-menu a:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.dt-buttons .dropdown-menu a i {
  width: 16px;
  margin-right: 8px;
  color: #666;
}

ul.dt-button-collection {
  background-color: #ffffff !important;
}


/* Datatable data styles */
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-info {
  color: var(--v1-main-color) !important;
}
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-info:hover {
  background-color: var(--v1-main-color) !important;
  color: #fff !important;
}
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-accent {
  color: #155724 !important;
}
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-accent:hover {
  background-color: #155724 !important;
  color: #fff !important;
}
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-error {
  color: #a10717 !important;
}
.v1-datatable .tw-dw-btn-outline.tw-dw-btn-error:hover {
  background-color: #a10717 !important;
  color: #fff !important;
}
.v1-datatable .dropdown-menu>li>a{
  color: #000 !important;
}
.v1-datatable .dropdown-menu>li>a>i{
  color: var(--v1-main-color) !important;
}
.v1-datatable .label.bg-light-green {
  background-color: #d4edda !important;
  color: #155724 !important;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.v1-datatable .label.bg-green {
  background-color: #c3e6cb !important;
  color: #155724 !important;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.v1-datatable .label.bg-red {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.v1-datatable .label.bg-yellow {
  background-color: #fff3cd !important;
  color: #856404 !important;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.v1-datatable tfoot .bg-gray {
  background-color: var(--v1-main-color-rgb-gray) !important;
}

/* DataTable Header Styling */
.dataTable thead th,
.dataTables_wrapper table thead th,
table.dataTable thead th,
.table thead th {
    background-color: var(--v1-main-color);
    background-image: linear-gradient(180deg, #eef2f7 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: none;
    padding: 12px 8px;
    position: relative;
    vertical-align: middle;
    white-space: nowrap;
}

/* Remove default sorting styles */
.dataTable thead th,
table.dataTable thead th, 
.table thead th {
    background-image: none;
}

/* Sortable column styling */
.dataTable thead th.sorting,
.dataTable thead th.sorting_asc,
.dataTable thead th.sorting_desc,
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 30px !important;
}

/* Base sorting arrow container */
.dataTable thead th.sorting:after,
.dataTable thead th.sorting_asc:after,
.dataTable thead th.sorting_desc:after,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    opacity: 0.5;
}

/* Unsorted state - both arrows */
.dataTable thead th.sorting:before,
.dataTable thead th.sorting:after,
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after {
    content: "";
    position: absolute;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.3;
}

.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:before {
    top: 8px;
    border-bottom: 4px solid #dae1e6;
}

.dataTable thead th.sorting:after,
table.dataTable thead th.sorting:after {
    bottom: 8px;
    border-top: 4px solid #dae1e6;
}

/* Ascending sort arrow */
.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_asc:after {
    content: "";
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #dae1e6;
    opacity: 1;
    top: 45%;
}

/* Descending sort arrow */
.dataTable thead th.sorting_desc:after,
table.dataTable thead th.sorting_desc:after {
    content: "";
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #dae1e6;
    opacity: 1;
    top: 55%;
}

/* Remove before pseudo element for sorted columns */
.dataTable thead th.sorting_asc:before,
.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before {
    display: none;
}

/* Hover effects */
.dataTable thead th.sorting:hover,
.dataTable thead th.sorting_asc:hover,
.dataTable thead th.sorting_desc:hover,
table.dataTable thead th.sorting:hover,
table.dataTable thead th.sorting_asc:hover,
table.dataTable thead th.sorting_desc:hover {
    background-color: var(--v1-main-color-rgb-8);
    color: #eee;
}

.dataTable thead th.sorting:hover:before,
.dataTable thead th.sorting:hover:after,
table.dataTable thead th.sorting:hover:before,
table.dataTable thead th.sorting:hover:after {
    opacity: 0.6;
}

/* First and last column border radius */
.dataTable thead th:first-child,
table.dataTable thead th:first-child {
    border-top-left-radius: 0.375rem;
}

.dataTable thead th:last-child,
table.dataTable thead th:last-child {
    border-top-right-radius: 0.375rem;
}

/* Non-sortable columns */
.dataTable thead th:not(.sorting):not(.sorting_asc):not(.sorting_desc),
table.dataTable thead th:not(.sorting):not(.sorting_asc):not(.sorting_desc) {
    padding-right: 8px !important;
}

/* Alternative: Using FontAwesome icons for arrows */
.fa-arrows {
    .dataTable thead th.sorting:after,
    table.dataTable thead th.sorting:after {
        content: "\f0dc";
        font-family: "FontAwesome";
        font-size: 12px;
        color: #6c757d;
        opacity: 0.5;
        border: none;
        width: auto;
        height: auto;
    }

    .dataTable thead th.sorting_asc:after,
    table.dataTable thead th.sorting_asc:after {
        content: "\f0de";
        font-family: "FontAwesome";
        font-size: 12px;
        color: #495057;
        opacity: 1;
        border: none;
        width: auto;
        height: auto;
    }

    .dataTable thead th.sorting_desc:after,
    table.dataTable thead th.sorting_desc:after {
        content: "\f0dd";
        font-family: "FontAwesome";
        font-size: 12px;
        color: #495057;
        opacity: 1;
        border: none;
        width: auto;
        height: auto;
    }
}

/* Table body styling for consistency */
.dataTable tbody td,
table.dataTable tbody td,
.table tbody td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.dataTable tbody tr:hover,
table.dataTable tbody tr:hover,
.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Checkbox column styling */
.dataTable thead th:first-child,
.dataTable tbody td:first-child,
table.dataTable thead th:first-child,
table.dataTable tbody td:first-child {
    width: 40px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.dataTables_scrollBody {
  min-height: 75vh !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dataTable thead th,
  table.dataTable thead th {
      font-size: 0.75rem;
      padding: 8px 4px;
  }
  
  .dataTable thead th.sorting,
  .dataTable thead th.sorting_asc,
  .dataTable thead th.sorting_desc,
  table.dataTable thead th.sorting,
  table.dataTable thead th.sorting_asc,
  table.dataTable thead th.sorting_desc {
      padding-right: 20px !important;
  }
  
  .dataTable thead th.sorting:after,
  .dataTable thead th.sorting_asc:after,
  .dataTable thead th.sorting_desc:after,
  table.dataTable thead th.sorting:after,
  table.dataTable thead th.sorting_asc:after,
  table.dataTable thead th.sorting_desc:after {
      right: 4px;
  }
}


/* pagination */
/* Material Bootstrap Pagination Styles */
.dataTables_paginate {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 0 auto !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: white;
}

.paginate_button {
  margin: 0;
}

.paginate_button a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  font-size: 14px;
  border: none;
  background: white;
  transition: all 0.3s ease;
  min-width: 44px;
  height: 44px;
  box-sizing: border-box;
}

.pagination > li > a {
  background: #fff;
  color: #495057;
  border: 1px solid #e5ebef;
}

/* First and last items rounded corners */
.paginate_button:first-child a {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.paginate_button:last-child a {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Hover effect */
.paginate_button:not(.disabled):not(.active) a:hover {
  background-color: #e9ecef;
  color: var(--v1-main-color);
  transform: translateY(-1px);
}

/* Active page styling */
.paginate_button.active a {
  background: var(--v1-main-color);
  color: white;
  font-weight: 600;
  /* box-shadow: 0 2px 4px rgba(0,123,255,0.3); */
}

.pagination > .active > a:hover{
  background-color: var(--v1-main-color-rgb-8);
  border-color: var(--v1-main-color);
}

/* Disabled state */
.paginate_button.disabled a {
  color: #adb5bd;
  cursor: not-allowed;
  background: #f8f9fa;
}

.paginate_button.disabled a:hover {
  background: #f8f9fa;
  color: #adb5bd;
  transform: none;
}

/* Previous and Next buttons */
.paginate_button.previous a,
.paginate_button.next a {
  font-weight: 500;
  padding: 12px 20px;
}

/* Ellipsis styling */
.paginate_button:has(a[data-dt-idx="6"]) a {
  cursor: default;
  font-weight: bold;
  color: #6c757d;
  background: transparent;
}

.paginate_button:has(a[data-dt-idx="6"]) a:hover {
  background: transparent;
  color: #6c757d;
  transform: none;
}

/* Responsive design */
@media (max-width: 576px) {
  .paginate_button a {
      padding: 10px 12px;
      font-size: 13px;
      min-width: 40px;
      height: 40px;
  }

  .paginate_button.previous a,
  .paginate_button.next a {
      padding: 10px 16px;
  }
}

/* Add subtle animations */
.paginate_button a {
  position: relative;
  overflow: hidden;
}

.paginate_button a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0,123,255,0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.paginate_button:not(.disabled):not(.active) a:active::before {
  width: 100px;
  height: 100px;
}

/* Focus styles for accessibility */
.paginate_button a:focus {
  outline: 2px solid var(--v1-main-color);
  outline-offset: 2px;
}



/* Tab background wrapper (optional, for soft outer box) */
.custom-tab-style {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 15px;
}

.custom-tab-style .nav-tabs {
  background-color: #f6f9fc; /* soft light gray-blue */
  border: none;
  border-radius: 8px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-tab-style .nav-tabs > li {
  display: block;
  width: 100%;
  text-align: center;
}

.custom-tab-style .nav-tabs > li.active > a {
  border: none !important;
  border-radius: 4px !important;
  padding: 5px 15px;
}

/* Remove bottom border from nav-tabs */
.custom-tab-style .nav-tabs li > a {
  font-size: 14px !important;
  border: none !important;
  background-color: transparent;
  color: #555;
  border-radius: 6px;
  padding: 5px 15px;
  font-weight: 400;
  transition: all 0.3s ease;
}

/* Hover effect */
.custom-tab-style .nav-tabs li > a:hover {
  background-color: #e8f0f8;
  color: #333;
}

/* Active tab styling */
.custom-tab-style .nav-tabs li.active > a,
.custom-tab-style .nav-tabs li.active > a:focus,
.custom-tab-style .nav-tabs li.active > a:hover {
  background-color: #ffffff;
  border-radius: 6px;
  color: #111;
  box-shadow: 0 0 0 1px #e4e7eb inset;
  font-weight: 400;
}




/* Sidebar container */
.filter-sidebar {
  position: fixed;
  top: 0;
  right: -350px; /* hidden initially */
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  z-index: 1050;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
}

/* Sidebar header */
.filter-sidebar-header {
  padding: 15px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Sidebar body */
.filter-sidebar-body {
  padding: 15px;
}

/* Overlay */
.filter-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1040;
}


/* 
  checkbox global style 
*/
/* Hide the default checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 15px;
  height: 15px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: all 0.2s ease-in-out;
}

/* Hover state */
input[type="checkbox"]:hover {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* Focus state for accessibility */
input[type="checkbox"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Checked state */
input[type="checkbox"]:checked {
  background-color: #007bff;
  border-color: #007bff;
}

/* Checkmark for checked state */
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

/* Alternative: Using a tick symbol instead of CSS border trick */
/*
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}
*/

/* Disabled state (if needed) */
input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input[type="checkbox"]:disabled:checked {
  background-color: #6c757d;
  border-color: #6c757d;
}
/* end global checkbox style */


/* fixed column */
/* Ensure dropdown has proper styling and positioning */
.dataTables_wrapper .dropdown-menu {
  min-width: 160px;
  max-width: 200px;
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
  border: 1px solid rgba(0,0,0,.15);
  padding: 5px 0;
}

.dataTables_wrapper .dropdown-menu li a {
  padding: 6px 16px;
  white-space: nowrap;
}