/* Set a smaller base font size for the entire application */
body {
    font-size: 0.875rem; /* This is equivalent to 14px */
    line-height: 1.5;
    color: #333;
    font-family: 'Inter', sans-serif; /* Ensure a clean and modern font */
}

/* Adjust specific elements if needed */
h2, h3, h4, h5, h6 {
    font-weight: 500;
}

.select2-container {
  z-index: 9999;
}

.select2-dropdown {
  z-index: 9999;
}

.select2-search__field {
  width: 100% !important;
}
#rowDetailsSidebar {
  width: 300px;
  display: none;
  border-left: 1px solid #dee2e6;
  padding-left: 15px;
  display: none;
  height: 100%;
}

.table-container {
  display: flex;
  gap: 1rem;
  height: 100%;
}

#tableData {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

#rowDetailsSidebar .card {
  height: 100%;
}

#rowDetailsSidebar .card-body {
  height: calc(100% - 56px);
  overflow-y: auto;
}

.view-icon {
  cursor: pointer;
  color: #007bff;
}

.view-icon:hover {
  color: #0056b3;
}

.select2-container {
  width: 100% !important;
}

.table-option {
  padding: 0px;
  font-size: small;
}

.column-option {
  padding: 8px;
}

.source-column-info {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

#relationTableModal .modal-lg {
  max-width: 800px;
}

.select2-container--bootstrap .select2-selection--single {
  height: 2.5rem; /* Adjust the height */
  padding: 0.375rem 0.75rem; /* Adjust padding */
  font-size: 0.875rem; /* Smaller font size */
}

.select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  line-height: 1.5rem; /* Adjust line height */
}

.select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
  height: 2.5rem; /* Match the height */
}

.select2-container--bootstrap .select2-dropdown {
  font-size: 0.875rem; /* Smaller font size for dropdown */
}

.select2-container--bootstrap .select2-results__option {
  padding: 0.5rem; /* Adjust padding for options */
  
}
.column-option {
  font-size:small; /* Smaller font size for options */
}

.target-columns-radio-container {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  background-color: #f8f9fa;
  display: none; /* Hidden by default */
}

.target-columns-list {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.target-columns-list .form-check {
  margin-bottom: 8px;
  padding: 8px 8px 8px 35px; /* Increased left padding */
  border-radius: 4px;
  background-color: white;
  border: 1px solid #eee;
  position: relative;
}

.target-columns-list .form-check-input {
  position: absolute;
  left: 31px; /* Position radio button */
  top: 41%;
  transform: translateY(-50%);
}

.target-columns-list .form-check-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-left: 10px;
  cursor: pointer;
}

.target-columns-list .column-type {
  font-size: 0.85em;
  color: #6c757d;
  margin-left: 10px;
  padding-right: 20px;
}

.has-relation {
    color: #28a745 !important; /* Bootstrap success green */
}

.select2-container--bootstrap .select2-search--dropdown .select2-search__field {
  padding: 8px !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  margin-bottom: 8px !important;
  width: 100% !important;
  box-shadow: none !important;
  background-color: #fff !important;
}

.select2-container--bootstrap .select2-search--dropdown .select2-search__field:focus {
  border-color: #86b7fe !important;
  outline: 0 !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.select2-container--bootstrap .select2-results__option {
  padding: 6px 12px !important;
}

.select2-container--bootstrap .select2-dropdown {
  border-color: #ced4da !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.1) !important;
}
.px-auto {
margin-right: auto !important;
/* margin-left: auto !important; */
}

.table th, .table td {
    font-size: 0.875rem; /* Ensure table text is also smaller */
}

.btn, .form-control, .form-select {
    font-size: 0.875rem; /* Adjust button and form element text size */
}

#rowDetailsSidebar .card-body {
    height: calc(100% - 56px);
    overflow-y: auto;
}
#rowDetailsSidebar .card {
  overflow-y: auto;
}

.pagination .page-link {
    font-size: 0.75rem; /* Make pagination text smaller */
}

/* Ensure tooltips and other small text elements are readable */
.tooltip-inner {
    font-size: 0.75rem;
}

/* Adjust modal text size */
.modal-title, .modal-body {
    font-size: 0.875rem;
}

