@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --theme-color: #016992;
  --theme-color-red: #BF3127;
  --theme-color-green: #4AA181;
  --theme-color-purple: #7D51B5;
  --font-family-jakarta: 'Plus Jakarta Sans', sans-serif;
}

@layer base {
  body {
    font-family: var(--font-family-jakarta);
  }
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #016992 #DEE2E6;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.custom-scrollbar::-webkit-scrollbar {
  height: 1px;
  width: 15px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #F6F6F6;
  border-radius: 3px;

}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #DEE2E6;
  border-radius: 3px;
  border: none;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #016992;
}

/* Horizontal scrollbar specific styling */
.custom-scrollbar::-webkit-scrollbar:horizontal {
  height: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track:horizontal {
  background: #F6F6F6;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:horizontal {
  background: #DEE2E6;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:horizontal:hover {
  background: #222222;
}

/* Ensure scrollbar appears on top for horizontal scrolling */
.custom-scrollbar {
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 13px;

}

.file-table th,
.file-table td {
  border-right: none !important;
}

.file-table tr {
  border-top: 1px solid #e5e7eb;
}

.file-table tr td:last-child,
.file-table tr th:last-child {
  border-right: none;
}

.file-table {
  border-collapse: collapse;
  border: none;
}

.file-table thead {
  border-bottom: 1px solid #e5e7eb;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.border-red-500 {
  border-color: #ef4444;
}

.ck-editor__editable {
  min-height: 250px;
}

.select2-container--default .select2-results__option .select2-results__option {
  font-size: 14px !important;
}

.select2-container--default .select2-results__group {
  font-size: 14px !important;
}

.flatpickr-calendar.static.open {
  right: 0 !important;
}

.bg-Pending {
  background-color: #FBBF24;
}

.bg-Completed {
  background-color: #4AA181;
}

@media print {

  body * {
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }

  #viewTaskModal,
  #viewTaskModal .printable-content,
  #viewTaskModal .printable-content * {
    visibility: visible;
    height: auto;
    overflow: visible;
  }

  #viewTaskModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: white;
    z-index: 9999;
    display: block !important;
  }

  .printable-content {
    box-shadow: none !important;
    border: 1px solid #ddd;
    border-radius: 4px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 20px !important;
  }

  .no-print,
  .screen-header,
  .close-view-task-modal {
    display: none !important;
  }

  .print-header {
    display: block !important;
  }

  p,
  span,
  div {
    color: #000 !important;

  }

  .text-gray2 {
    color: #555 !important;

  }
}

.loader {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg)
  }

  100% {
    transform: rotate(360deg)
  }
}



.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.dataTables_wrapper .dataTables_length select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px 28px 4px 10px;
  font-size: 14px;
  color: #111827;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  height: 32px;
  min-width: 60px;
}

.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: #016992;
  box-shadow: 0 0 0 2px rgba(1, 105, 146, 0.15);
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin-top: 16px;
}

.dataTables_wrapper .dataTables_info {
  font-size: 14px;
  color: #6b7280;
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  border: 1px solid #d1d5db !important;
  background: #ffffff !important;
  color: #374151 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
  padding: 0 14px !important;
  color: #374151 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #016992 !important;
  color: #ffffff !important;
  border-color: #016992 !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #016992 !important;
  color: #ffffff !important;
  border-color: #016992 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(1, 105, 146, 0.2) !important;
}

.dataTables_wrapper .dataTables_paginate span .paginate_button.current,
.dataTables_wrapper .dataTables_paginate span .paginate_button.current:hover {
  color: #ffffff !important;
}

a.paginate_button.current,
a.paginate_button.current:hover {
  color: #ffffff !important;
}




/* Hide DataTables UI inside print modal */
.no-datatables-ui .dataTables_length,
.no-datatables-ui .dataTables_filter,
.no-datatables-ui .dataTables_info,
.no-datatables-ui .dataTables_paginate {
  display: none !important;
}

/* Disable sorting arrows */
.no-datatables-ui table.dataTable thead th {
  pointer-events: none !important;
  cursor: default !important;
}

.no-datatables-ui table.dataTable thead .sorting,
.no-datatables-ui table.dataTable thead .sorting_asc,
.no-datatables-ui table.dataTable thead .sorting_desc {
  background-image: none !important;
}

.faq-item-print {
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  display: block !important;
  margin-bottom: 10px !important;
  background: white !important;
}

.faq-toggle-print {
  display: block !important;
  background-color: #f9fafb !important;
  padding: 12px 20px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #016992 !important;
  border-bottom: 1px solid #e5e7eb !important;
  margin: 0 !important;
}

.faq-answer-print {
  display: block !important;
  padding: 15px 20px !important;
  color: #374151 !important;
  line-height: 1.6 !important;
  background: white !important;
}

#kn-chat-btn {
  position: fixed;
  bottom: 43px !important;
}

#kn-chat-panel {
  bottom: 112px !important;
}

@media screen and (max-width: 1440px) {
  #kn-chat-panel {
    bottom: 112px !important;
  }
}

@media screen and (max-width: 480px) {
  #kn-chat-panel {
    bottom: 0 !important;
  }
}

.flatpickr-calendar.open {
  display: inline-block;
  z-index: 1000000 !important;
}

.select2-dropdown{
  z-index: 1000000 !important;
}

@media print {
  .faq-toggle-print {
    color: #016992 !important;
    -webkit-print-color-adjust: exact !important;
  }
}