/* Core Modal Styling */
.kyc-modal-body {
  height: 80vh;
  overflow: auto;
  padding: 0;
  background-color: #f9fafb;
}

.kyc-table-wrapper {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem;
}

/* Main Table Styling */
.kyc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.kyc-table thead {
  background-color: #2563eb;
  color: #ffffff;
}

.kyc-table thead th {
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid #1d4ed8;
  letter-spacing: 0.3px;
}

/* Row States */
.kyc-row {
  background-color: #ffffff;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease-out;
}

.kyc-row:hover {
  background-color: #f9fafb;
}

.kyc-row-mixed {
  background-color: #fefce8;
}

.kyc-row-mixed:hover {
  background-color: #fffbeb;
}

.kyc-row-consistent {
  background-color: #ffffff;
}

/* Table Cells */
.kyc-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.kyc-cell-icon {
  cursor: pointer;
  text-align: center;
  width: 32px;
  padding: 14px 8px;
  color: #6b7280;
  user-select: none;
  transition: color 0.15s ease-out;
}

.kyc-cell-icon:hover {
  color: #2563eb;
}

/* Insurer Name & Status */
.kyc-insurer-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  color: #111827;
}

.insurer-label {
  letter-spacing: 0.2px;
}

.kyc-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-block;
  white-space: nowrap;
}

.kyc-status-badge.mixed {
  background-color: #fcd34d;
  color: #78350f;
}

/* Checkbox Styling */
.kyc-checkbox-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.kyc-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2563eb;
}

.kyc-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Expanded Row */
.kyc-expanded-row {
  background-color: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
}

.kyc-expanded-row td {
  padding: 0;
}

.kyc-expanded-content {
  padding: 20px 16px;
}

.kyc-expanded-compact {
  padding: 12px 16px;
}

.consistent-info {
  margin-bottom: 12px;
  padding: 8px 12px;
  background-color: #ecfdf5;
  border-left: 3px solid #10b981;
  border-radius: 4px;
}

.branch-count {
  font-size: 13px;
  color: #047857;
  font-weight: 500;
}

/* Configuration Stats (Mixed Only) */
.kyc-config-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-item {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px 12px;
  text-align: center;
  transition:
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.stat-item:hover {
  border-color: #2563eb;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.stat-number {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-ckyc-only .stat-number {
  color: #2563eb;
}

.stat-upload-only .stat-number {
  color: #7c3aed;
}

.stat-both .stat-number {
  color: #059669;
}

.stat-none .stat-number {
  color: #dc2626;
}

/* Inner Branch Table */
.kyc-inner-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}

.kyc-inner-table thead {
  background-color: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #d1d5db;
}

.kyc-inner-table th {
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  color: #374151;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kyc-inner-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.kyc-inner-table tbody tr:hover {
  background-color: #f9fafb;
}

.branch-name {
  font-weight: 500;
  color: #111827;
}

.branch-group {
  font-size: 12px;
  color: #6b7280;
}

.branch-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.branch-type::first-letter {
  text-transform: uppercase;
}

.branch-row-hidden .branch-name,
.branch-row-hidden .branch-group {
  opacity: 0.6;
  color: #9ca3af;
  font-style: italic;
}

.branch-checkbox {
  text-align: center;
}

.kyc-inner-table-compact td {
  padding: 8px 12px;
  font-size: 12px;
}

.more-branches {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  padding: 0 12px;
}

/* Update Footer */
.kyc-update-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px;
  margin: 1rem;
  gap: 8px;
}

.kyc-update-footer button {
  min-width: 100px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 4px;
  transition: all 0.2s ease-out;
}

.kyc-update-footer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .kyc-modal-body {
    height: 90vh;
  }

  .kyc-config-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .kyc-table {
    font-size: 12px;
  }

  .kyc-table td {
    padding: 10px 12px;
  }

  .kyc-insurer-name {
    gap: 6px;
  }

  .stat-number {
    font-size: 18px;
  }
}
