/* ==========================================================================
   MyJobAlly — Jobs listing page styles
   ========================================================================== */

/* ---- Compact page header (breadcrumb + mini search) ---- */
.page-hero {
  background: var(--bg-alt);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.breadcrumb a:hover { color: var(--brand-pink); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--text-dark); font-weight: 500; }

.page-hero h1 { font-size: 28px; margin-bottom: var(--space-md); }

.mini-search-form {
  display: flex;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  padding: 6px;
}
.mini-search-form .search-field { padding: 8px 14px; }
.mini-search-form .search-submit { padding: 12px 24px; }

/* ---- Layout: sidebar + listings ---- */
.jobs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

/* ---- Filters sidebar ---- */
.filters-panel {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  align-self: start;
  position: sticky;
  top: 90px;
  min-width: 0;
}

.filters-panel h2 {
  font-size: 17px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters-panel .clear-filters {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-pink);
}

.filter-group {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}
.filter-group:last-child { border-bottom: none; }

.filter-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--text-body);
  cursor: pointer;
  min-width: 0;
  overflow-wrap: break-word;
}
.filter-option input { accent-color: var(--brand-pink); width: 16px; height: 16px; }
.filter-option .count { margin-left: auto; color: var(--text-muted); font-size: 13px; }

.salary-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.salary-range-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13.5px;
}

.ad-zone--sidebar { width: 100%; max-width: 300px; height: 250px; margin: var(--space-md) 0 0; }

/* ---- Reusable sidebar filter partial (includes/job-filters-sidebar.html) ---- */

/* Locations: typeable + dropdown combobox via native <input list="..."> + <datalist> */
.location-field { margin-bottom: var(--space-sm); }
.location-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.location-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13.5px;
}
.location-field input:focus { border-color: var(--brand-pink); }
.location-submit-btn { width: 100%; margin-top: var(--space-xs); }

/* Expand/collapse for long filter lists — <details>/<summary>, no JS.
   Reuses the same chevron-rotate pattern as the FAQ accordion. */
.filter-expand-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-pink);
  cursor: pointer;
  list-style: none;
  margin-top: 6px;
}
.filter-expand-toggle::-webkit-details-marker { display: none; }
.filter-expand-toggle .chevron { width: 13px; height: 13px; transition: transform 0.15s ease; }
details[open] > .filter-expand-toggle .chevron { transform: rotate(180deg); }
.filter-expand-content { margin-top: 8px; }

.filter-group h3 .count-badge {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ---- Listings header (result count + sort) ---- */
.listings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.listings-count { font-size: 15px; color: var(--text-body); }
.listings-count strong { color: var(--text-dark); }

.sort-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.sort-select select {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-dark);
}

/* ---- Job cards ---- */
.job-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.job-card {
  display: flex;
  gap: var(--space-md);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.job-card:hover {
  border-color: var(--brand-pink);
  box-shadow: 0 8px 24px rgba(247, 53, 106, 0.08);
}

/* Featured job cards, added on request — previously only the small
   "Featured" badge differed; the card itself looked identical to any
   other listing. Resting border now matches what a normal card's
   border becomes ON hover (var(--brand-pink)), so a featured listing
   reads as already-highlighted even before anyone interacts with it,
   and its own hover state goes further still — a stronger shadow plus
   a slight lift — rather than just repeating the same hover a normal
   card already gets. */
.job-card--featured {
  border-color: var(--brand-pink);
  box-shadow: 0 8px 24px rgba(247, 53, 106, 0.08);
}
.job-card--featured:hover {
  border-color: var(--brand-pink);
  box-shadow: 0 14px 36px rgba(247, 53, 106, 0.28);
  transform: translateY(-3px);
}

.job-card-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.job-card-body { flex: 1; min-width: 0; }

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.job-card-title {
  font-size: 18px;
  margin-bottom: 4px;
}
.job-card-title a:hover { color: var(--brand-pink); }

.job-card-company {
  font-size: 14.5px;
  color: var(--text-body);
  margin-bottom: var(--space-xs);
}
.job-card-company a:hover { color: var(--brand-pink); }

.save-job-form {
  margin: 0;
  flex-shrink: 0;
}

.save-job-btn {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
}
.save-job-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); }
.save-job-btn .icon { width: 18px; height: 18px; }
.save-job-btn.saved { border-color: var(--brand-pink); color: var(--brand-pink); background: var(--brand-pink-soft); }

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.job-tag .icon { width: 14px; height: 14px; }

.job-tag--type {
  background: var(--brand-pink-soft);
  color: var(--brand-pink);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.job-tag--featured {
  background: #FFF4D6;
  color: #A8720A;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* Added on request — match score badge on job/candidate cards. */
.job-tag--match, .candidate-tag--match {
  background: #F0FDF4;
  color: #16A34A;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.job-tag--match .icon, .candidate-tag--match .icon { width: 13px; height: 13px; }

.job-card-excerpt {
  font-size: 14.5px;
  color: var(--text-body);
  margin-bottom: var(--space-sm);
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.job-card-posted {
  font-size: 13px;
  color: var(--text-muted);
}

/* In-feed ad card, styled to sit inline within the job list without
   looking like a listing itself — clear "Advertisement" label required
   by AdSense policy for ads near content. */
.job-list .ad-zone {
  margin: var(--space-xs) 0;
}

/* ---- Pagination (reused pattern from homepage) ---- */
.jobs-pagination { margin-top: var(--space-lg); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .jobs-layout { grid-template-columns: minmax(0, 1fr); }
  .filters-panel { position: static; }
  .job-card { flex-direction: column; }
  .job-card-logo { width: 48px; height: 48px; }
}
