/*
 * myjobify-modern.css
 * Additional overrides for WP Job Manager plugin CSS and theme polish.
 * Loaded after style.css (parent + child).
 *
 * @version 2.0.0
 */

/* =========================================================
   JOB LISTING CARD -- Template Override Styles (.mj-*)
   ========================================================= */

.mj-job-card {
  list-style: none;
  margin: 0;
  padding: 0;
  animation: mj-fadeIn 0.3s ease both;
}

.mj-card-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background-color: var(--mj-card, #1e2535);
  border: 1px solid var(--mj-border, rgba(255,255,255,0.07));
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.mj-card-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #6366f1 0%, #22d3ee 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.mj-card-link:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.22);
  background-color: #242c3d;
  color: inherit;
  text-decoration: none;
}

.mj-card-link:hover::before {
  opacity: 1;
}

/* Logo */
.mj-card-logo {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background-color: #161b27;
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mj-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.mj-card-logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  color: #fff;
  letter-spacing: -0.03em;
}

/* Card body */
.mj-card-body {
  flex: 1;
  min-width: 0;
}

/* Badges on top */
.mj-card-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.mj-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

/* Job type badge colors */
.mj-badge--full-time   { background: rgba(16,185,129,0.12);  color: #10b981; }
.mj-badge--part-time   { background: rgba(249,115,22,0.12);  color: #f97316; }
.mj-badge--freelance   { background: rgba(34,211,238,0.12);  color: #22d3ee; }
.mj-badge--contract    { background: rgba(168,85,247,0.12);  color: #a855f7; }
.mj-badge--internship  { background: rgba(245,158,11,0.12);  color: #f59e0b; }
.mj-badge--temporary   { background: rgba(239,68,68,0.12);   color: #ef4444; }
.mj-badge--remote      { background: rgba(99,102,241,0.12);  color: #818cf8; }
.mj-badge--featured {
  background: linear-gradient(135deg, rgba(99,102,241,0.25) 0%, rgba(34,211,238,0.15) 100%);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.3);
}

/* Title */
.mj-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 7px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mj-card-link:hover .mj-card-title {
  color: #818cf8;
}

/* Sub (company + location) */
.mj-card-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.mj-card-company,
.mj-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  font-family: 'Inter', sans-serif;
}

.mj-card-company svg,
.mj-card-location svg {
  opacity: 0.6;
  flex: none;
}

/* Aside (date) */
.mj-card-aside {
  flex: none;
  text-align: right;
}

.mj-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.mj-card-date svg {
  opacity: 0.5;
}

/* Responsive card */
@media (max-width: 600px) {
  .mj-card-link {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px;
  }

  .mj-card-logo {
    width: 42px;
    height: 42px;
  }

  .mj-card-aside {
    display: none;
  }

  .mj-card-title {
    font-size: 14px;
  }
}

/* =========================================================
   WP JOB MANAGER PLUGIN CSS OVERRIDES
   ========================================================= */

/* Job Listings Container */
ul.job_listings {
  border-top: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.job_listings li.job_listing {
  border-bottom: none !important;
  padding: 0 !important;
}

/* Ignition directory markup (`li.list-item.job_listing`): the <li> itself is
   the card and must carry padding. The padding:0 !important above targets WP
   Job Manager's DEFAULT markup, where the inner <a> holds the padding instead.
   Higher specificity + !important so it wins over the rule above. */
ul.job_listings li.list-item.job_listing {
  padding: 22px 26px !important;
}

/* Old-style links inside listings */
ul.job_listings li.job_listing > a {
  display: block;
  padding: 22px 26px;
  background-color: var(--mj-card, #1e2535) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 18px !important;
  color: #e2e8f0 !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  text-decoration: none;
}

ul.job_listings li.job_listing > a:hover,
ul.job_listings li.job_listing > a:focus {
  background-color: #242c3d !important;
  border-color: rgba(99,102,241,0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

/* Featured item in old-style template */
ul.job_listings li.job_listing.job_position_featured > a {
  background-color: rgba(99,102,241,0.08) !important;
}

/* No jobs found */
ul.job_listings li.no_job_listings_found {
  border-bottom: none !important;
  padding: 0 !important;
}

/* Load more / pagination */
div.job_listings .load_more_jobs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  margin-top: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff !important;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: none !important;
  border-radius: 9999px !important;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

div.job_listings .load_more_jobs:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.4);
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  color: #fff !important;
}

div.job_listings .load_more_jobs.loading {
  opacity: 0.7;
  pointer-events: none;
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* =========================================================
   JOB FILTERS (Search Form)
   ========================================================= */

.job_filters {
  background-color: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 18px !important;
  padding: 24px 26px !important;
  margin-bottom: 28px !important;
}

.job_filters .search_jobs {
  padding: 0 !important;
}

.job_filters .search_jobs div label {
  color: #64748b;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block !important;
}

.job_filters .search_jobs input,
.job_filters .search_jobs select {
  background-color: #1e2535 !important;
  border: 1.5px solid rgba(255,255,255,0.07) !important;
  border-radius: 12px !important;
  color: #e2e8f0 !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 10px 14px !important;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  height: auto !important;
  width: 100% !important;
}

.job_filters .search_jobs input:focus,
.job_filters .search_jobs select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.22) !important;
  outline: none;
}

.job_filters .search_jobs input[type="submit"],
.form-filter [type="submit"] {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 24px !important;
  height: 46px !important;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.job_filters .search_jobs input[type="submit"]:hover,
.form-filter [type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.35) !important;
}

/* Job type filter pills */
.job_filters .job_types {
  background: transparent !important;
  border-top: 1px solid rgba(255,255,255,0.05) !important;
  padding: 14px 0 0 !important;
  margin-top: 14px !important;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job_filters .job_types li {
  border: none !important;
  float: none !important;
  padding: 0 !important;
}

.job_filters .job_types li label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s ease;
  text-transform: none !important;
  letter-spacing: 0.01em;
}

.job_filters .job_types li label:hover {
  border-color: rgba(99,102,241,0.5);
  color: #e2e8f0;
}

.job_filters .job_types li input:checked + label {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.5);
  color: #818cf8;
}

/* =========================================================
   SINGLE JOB LISTING (Plugin Default)
   ========================================================= */

.single_job_listing .company {
  background-color: #1e2535 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  padding: 20px 24px !important;
  margin-bottom: 28px;
}

.single_job_listing .company .name {
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.single_job_listing .company .tagline {
  color: #64748b;
}

.single_job_listing .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.single_job_listing .meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background-color: #1e2535;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9999px;
  color: #94a3b8 !important;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  float: none !important;
  margin: 0 !important;
}

.single_job_listing .meta .job-type {
  background: linear-gradient(135deg, rgba(99,102,241,0.2) 0%, rgba(34,211,238,0.12) 100%) !important;
  color: #818cf8 !important;
  border-color: rgba(99,102,241,0.3) !important;
  font-weight: 700;
}

/* Application wrapper */
.job-manager-application-wrapper,
.single_job_listing .application .application_details {
  background-color: #1e2535 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

.single_job_listing .application .application_details::before {
  border-bottom-color: rgba(255,255,255,0.07) !important;
}

.single_job_listing .application .application_details::after {
  border-bottom-color: #1e2535 !important;
}

/* =========================================================
   JOB SUBMIT FORM (job-manager-form)
   ========================================================= */

.job-manager-form fieldset {
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 0 0 20px !important;
  margin: 0 0 20px !important;
}

.job-manager-form fieldset label:not(.full-line-checkbox-field label) {
  color: #64748b;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.job-manager-form fieldset input.input-text,
.job-manager-form fieldset input.input-date,
.job-manager-form fieldset select,
.job-manager-form fieldset textarea {
  background-color: #1e2535 !important;
  border: 1.5px solid rgba(255,255,255,0.07) !important;
  border-radius: 12px !important;
  color: #e2e8f0 !important;
  font-family: 'Inter', sans-serif;
  padding: 10px 14px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.job-manager-form fieldset input.input-text:focus,
.job-manager-form fieldset input.input-date:focus,
.job-manager-form fieldset select:focus,
.job-manager-form fieldset textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.22) !important;
  outline: none;
}

.job-manager-form fieldset abbr.required {
  color: #ef4444;
  border: none;
}

.job-manager-form fieldset small.description {
  color: #64748b;
  font-size: 12px;
}

/* =========================================================
   JOB DASHBOARD TABLE
   ========================================================= */

#job-manager-job-dashboard table {
  width: 100%;
  border-collapse: collapse;
}

#job-manager-job-dashboard table td,
#job-manager-job-dashboard table th {
  padding: 14px 18px !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

#job-manager-job-dashboard table .job_title small {
  color: #64748b !important;
}

#job-manager-job-dashboard table ul.job-dashboard-actions {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#job-manager-job-dashboard table tr:hover ul.job-dashboard-actions,
#job-manager-job-dashboard table tr:focus ul.job-dashboard-actions {
  visibility: visible;
  opacity: 1;
}

#job-manager-job-dashboard table ul.job-dashboard-actions li,
#job-manager-job-dashboard table ul.job-dashboard-actions li a {
  color: #818cf8 !important;
  font-weight: 600;
}

#job-manager-job-dashboard table ul.job-dashboard-actions li .job-dashboard-action-delete,
#job-manager-job-dashboard table ul.job-dashboard-actions li .job-dashboard-action-delete a {
  color: #ef4444 !important;
}

/* Featured icon */
#job-manager-job-dashboard table .featured-job-icon::before {
  color: #f59e0b;
}

