/* Simple Table Component Styles */

.simple-table-wrapper {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
  border-radius: 4px;
}

.simple-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table th,
.simple-table td,
.simple-table thead th,
.simple-table tbody td,
.simple-table tr th,
.simple-table tr td {
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent borders everywhere */
  padding: 8px;
  text-align: left;
  vertical-align: middle;
  border-color: rgba(255, 255, 255, 0.3) !important; /* Additional border color override */
}

.simple-table .row-header,
.simple-table .col-header {
  background-color: #f5f5f5;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
  border-color: rgba(255, 255, 255, 0.3) !important; /* Additional override */
}

/* Override any potential validation cell border colors */
.simple-table .table-cell.error,
.simple-table .table-cell.warning,
.simple-table .table-cell.valid {
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force uniform borders even for validation states */
}

/* Override cell input borders */
.simple-table .cell-input.error,
.simple-table .cell-input.warning,
.simple-table .cell-input.valid {
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force uniform borders for inputs */
}

.simple-table .row-header {
  min-width: 80px;
  background-color: #e9ecef;
}

.simple-table .col-header {
  background-color: #e9ecef;
  padding: 10px 8px;
}

.simple-table .table-cell {
  padding: 2px;
  position: relative;
}

.simple-table .table-cell.error {
  background-color: rgba(255, 87, 87, 0.15) !important; /* Light red background */
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table .table-cell.warning {
  background-color: rgba(254, 220, 2, 0.25) !important; /* More opaque yellow background */
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table .table-cell.valid {
  background-color: rgba(61, 202, 177, 0.1) !important; /* Very light teal background */
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table .cell-input {
  width: 100%;
  border: none;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  background-color: #071c42;
  outline: none;
  min-height: 20px;
}

.simple-table .cell-input:focus {
  box-shadow: inset 0 0 0 2px #007bff;
  border-radius: 2px;
}

.simple-table .cell-input.readonly {
  color: #6c757d;
  cursor: not-allowed;
}

.simple-table .cell-input.error {
  background-color: rgba(255, 87, 87, 0.1) !important; /* Light red background for input */
  color: #ff5757 !important;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table .cell-input.warning {
  background-color: rgba(254, 220, 2, 0.2) !important; /* Slightly more yellow background for better contrast */
  color: #fedc02 !important; /* Light yellow text matching the border color */
  font-weight: 700; /* Bolder text for better visibility */
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

.simple-table .cell-input.valid {
  background-color: rgba(61, 202, 177, 0.05) !important; /* Very light teal background for input */
  color: #333 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Force white transparent border */
}

/* Tooltip Styles */
.tooltip.error-tooltip .tooltip-inner {
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 12px;
  max-width: 250px;
}

.tooltip.error-tooltip .tooltip-arrow {
  border-top-color: #dc3545;
}

.tooltip.warning-tooltip .tooltip-inner {
  background-color: #ffc107;
  color: #212529;
  border: none;
  font-size: 12px;
  max-width: 250px;
}

.tooltip.warning-tooltip .tooltip-arrow {
  border-top-color: #ffc107;
}

.tooltip.info-tooltip .tooltip-inner {
  background-color: #17a2b8;
  color: white;
  border: none;
  font-size: 12px;
  max-width: 250px;
}

.tooltip.info-tooltip .tooltip-arrow {
  border-top-color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .simple-table {
    font-size: 12px;
  }
  
  .simple-table .cell-input {
    padding: 4px 6px;
    font-size: 12px;
  }
  
  .simple-table th,
  .simple-table td {
    padding: 6px;
  }
}

/* Loading State */
.simple-table-wrapper.loading {
  opacity: 0.6;
  pointer-events: none;
}

.simple-table-wrapper.loading::after {
  content: "Loading...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
}

/* Export Button Styling */
.table-controls {
  margin: 10px 0;
  text-align: right;
}

.table-controls .btn {
  margin-left: 5px;
}

/* Category Section Styling */
.category-section {
  margin-bottom: 40px;
  padding: 25px;
  background-color: transparent;
  border-radius: 10px;
  border: 2px solid rgba(61, 202, 177, 0.4);
  box-shadow: 0 2px 10px rgba(61, 202, 177, 0.1);
}

.category-section:first-child {
  margin-top: 30px; /* Add extra space before the first category */
}

/* Add space after cell coloring description */
#tables-area > span:last-of-type {
  display: block;
  margin-bottom: 20px;
}

.category-header {
  margin-bottom: 25px;
}

.category-title {
  font-size: 24px;
  font-weight: 700;
  color: #3DCAB1;
  margin-bottom: 10px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-divider {
  margin: 10px 0 20px 0;
  border: none;
  height: 3px;
  background: linear-gradient(to right, #3DCAB1, rgba(61, 202, 177, 0.2));
  opacity: 0.9;
}

/* Question styling within categories - no extra containers */
.question-title {
  color: #ffffff; /* White text for high contrast against blue background */
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 10px;
  margin-top: 20px; /* Add top margin for separation between questions */
}

.question-title:first-of-type {
  margin-top: 0; /* Remove top margin for first question in category */
}

.question-description {
  color: #e0e0e0; /* Slightly muted white for description */
  font-size: 14px;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 15px;
  margin-top: 0;
}
