/* Result Page Styles */
/* Merged from: searchresult.css + candidatecard.css + expanded-view.css + pdf-viewer.css */

/* Search Results Layout - Matching JDpills width and style */

/* Main container for search results */
#resultSection {
  max-width: 100%;
  margin: 0 auto;
  padding: 12px;
  font-family: system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

/* Search results container */
.search-results-container {
  margin-top: 16px;
}

/* Search results header */
.search-results-header {
  margin-bottom: 12px;
}

.search-results-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px 0;
}


/* Pill Pass Counts */
.pill-pass-counts {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.pill-pass-counts h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.pass-counts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pass-count-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #374151;
}

.pass-count-item strong {
  color: #059669;
}

/* Results Meta */
.results-meta {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  font-style: italic;
}


/* Candidate Card Styles */

/* Individual candidate card */
.candidate-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-x: hidden; /* No horizontal scrolling */
}

.candidate-card:hover {
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Candidate header */
.candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.candidate-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.candidate-score {
  background: #059669;
  color: white;
  border-radius: 25px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 500;
}

/* Expand button - positioned in top right */
.expand-btn {
  background: transparent;
  color: #059669;
  border: 1px solid #059669;
  border-radius: 25px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-btn:hover {
  background: rgba(5, 150, 105, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Candidate pills section */
.candidate-pills {
  margin-bottom: 8px;
}

.candidate-pills h3 {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin: 0 0 6px 0;
}

/* Pill container - holds dots above button */
.pill-container {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Pill buttons in candidate cards */
.pill-button {
  background: transparent;
  color: #666;
  border: 1px solid #e5e7eb;
  border-radius: 25px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.pill-button:hover {
  border-color: #059669;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.pill-button.active {
  background: rgba(5, 150, 105, 0.15);
  color: #059669;
  border-color: #059669;
}


/* Match category pill */
.match-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-right: 8px;
}

/* Collapsed view */
.collapsed-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Expanded View Styles - Matching Figma Design */

/* Expanded view container */
.expanded-view {
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 2000px;
  }
}

/* Side-by-side layout: requirements left, PDF right */
.expanded-layout {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 1160px; /* 400px + 24px + 720px = 1144px, with some margin */
  align-items: flex-start; /* Align columns to top */
  overflow: hidden; /* No scrolling in expanded layout itself */
}

/* Requirements Analysis Column (Left Side) */
.requirements-analysis-column {
  flex: 0 0 400px;
  max-width: 400px;
  max-height: 900px; /* Match PDF viewer height */
  overflow-y: auto; /* Scroll if content is too tall */
  overflow-x: hidden;
}

.analysis-header {
  margin-bottom: 16px;
}

.analysis-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* PDF Column (Right Side) */
.pdf-column {
  flex: 1;
  min-width: 0; /* Allow flexbox to shrink if needed */
}

/* Individual Requirement Card */
.requirement-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.requirement-header {
  margin-bottom: 12px;
}

.requirement-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* Proofs Container */
.proofs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

/* Individual Proof Item */
.proof-item {
  background: #f9fafb;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.proof-item.additional-proof {
  display: none; /* Hidden by default */
}

.proof-content {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.proof-content:hover {
  background: #f3f4f6;
}

.proof-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  margin: 0;
  flex: 1;
}

.proof-score {
  background: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  padding: 4px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Color-coded pill score styles */
.pill-score-excellent {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.pill-score-good {
  background: #bbf7d0 !important;
  color: #15803d !important;
}

.pill-score-fair {
  background: #fed7aa !important;
  color: #c2410c !important;
}

.pill-score-poor {
  background: #fecaca !important;
  color: #dc2626 !important;
}

.pill-score-very-poor {
  background: #fca5a5 !important;
  color: #b91c1c !important;
}

/* Toggle Proofs Button */
.toggle-proofs-btn {
  background: white;
  border: none;
  color: #2563eb;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.toggle-proofs-btn:hover {
  color: #1d4ed8;
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

/* PDF Viewer Styles */
.pdf-external-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s ease;
}

.pdf-external-link:hover {
  color: #374151;
}
/* PDF Viewer - Essential Styles for Highlighting */

/* PDF column container - fixed 720px width, positioned on right side */
.pdf-column {
  max-height: 900px;
  overflow-y: auto;
  overflow-x: hidden; /* No horizontal scrolling */
  width: 720px; /* Fixed width exactly as requested */
  flex-shrink: 0; /* Prevent shrinking in flex layout */
}

/* PDF page container - fits canvas size for proper highlighting */
.pdf-page-container {
  position: relative;
  margin: 10px auto;
  display: block;
  max-width: 100%; /* Fill the available width in the 720px column */
}

/* PDF canvas - static size for highlighting to work */
.pdf-canvas {
  display: block;
  border: 1px solid #ddd;
  max-width: 100%; /* Prevent overflow but maintain aspect ratio */
  height: auto; /* Maintain aspect ratio */
}

/* Highlight container - positioned over PDF canvas */
.highlight-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Highlight divs - yellow highlights over text */
.highlight-div {
  position: absolute;
  background-color: yellow;
  opacity: 0.7;
  pointer-events: none;
}

/* Collapse Button */
.collapse-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-end;
  margin-top: -6px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.15px;
}

.collapse-btn:hover {
  background: #f9fafb;
  border-color: #2563eb;
}

/* Candidate Status Boxes */
.candidate-status-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.status-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.status-box:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.status-box.active {
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-count {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.status-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.status-box.status-shortlisted {
  border-color: #10b981;
}

.status-box.status-maybe {
  border-color: #f59e0b;
}

.status-box.status-rejected {
  border-color: #ef4444;
}

/* Active Action Button States */
.action-btn.active-shortlist {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.action-btn.active-maybe {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

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