/* Adjust dropdown menu text size */
.dropdown-item {
    font-size: 0.875rem;
}

    .table-section {
      margin-top: 30px;
      display: none; /* Hidden by default */
    }
  
    .table-list-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 20px;
      background-color: #f8f9fa;
      border: 1px solid #ddd;
      border-radius: 5px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: background-color 0.2s ease;
      overflow: hidden;
    }

    .table-list-item > div {
      width: 100%;
      display: flex;
      align-items: center;
    }

    .table-info {
      display: flex;
      align-items: center;
      flex: 1;
      min-width: 0; /* Enables text truncation */
      gap: 16px; /* Space between table name and remarks */
    }

    .table-name {
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 150px; /* Minimum width for table name */
      max-width: 250px; /* Maximum width for table name */
    }

    .table-remarks {
      font-size: 0.85rem;
      color: #6c757d;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1; /* Take remaining space */
      margin: 0; /* Remove any margin */
      padding: 0; /* Remove any padding */
    }

    .table-icon {
      margin-left: 16px;
      font-size: 0.9rem;
      color: #6c757d;
      flex-shrink: 0;
    }

    .table-list-item:hover {
      background-color: #e9ecef;
    }

    .fa-pencil{
      font-size:18px
    }
    .section-header {
      font-weight: bold;
      font-size: 1.2rem;
      margin-bottom: 20px;
    }
    .custom-select-container {
      margin-bottom: 30px; /* Adds spacing between dropdown and the table section */
    }

    #tableSelector {
      width: 300px;
    }
    .back-btn {
        text-decoration: none;
        color: #000;
    }

    .remarks-section {
      position: relative;
    }

    #editRemarks {
      cursor: pointer;
      position: absolute;
      right: 0;
      top: 0;
    }

    #remarksForm {
      margin-top: 10px;
    }

    .table-responsive {
      margin-top: 20px;
    }

    .pagination {
      margin-top: 20px;
    }

/* Add these styles to your existing CSS */
.search-column-container {
  display: flex;
  gap: 10px;
}

.search-column-container input,
.search-column-container button {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #ced4da;
}

.table th {
  position: relative;
  white-space: nowrap;
  color: #71717a;
  font-weight: 500;
  border-top: solid 1px #ced4da;
}

.table th > div {
  display: flex;
  align-items: center;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.column-info,
.column-refresh {
  cursor: pointer;
  margin-left: 5px;
  font-size: 0.8em;
}

.column-info:hover,
.column-refresh:hover {
  color: #007bff;
}

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

/* Add these styles to your existing CSS */
.tooltip {
  pointer-events: none;
}

.tooltip-inner {
  max-width: 200px;
  padding: 5px 8px;
  color: #fff;
  text-align: center;
  background-color: #000;
  border-radius: 4px;
}

.column-info {
  cursor: help;
}

/* Add these styles to your existing CSS */

.dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
}

.dropdown-item input[type="checkbox"] {
  margin-right: 8px;
}

/* Add these styles for the row detail modal */
#rowDetailModal .modal-content {
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#rowDetailModal .modal-header {
  border-bottom: none;
}

#rowDetailModal .modal-title {
  font-weight: bold;
  color: #333;
}

#rowDetailModal .modal-subtitle {
  font-size: 0.9rem;
  color: #666;
}

#rowDetailModal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

#rowDetailModal strong {
  color: #444;
}

#rowDetailModal span {
  color: #666;
}

/* Add this rule to change link color to black */
a {
    color: #000;
    text-decoration: none;
}

a:hover {
    color: #333;
    text-decoration: underline;
}

/* Add these styles for the table list pagination */
#tableListPagination {
  margin-bottom: 0;
}

#tableListPagination .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

#tableSearch {
  margin-bottom: 1rem;
}

#tableItemsPerPage {
  width: 70px;
}

/* Add or update these styles */
#schemaTables .d-flex {
  flex-wrap: wrap;
}

#tableSearch {
  min-width: 200px;
  margin-right: 10px;
}

#tableItemsPerPage {
  width: 70px;
}

@media (max-width: 576px) {
  #schemaTables .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }

  #tableSearch, #tableItemsPerPage {
    margin-bottom: 10px;
  }
}

/* Add these styles to your existing CSS */
.search-items-wrapper {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.search-items-wrapper > div {
  display: flex;
  align-items: center;
}

#tableSearch, #search {
  min-width: 200px;
  max-width: 300px;
  margin-right: 10px;
}

#tableItemsPerPage, #itemsPerPage {
  width: 70px;
}

