/**
 * Manage Rejections Queue Styles v1.2.0
 * Clean, professional styling for rejections queue management
 * - Added horizontal scroll support
 * - Improved job details visibility
 * - Left-aligned table content with flex alignment fix
 * - Show source UAR campaign instead of just rejection ID
 * - Cancel workflow with mandatory comment modal
 * - Back button navigation to Access Management
 * - Campaign name prominently displayed with ID as secondary info
 */

.manage-rejections-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header Styles */
.manage-rejections-header {
  margin-bottom: 2rem;
}

.manage-rejections-header .header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.back-button:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #374151;
}

.back-button i {
  width: 16px;
  height: 16px;
}

.manage-rejections-header .header-title h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 0.5rem 0;
}

.manage-rejections-header .header-title h2 i {
  width: 28px;
  height: 28px;
  color: #F59E0B;
}

.manage-rejections-header .header-title p {
  color: #6B7280;
  margin: 0;
  font-size: 0.875rem;
}

/* Stats Cards */
.manage-rejections-header .header-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.manage-rejections-header .stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.manage-rejections-header .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.25rem;
}

.manage-rejections-header .stat-label {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
  display: none;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  align-items: center;
  justify-content: space-between;
}

.bulk-actions-toolbar.show {
  display: flex;
}

.bulk-actions-toolbar .toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bulk-actions-toolbar .selection-count {
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
}

.bulk-actions-toolbar .toolbar-right {
  display: flex;
  gap: 0.75rem;
}

/* Table Container */
.rejections-table-container {
  background: white;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  overflow-x: auto;  /* Enable horizontal scroll */
  overflow-y: visible;
}

/* Table Styles */
.rejections-table {
  width: 100%;
  min-width: 1000px;  /* Minimum width to trigger scroll on smaller screens */
  border-collapse: collapse;
}

.rejections-table thead {
  background: #F9FAFB;
  border-bottom: 2px solid #E5E7EB;
}

.rejections-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rejections-table tbody tr {
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s;
}

.rejections-table tbody tr:hover {
  background: #F9FAFB;
}

.rejections-table tbody tr.selected {
  background: #EEF2FF;
}

.rejections-table td {
  padding: 1rem;
  font-size: 0.875rem;
  color: #374151;
  text-align: left;  /* Ensure all columns are left-aligned */
  vertical-align: top;  /* Align content to top for better readability */
}

/* Request Number */
.request-number {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.8125rem;
  background: #F3F4F6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: #6B7280;
}

/* Request Info Column (Campaign Name + ID + Rejection ID) */
.request-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  text-align: left;
}

.request-info .campaign-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1F2937;
  text-align: left;
}

.request-info .campaign-id-small {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.75rem;
  color: #6366F1;
  background: #EEF2FF;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #C7D2FE;
}

.request-info .campaign-id {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6366F1;
  background: #EEF2FF;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  border: 1px solid #C7D2FE;
}

.request-info .rejection-id {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.75rem;
  color: #9CA3AF;
  text-align: left;
}

/* User Info Column */
.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;  /* Force left alignment in flex container */
  text-align: left;  /* Ensure text is left-aligned */
}

.user-info .user-name {
  font-weight: 600;
  color: #1F2937;
  text-align: left;
}

.user-info .user-email {
  color: #6B7280;
  font-size: 0.8125rem;
  text-align: left;
}

.user-info .user-id {
  color: #9CA3AF;
  font-size: 0.75rem;
  text-align: left;
}

/* Job Info Column */
.job-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;  /* Force left alignment in flex container */
  text-align: left;  /* Ensure text is left-aligned */
}
}

.job-info .job-title {
  font-weight: 500;
  color: #374151;
}

.job-info .department,
.job-info .location {
  color: #6B7280;
  font-size: 0.8125rem;
}

.job-info .no-data {
  color: #9CA3AF;
  font-size: 0.8125rem;
  font-style: italic;
}

/* Row Actions */
.row-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.btn-icon.btn-danger {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #DC2626;
}

.btn-icon.btn-danger:hover {
  background: #FECACA;
  border-color: #FCA5A5;
}

.btn-icon i {
  width: 16px;
  height: 16px;
}

/* Empty State */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: #6B7280;
}

.empty-state i {
  width: 64px;
  height: 64px;
  color: #D1D5DB;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: #6B7280;
  margin: 0;
}

/* Error State */
.error-state {
  padding: 4rem 2rem;
  text-align: center;
}

.error-state i {
  width: 64px;
  height: 64px;
  color: #EF4444;
  margin-bottom: 1rem;
}

.error-state h3 {
  font-size: 1.25rem;
  color: #1F2937;
  margin: 0 0 0.5rem 0;
}

.error-state p {
  color: #6B7280;
  margin: 0 0 1.5rem 0;
}

/* Warning Button Style */
.btn-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
}

.btn-icon.btn-warning {
  background: transparent;
  color: #F59E0B;
  border: 1px solid #FDE68A;
}

.btn-icon.btn-warning:hover {
  background: #FEF3C7;
  color: #D97706;
}

/* Cancel Modal Styles */
.rejection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.rejection-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

.rejection-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rejection-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rejection-modal-header h3 i {
  color: #F59E0B;
}

.modal-close {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #9CA3AF;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #F3F4F6;
  color: #374151;
}

.rejection-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-info {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.modal-info i {
  color: #F59E0B;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.modal-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #92400E;
}

.modal-info p:last-child {
  margin-bottom: 0;
}

.modal-info ul {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
  font-size: 0.875rem;
  color: #92400E;
}

.modal-info li {
  margin-bottom: 0.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group .required {
  color: #EF4444;
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
}

.form-group textarea:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea.error {
  border-color: #EF4444;
}

.form-group textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6B7280;
}

.rejection-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .manage-rejections-container {
    padding: 1.5rem;
  }
  
  .rejections-table {
    font-size: 0.8125rem;
  }
  
  .rejections-table th,
  .rejections-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .manage-rejections-container {
    padding: 1rem;
  }
  
  .manage-rejections-header .header-top {
    flex-direction: column;
    gap: 1rem;
  }
  
  .bulk-actions-toolbar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .bulk-actions-toolbar .toolbar-right {
    flex-direction: column;
  }
  
  .rejections-table-container {
    overflow-x: auto;
  }
  
  .rejections-table {
    min-width: 900px;
  }
}
