/* candidate-profile.css
 *
 * Styles for recruiter-candidate.php (full candidate profile) and the
 * seeker-facing "how recruiters see me" preview on dashboard-recruiter-view.php.
 * Both render the same markup, so one stylesheet serves both.
 *
 * Reuses the --rec-* tokens declared in recruiter.css, which is always loaded
 * before this file on both pages.
 */

.cprof-page {
  background: var(--rec-surface);
  min-height: 70vh;
  padding: 28px 0 60px;
}

.cprof-back {
  margin-bottom: 18px;
}
.cprof-back a {
  font-size: 0.88rem;
  color: var(--rec-muted);
  text-decoration: none;
}
.cprof-back a:hover { color: var(--rec-blue); }

.cprof-loading,
.cprof-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--rec-muted);
}
.cprof-error i { font-size: 1.8rem; color: var(--rec-amber); }
.cprof-error p { margin: 12px 0 18px; }

/* ---------- Header ---------- */
.cprof-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rec-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.cprof-avatar,
.cprof-avatar-initials {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.cprof-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rec-blue), var(--rec-purple));
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}
.cprof-headline { flex: 1; min-width: 0; }
.cprof-headline h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rec-dark);
  margin: 0 0 4px;
}
.cprof-role {
  font-size: 1rem;
  color: var(--rec-blue);
  font-weight: 500;
  margin-bottom: 8px;
}
.cprof-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--rec-muted);
  margin-bottom: 10px;
}
.cprof-meta i { margin-right: 4px; }
.cprof-relocate { color: var(--rec-green); }

.cprof-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--rec-muted);
}
.cprof-status i { font-size: 0.5rem; }
.cprof-status.active {
  background: #ecfdf5;
  color: var(--rec-green);
}

/* ---------- Share bar ---------- */
.cprof-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--rec-text);
}
.cprof-share i { color: var(--rec-blue); }
.cprof-share-btn {
  background: var(--rec-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cprof-share-btn:hover { background: #1d4ed8; }

/* ---------- Cards ---------- */
.cprof-card {
  background: #fff;
  border: 1px solid var(--rec-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.cprof-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rec-dark);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cprof-card h2 i { color: var(--rec-blue); font-size: 0.9rem; }

.cprof-bio {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--rec-text);
  margin: 0;
  white-space: pre-line;
}

/* ---------- Contact / locks ---------- */
.cprof-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.cprof-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--rec-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 7px 14px;
  text-decoration: none;
}
.cprof-links a:hover { background: #dbeafe; }

.cprof-locked {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px dashed var(--rec-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--rec-muted);
}
.cprof-locked > i { color: var(--rec-amber); }
.cprof-locked span { flex: 1; min-width: 200px; }

.cprof-btn,
.cprof-btn-sm {
  display: inline-block;
  background: var(--rec-blue);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.cprof-btn { padding: 10px 20px; font-size: 0.9rem; }
.cprof-btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.cprof-btn:hover,
.cprof-btn-sm:hover { background: #1d4ed8; color: #fff; }

/* ---------- Timeline (experience / education) ---------- */
.cprof-timeline { display: flex; flex-direction: column; gap: 20px; }
.cprof-entry {
  border-left: 2px solid var(--rec-border);
  padding-left: 16px;
  position: relative;
}
.cprof-entry::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec-blue);
}
.cprof-entry-title {
  font-weight: 600;
  color: var(--rec-dark);
  font-size: 0.95rem;
}
.cprof-entry-sub {
  font-size: 0.87rem;
  color: var(--rec-text);
  margin-top: 2px;
}
.cprof-entry-dates {
  font-size: 0.8rem;
  color: var(--rec-muted);
  margin-top: 2px;
}
.cprof-entry-desc {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--rec-text);
  margin: 8px 0 0;
  white-space: pre-line;
}

/* ---------- Skills ---------- */
.cprof-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.cprof-skill {
  background: #f1f5f9;
  color: var(--rec-text);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.82rem;
}

/* ---------- Preferences ---------- */
.cprof-pref-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rec-border);
  font-size: 0.88rem;
}
.cprof-pref-row:last-child { border-bottom: none; }
.cprof-pref-label { color: var(--rec-muted); }
.cprof-pref-value { color: var(--rec-text); font-weight: 500; text-align: right; }
.cprof-pref-locked { color: var(--rec-muted); font-weight: 400; }
.cprof-pref-locked i { color: var(--rec-amber); margin-right: 4px; }

/* ---------- Seeker preview banner (dashboard-recruiter-view.php) ---------- */
.cprof-preview-banner {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 18px;
}
.cprof-preview-banner h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.cprof-preview-banner p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.85;
  line-height: 1.6;
}
.cprof-preview-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cprof-tab {
  background: #fff;
  border: 1px solid var(--rec-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--rec-muted);
  cursor: pointer;
}
.cprof-tab.active {
  background: var(--rec-blue);
  border-color: var(--rec-blue);
  color: #fff;
}

/* Completeness / recency strip on the seeker preview */
.cprof-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cprof-signal {
  background: #fff;
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  padding: 16px 18px;
}
.cprof-signal-label {
  font-size: 0.78rem;
  color: var(--rec-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.cprof-signal-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rec-dark);
}
.cprof-signal-note {
  font-size: 0.78rem;
  color: var(--rec-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.cprof-signal.good .cprof-signal-value { color: var(--rec-green); }
.cprof-signal.warn .cprof-signal-value { color: var(--rec-amber); }

/* The example-profile notice, so a seeker never mistakes it for their own */
.cprof-example-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .cprof-header { flex-direction: column; }
  .cprof-avatar,
  .cprof-avatar-initials { width: 64px; height: 64px; font-size: 1.3rem; }
  .cprof-headline h1 { font-size: 1.25rem; }
  .cprof-share { flex-direction: column; align-items: flex-start; }
  .cprof-pref-row { flex-direction: column; gap: 2px; }
  .cprof-pref-value { text-align: left; }
}

/* Live (unlocked) contact details on the full profile. Shown only when the
   recruiter has paid AND the candidate has not opted out; otherwise the
   .cprof-locked block explains which of the two is missing. */
.cprof-contact-live-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.cprof-contact-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--rec-text);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  word-break: break-all;
}
.cprof-contact-live:hover { background: #d1fae5; color: var(--rec-dark); }
.cprof-contact-live i { color: var(--rec-green); flex-shrink: 0; }

/* Stored-resume button on the recruiter-facing profile. Green like the live
   contact block, because it is the same class of unlocked, paid-for detail. */
.cprof-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 7px 14px;
  text-decoration: none;
  cursor: pointer;
}
.cprof-resume-btn:hover { background: #d1fae5; color: #065f46; }

.cprof-resume-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--rec-muted);
  background: #f8fafc;
  border: 1px dashed var(--rec-border);
  border-radius: 8px;
  padding: 7px 14px;
}
.cprof-resume-locked i { color: var(--rec-amber); }

/* Notice shown to someone who arrived via a shared profile link: whether their
   request to join the company was recorded, or why it was not. */
.cprof-join-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--rec-text);
}
.cprof-join-notice i { color: var(--rec-blue); margin-right: 6px; }
