/* ===== Professional list view for WP Job Manager ===== */

/* Shared 4-col grid (header + rows use the same template) */
.wpjm-grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 0.8fr);
  gap: 12px;
  align-items: center;
}

/* Header row */
.wpjm-list-header {
  color-scheme: wpjm-grid-4;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: .01em;
  padding: 12px 16px;
  border: 1px solid #eaeaea;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #fafafa;
}

/* List shell */
ul.job_listings { margin: 0; padding: 0; }

/* Each listing = one grid row */
ul.job_listings > li.job_listing {
  list-style: none;
  margin: 0;
  border: 1px solid #eaeaea;
  border-top: 0;
}
ul.job_listings > li.job_listing:last-child {
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

/* Link becomes the grid, matching header columns 1:1 */
ul.job_listings > li.job_listing > a {
  color-scheme: wpjm-grid-4;
  text-decoration: none;
  padding: 12px 16px;
}
ul.job_listings > li.job_listing > a:hover { background: #f7f9fc; }

/* Hide logo for a cleaner table look */
ul.job_listings img.company_logo { display: none !important; }

/* Column: Position */
ul.job_listings .position h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
ul.job_listings .position .company { display: none; } /* we show company in its own column */

/* Column: Company (mirrored in JS) */
.wpjm-col-company { color: #111827; font-weight: 600; }

/* Column: Location — allow full wrapping (no ellipsis) */
.wpjm-col-location,
ul.job_listings .location {
  color: #374151;
  white-space: normal;       /* allow wrap */
  overflow: visible;         /* no clipping */
  text-overflow: initial;    /* disable ellipsis */
  word-break: break-word;    /* very long addresses still wrap nicely */
}

/* Column: Posted (date) */
.wpjm-col-posted { color: #6b7280; font-size: .92rem; }

/* Make any inner meta behave like normal flow */
ul.job_listings .meta { display: contents; }

/* Ensure inner text never re-adds underlines */
ul.job_listings > li.job_listing > a * { text-decoration: none !important; }

/* Responsive */
@media (max-width: 900px) {
  .wpjm-grid-4 { gap: 10px; }
}
@media (max-width: 680px) {
  .wpjm-list-header { display: none; }  /* hide header on mobile */
  ul.job_listings > li.job_listing > a {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .wpjm-col-company, .wpjm-col-location, .wpjm-col-posted { font-size: .95rem; }
  ul.job_listings > li.job_listing { border-radius: 10px; margin-bottom: 10px; }
}