/* =========================================================
   JOB MANAGER PAGINATION
   ========================================================= */

nav.job-manager-pagination,
#content nav.job-manager-pagination {
  text-align: center;
  margin-top: 24px;
}

nav.job-manager-pagination ul,
#content nav.job-manager-pagination ul {
  display: inline-flex;
  gap: 6px;
  border: none !important;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

nav.job-manager-pagination ul li,
#content nav.job-manager-pagination ul li {
  border: none !important;
  float: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

nav.job-manager-pagination ul li a,
nav.job-manager-pagination ul li span,
#content nav.job-manager-pagination ul li a,
#content nav.job-manager-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 4px 10px;
  background-color: #1e2535;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

nav.job-manager-pagination ul li a:hover,
nav.job-manager-pagination ul li span.current,
#content nav.job-manager-pagination ul li a:hover,
#content nav.job-manager-pagination ul li span.current {
  background-color: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(99,102,241,0.35);
}

/* =========================================================
   JOB MANAGER NOTICES / MESSAGES
   ========================================================= */

.job-manager-message,
.job-manager-info,
.job-manager-error {
  background-color: #1e2535 !important;
  border: none !important;
  border-top: none !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  padding: 16px 20px 16px 50px !important;
  color: #e2e8f0 !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  position: relative;
  margin-bottom: 20px;
}

