/* ============================================================
   SUCCESS AFRICA JOBS — COMPONENTS CSS
   File : assets/css/components.css
   ============================================================ */

/* ------------------------------------------------------------
   ACTION ITEM (score improvement list)
   ------------------------------------------------------------ */
.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
}

.action-item:hover {
  border-color: var(--navy);
  background: var(--info-bg);
}

.action-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-item__icon--blue   { background: var(--info-bg); }
.action-item__icon--green  { background: var(--success-bg); }
.action-item__icon--gold   { background: var(--gold-bg); }
.action-item__icon--purple { background: #EDE9FE; }

.action-item__text { flex: 1; }

.action-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.action-item__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.action-item__pts {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   REVIEW CARD
   ------------------------------------------------------------ */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.review-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.review-card__meta { flex: 1; }

.review-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.review-card__placed {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.review-card__stars {
  display: flex;
  gap: 2px;
}

.star-filled  { color: var(--gold); font-size: 14px; }
.star-empty   { color: var(--border-dark); font-size: 14px; }

.review-card__body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
  font-style: italic;
}

.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-card__date {
  font-size: 0.78rem;
  color: var(--text-light);
}

.review-card__actions {
  display: flex;
  gap: 6px;
}

/* ------------------------------------------------------------
   SUCCESS WALL CARD
   ------------------------------------------------------------ */
.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: box-shadow .2s;
}

.success-card:hover { box-shadow: var(--shadow-md); }

.success-card__avatar {
  margin: 0 auto 12px;
}

.success-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.success-card__role {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.success-card__company {
  font-size: 0.82rem;
  color: var(--navy);
  font-weight: 600;
  margin-top: 3px;
}

.success-card__stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 8px 0;
}

.success-card__quote {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ------------------------------------------------------------
   JOB LIST ROW (manage jobs table alternative)
   ------------------------------------------------------------ */
.job-list-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.job-list-row:last-child { border-bottom: none; }

.job-list-row__body { flex: 1; min-width: 0; }

.job-list-row__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-list-row__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.job-list-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: flex-start;
}

/* Source badges */
.source-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.source-admin    { background: #EDE9FE; color: #4C1D95; }
.source-employer { background: var(--info-bg); color: var(--navy); }
.source-scraped  { background: var(--gold-bg); color: #92620A; }

/* ------------------------------------------------------------
   NOTIFICATION ITEM
   ------------------------------------------------------------ */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child { border-bottom: none; }

.notif-item--unread { background: var(--info-bg); margin: 0 -20px; padding: 12px 20px; }

.notif-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-item__body { flex: 1; }

.notif-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-item__message {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.notif-item__time {
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   TABS
   ------------------------------------------------------------ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn--active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 600;
}

.tab-content { display: none; }
.tab-content--active { display: block; }

/* ------------------------------------------------------------
   MODAL
   ------------------------------------------------------------ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}

.modal__close:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.modal__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.modal__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ------------------------------------------------------------
   TIMELINE (score history, application stages)
   ------------------------------------------------------------ */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--border);
}

.timeline-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-item__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ------------------------------------------------------------
   BENCHMARK BAR (market intelligence)
   ------------------------------------------------------------ */
.benchmark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.benchmark-row__label {
  font-size: 0.84rem;
  color: var(--text-secondary);
  width: 180px;
  flex-shrink: 0;
}

.benchmark-row__bar {
  flex: 1;
}

.benchmark-row__value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   DRAG INDICATOR (pipeline)
   ------------------------------------------------------------ */
.dragging {
  opacity: .5;
  transform: rotate(1deg);
}

.drag-over {
  background: var(--info-bg);
  border: 2px dashed var(--navy);
}
