/* Approval Pages Styles */

/* Tab buttons - Clean minimal design */
.approval-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.approval-tab:hover {
  color: #111827;
  background-color: #f9fafb;
}

.approval-tab.active {
  color: #111827;
  background-color: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tab-badge {
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.8125rem; /* 13px - slightly increased */
  font-weight: 600;
  border-radius: 9999px;
  background-color: #374151;
  color: white;
}

.approval-tab:not(.active) .tab-badge {
  background-color: #9ca3af;
}

/* Approval cards */
.approval-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
  cursor: pointer;
}

.approval-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.approval-card.needs-attention {
  border-left: 4px solid #f97316;
}

.approval-card.approved-recent {
  border-left: 4px solid #22c55e;
}

/* Status badges - Clean minimal design */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem; /* 13px - slightly increased for accessibility */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.pending {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.status-badge.approved {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.rejected {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge.changes-requested {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.status-badge.withdrawn {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Approval actions */
.approval-actions {
  display: flex;
  gap: 0.5rem;
}

.approval-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem; /* 14px - accessibility minimum */
  font-weight: 500;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px; /* Touch target minimum */
}

.approval-action-btn.approve {
  background-color: #22c55e;
  border-color: #22c55e;
  color: white;
}

.approval-action-btn.approve:hover {
  background-color: #16a34a;
}

.approval-action-btn.reject {
  background-color: white;
  border-color: #ef4444;
  color: #ef4444;
}

.approval-action-btn.reject:hover {
  background-color: #fef2f2;
}

.approval-action-btn.changes {
  background-color: white;
  border-color: #f97316;
  color: #f97316;
}

.approval-action-btn.changes:hover {
  background-color: #fff7ed;
}

/* Feedback notes display - Subtle styling */
.feedback-notes {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  border-left: 4px solid #9ca3af;
}

.feedback-notes.error {
  background-color: #fef2f2;
  border-left-color: #ef4444;
}

.feedback-notes.success {
  background-color: #f0fdf4;
  border-left-color: #22c55e;
}

.feedback-notes-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.feedback-notes.error .feedback-notes-header {
  color: #991b1b;
}

.feedback-notes.success .feedback-notes-header {
  color: #166534;
}

.feedback-notes-content {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.feedback-notes.error .feedback-notes-content {
  color: #991b1b;
}

.feedback-notes.success .feedback-notes-content {
  color: #166534;
}

/* Timeline for approval history */
.approval-timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.approval-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e5e7eb;
}

.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background-color: #9ca3af;
  border: 2px solid white;
}

.timeline-item.pending::before {
  background-color: #fbbf24;
}

.timeline-item.approved::before {
  background-color: #22c55e;
}

.timeline-item.rejected::before {
  background-color: #ef4444;
}

.timeline-item.changes-requested::before {
  background-color: #f97316;
}

/* Review modal content */
.review-estimate-info {
  display: grid;
  gap: 1rem;
}

.review-info-row {
  display: flex;
  gap: 1rem;
}

.review-info-item {
  flex: 1;
}

.review-info-label {
  font-size: 0.8125rem; /* 13px - increased */
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.review-info-value {
  font-size: 0.9375rem;
  color: #111827;
  font-weight: 500;
}

.review-info-value.highlight {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb;
}

.review-submission-notes {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.review-submission-notes h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.review-submission-notes p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Feedback input */
.feedback-input-container {
  margin-top: 1rem;
}

.feedback-input-container label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.feedback-input-container textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 100px;
}

.feedback-input-container textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* High value indicator */
.high-value-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem; /* 12px - increased from 11px */
  font-weight: 600;
  text-transform: uppercase;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  border: 1px solid #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .approval-card {
    padding: 1rem;
  }
  
  .approval-actions {
    flex-wrap: wrap;
  }
  
  .approval-action-btn {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 0.75rem;
  }
  
  .review-info-row {
    flex-direction: column;
  }
}

/* Filter card selected state */
[data-filter].active {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  transform: scale(1.02);
}