.job-manager-message.job-manager-message {
  background-color: rgba(16,185,129,0.08) !important;
  border-left: 3px solid #10b981 !important;
  border-radius: 0 14px 14px 0 !important;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.15) !important;
}

.job-manager-message.job-manager-info {
  background-color: rgba(99,102,241,0.08) !important;
  border-left: 3px solid #6366f1 !important;
  border-radius: 0 14px 14px 0 !important;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.15) !important;
}

.job-manager-message.job-manager-error {
  background-color: rgba(239,68,68,0.08) !important;
  border-left: 3px solid #ef4444 !important;
  border-radius: 0 14px 14px 0 !important;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.15) !important;
}

/* =========================================================
   CONTENT SINGLE JOB (WP Job Manager)
   ========================================================= */

.jm-dashboard {
  position: relative;
}

.jm-dashboard.alignwide {
  margin: 0;
  max-width: 100%;
}

/* =========================================================
   GLOBAL ADMIN BAR ADJUST
   ========================================================= */

.admin-bar .header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}

/* =========================================================
   DARK MODE UTILITY TWEAKS
   ========================================================= */

/* Invert WP admin-bar top bar */
#wpadminbar {
  filter: brightness(0.85);
}

/* Override any white backgrounds */
.ignition-box-callout,
.content-wrap,
.main-content,
.entry,
.page-wrap {
  background-color: transparent;
}

/* Images in dark context -- subtle brightness */
.entry-thumb img,
.entry-item-thumb img {
  filter: brightness(0.95);
}

/* RTL support */
.rtl .mj-card-link::before {
  left: auto;
  right: 0;
}

.rtl .mj-card-body {
  text-align: right;
}

.rtl .mj-card-sub {
  flex-direction: row-reverse;
}