@media (max-width: 768px) {
  .search-items-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-items-wrapper > div {
    width: 100%;
    margin-bottom: 10px;
  }

  #tableSearch, #search, #tableItemsPerPage, #itemsPerPage {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Add these styles for the column list dropdown */
#columnList {
  max-height: 300px;
  overflow-y: auto;
}

#columnList .dropdown-item {
  padding: 0.25rem 1.5rem;
}

#columnList .dropdown-divider {
  margin: 0.5rem 0;
}

#toggleAll {
  margin-right: 0.5rem;
}

.search-items-wrapper .input-group {
  max-width: 300px;
}

.search-items-wrapper .input-group-text {
  background-color: #fff;
  border-right: none;
}

.search-items-wrapper .form-control {
  border-left: none;
}

.search-items-wrapper .form-control:focus {
  box-shadow: none;
  border-color: #ced4da;
}

.search-items-wrapper .input-group-text i {
  color: #6c757d;
}

#columnToggle {
  margin-left: 10px;
}

@media (max-width: 768px) {
  .search-items-wrapper .input-group {
    max-width: 100%;
    margin-bottom: 10px;
  }

  #columnToggle {
    margin-left: 0;
    margin-top: 10px;
  }
}

/* Add these styles for the search icon in the schemaTables section */
.search-items-wrapper .input-group-text {
  background-color: #fff;
  border-right: none;
  padding-right: 0;
}

.search-items-wrapper .form-control {
  border-left: none;
}

.search-items-wrapper .search-icon {
  font-size: 0.875rem;
  color: #6c757d;
}

.search-items-wrapper .input-group:focus-within .input-group-text {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.search-items-wrapper .input-group:focus-within .form-control {
  border-color: #86b7fe;
  box-shadow: none;
}

/* Add these styles for the row details page */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card .border {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.card .border:hover {
    background-color: #e9ecef;
}

.btn-link {
    color: #000;
    text-decoration: none;
}

.btn-link:hover {
    color: #333;
    text-decoration: none;
}

/* Add these styles to your existing CSS */
.column-comments-row td {
  font-size: 0.85em;
  padding: 4px 8px;
  border-top: none;
  background-color: #f8f9fa;
  border-bottom: 2px solid #31708f;
}

.column-comment-cell {
  white-space: normal;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-comment-cell small {
  display: block;
  line-height: 1.2;
}


/* Add these styles to prevent table body text wrapping */
.table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px; /* Adjust this value based on your needs */
  border: solid 1px #ced4da;
}

/* Keep the comment row wrappable since it's meant to show full comments */
.column-comments-row td {
  white-space: normal;
  font-size: 0.85em;
  padding: 4px 8px;
  border-top: none;
  background-color: #f8f9fa;
}

/* Make the table container horizontally scrollable */
.table-responsive {
  overflow-x: auto;
  margin-top: 20px;
  /* Smooth scrolling for better user experience */
  scroll-behavior: smooth;
  /* Hide scrollbar in Firefox */
  scrollbar-width: thin;
}

/* Style scrollbar for webkit browsers */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Add these styles for the column comments */
.column-comments-row {
  background-color: #e7f3ff; /* Light blue background */
  color: #31708f; /* Darker blue text */
  font-weight: bold; /* Make the text bold */
}

.column-comments-row td {
  padding: 8px; /* Add some padding for better spacing */
  border-top: 2px solid #31708f; /* Add a top border to separate from the header */
  text-align: center; /* Center align the comments */
}

/* Optional: Add a hover effect for better interactivity */
.column-comments-row td:hover {
  background-color: #d1e7fd; /* Slightly darker blue on hover */
}

/* Add these styles for the row details panel */
.row-details-panel {
  position: fixed;
  top: 0;
  right: -400px; /* Start off-screen */
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 1040;
  overflow-y: auto;
}

.row-details-panel.show {
  right: 0;
}

.panel-header {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.panel-body {
  padding: 1rem;
}

.detail-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.detail-label {
  font-weight: 500;
  color: #666;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.detail-value {
  color: #333;
  word-break: break-word;
}

/* Style for the active row */
.active-row {
  background-color: #e7f3ff !important;
}

/* Adjust main content when panel is open */
.table-responsive {
  transition: margin-right 0.3s ease;
}

.table-responsive.shifted {
  margin-right: 400px;
}

/* Make sure the table container doesn't overflow */
.container-fluid {
  overflow-x: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .row-details-panel {
    width: 100%;
    right: -100%;
  }
  
  .table-responsive.shifted {
    margin-right: 0;
  }
}
