/* ============================================================
   FRAMED MINDS — Work & Contribution (WP Job Manager)
   
   Requires: fm-tokens.css (brand variables)
   
   Covers:
     1. Jobs listings & filters
     2. Job dashboard
     3. Post a job (submit form)
     4. Search bar fixes
     5. Status bar styling
     6. FM Awards tab (account settings)
   
   Last updated: March 31, 2026
   ============================================================ */

/* =========================================================
   Framed Minds — WP Job Manager (On-brand, minimal, airy)
   Targets:
   - Jobs listings + filters
   - Job Dashboard
   - Post a Job (submit form)
   ========================================================= */

/* Use BuddyBoss/theme variables when available */
:root{
  --fm-primary: var(--bb-primary-color, #7FB23E);
  --fm-primary-ink: #2C3A2F;
  --fm-surface: #ffffff;
  --fm-page: var(--bb-content-background-color, #ffffff);
  --fm-cream: #F4F1E8;
  --fm-border: rgba(20, 20, 20, .10);
  --fm-border-strong: rgba(20, 20, 20, .14);
  --fm-text: var(--bb-body-text-color, #1C1C1C);
  --fm-muted: rgba(28,28,28,.62);

  --fm-radius: 14px;
  --fm-radius-lg: 18px;

  /* very soft elevation, not “cardy” */
  --fm-shadow: 0 8px 20px rgba(0,0,0,.04);
}

/* Keep everything calm + consistent */
.job_listings,
.job-manager-form,
.job-manager-jobs{
  color: var(--fm-text);
}

/* Keep WPJM content aligned with your centered layout */
.job_listings,
.job-manager-form,
.job-manager-jobs{
  max-width: 920px;
  margin: 0 auto;
}

/* --------- Headings spacing (matches your page rhythm) --------- */
.job_listings h1,
.job-manager-form h1,
.job-manager-jobs h1{
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

/* --------- Inputs (match your existing rounded, subtle fields) --------- */
.job-manager-form input[type="text"],
.job-manager-form input[type="email"],
.job-manager-form input[type="url"],
.job-manager-form input[type="number"],
.job-manager-form input[type="date"],
.job-manager-form select,
.job-manager-form textarea,
.job_listings .search_jobs input[type="text"],
.job_listings .search_jobs input[type="search"],
.job_listings .search_jobs select,
.job-manager-jobs input[type="search"]{
  width: 100%;
  background: #fff;
  border: 1px solid var(--fm-border);
  border-radius: 999px;
  padding: 12px 14px;
  color: var(--fm-text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.job-manager-form textarea{
  border-radius: var(--fm-radius);
  min-height: 180px;
  resize: vertical;
}

.job-manager-form input:focus,
.job-manager-form select:focus,
.job-manager-form textarea:focus,
.job_listings .search_jobs input:focus,
.job_listings .search_jobs select:focus,
.job-manager-jobs input[type="search"]:focus{
  border-color: rgba(127,178,62,.55);
  box-shadow: 0 0 0 4px rgba(127,178,62,.12);
}

/* Helper text */
.job-manager-form fieldset small,
.job-manager-form fieldset .description{
  color: var(--fm-muted);
  line-height: 1.35;
}

/* --------- Primary buttons (your green, but clean) --------- */
.job-manager-form input[type="submit"],
.job_listings input[type="submit"],
.job_listings button,
.job-manager-jobs a.button,
.job-manager-jobs input[type="submit"]{
  appearance: none;
  border: 0;
  background: var(--fm-primary);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: filter .18s ease, transform .08s ease;
}

.job-manager-form input[type="submit"]:hover,
.job_listings input[type="submit"]:hover,
.job_listings button:hover,
.job-manager-jobs a.button:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* Secondary buttons (dashboard actions often use .button) */
.job-manager-jobs a.button{
  background: transparent;
  color: var(--fm-primary-ink);
  border: 1px solid var(--fm-border);
  padding: 10px 14px;
}
.job-manager-jobs a.button:hover{
  background: rgba(127,178,62,.08);
  border-color: rgba(127,178,62,.18);
  transform: none;
}

/* --------- Post a Job form layout (less “boxed”, more airy) --------- */
.job-manager-form fieldset{
  border: 1px solid var(--fm-border);
  background: var(--fm-surface);
  border-radius: var(--fm-radius-lg);
  padding: 16px 16px 8px;
  margin: 0 0 14px;
  box-shadow: none; /* key difference: remove heavy card look */
}

.job-manager-form fieldset label{
  font-weight: 600;
  color: rgba(28,28,28,.78);
  margin-bottom: 8px;
}

/* Make the WP editor feel integrated */
.job-manager-form .wp-editor-wrap{
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-border);
  overflow: hidden;
}

/* Submit row */
.job-manager-form .job-manager-form-submit{
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

/* Save Draft should feel quieter */
.job-manager-form .job-manager-form-submit input[name="save_draft"]{
  background: transparent;
  border: 1px solid var(--fm-border);
  color: var(--fm-primary-ink);
}
.job-manager-form .job-manager-form-submit input[name="save_draft"]:hover{
  background: rgba(127,178,62,.08);
}

/* --------- Jobs page filters (tighten + align to your page) --------- */
.job_listings .job_filters{
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-surface);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: none;
}

.job_listings .job_filters .search_jobs{
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

@media (max-width: 860px){
  .job_listings .job_filters .search_jobs{
    grid-template-columns: 1fr;
  }
}

/* Clean up checkbox area */
.job_listings .job_types,
.job_listings .job_types li{
  margin: 0;
  padding: 0;
  list-style: none;
}
.job_listings .job_types{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.job_listings .job_types label{
  font-size: 14px;
  color: rgba(28,28,28,.72);
}

/* --------- Job list results (simple rows, subtle separation) --------- */
.job_listings ul.job_listings{
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  background: var(--fm-surface);
}

.job_listings ul.job_listings li.job_listing{
  border-bottom: 1px solid var(--fm-border);
  margin: 0;
  box-shadow: none;
}
.job_listings ul.job_listings li.job_listing:last-child{
  border-bottom: 0;
}

.job_listings ul.job_listings li.job_listing a{
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  text-decoration: none;
}

@media (max-width: 760px){
  .job_listings ul.job_listings li.job_listing a{
    grid-template-columns: 46px 1fr;
  }
}

.job_listings ul.job_listings li.job_listing:hover{
  background: rgba(127,178,62,.06);
}

/* Logo */
.job_listings .company_logo,
.job_listings .company_logo img{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--fm-cream);
  border: 1px solid var(--fm-border);
}

/* Title */
.job_listings .position h3{
  margin: 0 0 3px;
  font-size: 16px;
  color: var(--fm-text);
}
.job_listings .position .company{
  color: var(--fm-muted);
  font-weight: 600;
  font-size: 13px;
}

/* Meta */
.job_listings .meta{
  color: var(--fm-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 760px){
  .job_listings .meta{
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--fm-border);
  }
}

/* Job type pills: calm */
.job_listings .job-type{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(127,178,62,.20);
  background: rgba(127,178,62,.10);
  color: rgba(28,28,28,.72);
}

/* --------- Job Dashboard (match your light table card) --------- */
.job-manager-jobs{
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-surface);
  padding: 12px;
  box-shadow: none;
}

.job-manager-jobs table{
  width: 100%;
  border-collapse: collapse;
}

.job-manager-jobs th{
  text-align: left;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(28,28,28,.55);
  padding: 14px 12px;
  border-bottom: 1px solid var(--fm-border);
}

.job-manager-jobs td{
  padding: 14px 12px;
  border-bottom: 1px solid var(--fm-border);
  color: rgba(28,28,28,.78);
}
.job-manager-jobs tr:last-child td{
  border-bottom: 0;
}

.job-manager-jobs .job-dashboard-actions a{
  color: var(--fm-primary-ink);
  font-weight: 600;
  text-decoration: none;
}
.job-manager-jobs .job-dashboard-actions a:hover{
  text-decoration: underline;
}

/* --------- Fix the weird "w=150,h=150,fit=crop" text near the Logo field ---------
   This is typically injected by an image/CDN helper or a field filter in your stack.
   Hide it safely without breaking functionality.
*/
.job-manager-form fieldset .field small:first-child,
.job-manager-form fieldset .field code,
.job-manager-form fieldset .field .size-hint,
.job-manager-form fieldset .field .hint{
  display: none !important;
}

/* If it's plain text directly inside the company_logo field wrapper */
.job-manager-form fieldset .field:has(input[type="file"]) > br{
  display: none;
}

/* Upload drop area refinement */
.job-manager-form input[type="file"]{
  border-radius: var(--fm-radius);
  padding: 12px;
  border: 1px dashed var(--fm-border-strong);
  background: rgba(244,241,232,.45);
}

/* =========================================================
   FIX: WPJM Jobs filter search bars (keywords/location) broken
   ========================================================= */

/* Make the filter row an actual grid */
.job_listings .job_filters .search_jobs{
  display: grid !important;
  grid-template-columns: 1fr 1fr auto !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
}

/* Remove float/forced widths coming from theme */
.job_listings .job_filters .search_jobs > div{
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure the inputs fill their columns (no tiny centered pills) */
.job_listings .job_filters .search_jobs .search_keywords input,
.job_listings .job_filters .search_jobs .search_location input,
.job_listings .job_filters .search_jobs .search_keywords select,
.job_listings .job_filters .search_jobs .search_location select{
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* Submit button area behaves like a button column */
.job_listings .job_filters .search_jobs .search_submit{
  width: auto !important;
  justify-self: end !important;
}

/* Mobile stack */
@media (max-width: 860px){
  .job_listings .job_filters .search_jobs{
    grid-template-columns: 1fr !important;
  }
  .job_listings .job_filters .search_jobs .search_submit{
    justify-self: stretch !important;
  }
  .job_listings .job_filters .search_jobs .search_submit input,
  .job_listings .job_filters .search_jobs .search_submit button{
    width: 100% !important;
  }
}

.job_listings .job_filters input[type="search"],
.job_listings .job_filters input[type="text"]{
  width: 100% !important;
  max-width: none !important;
}

/* =========================================================
   WPJM Jobs Filters — FORCE real full-width search inputs
   (Targets #search_keywords + #search_location specifically)
   ========================================================= */

/* 1) Layout: make the row behave */
.job_listings form.job_filters .search_jobs{
  display: grid !important;
  grid-template-columns: 1fr 1fr auto !important;
  gap: 14px !important;
  align-items: center !important;
  width: 100% !important;
}

/* 2) Wrappers: remove floats/odd widths from theme */
.job_listings form.job_filters .search_jobs .search_keywords,
.job_listings form.job_filters .search_jobs .search_location,
.job_listings form.job_filters .search_jobs .search_submit{
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 3) Labels: themes sometimes style labels as flex/centered */
.job_listings form.job_filters .search_jobs .search_keywords label,
.job_listings form.job_filters .search_jobs .search_location label{
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}

/* 4) The actual inputs: kill max-width + auto-centering + inline sizing */
.job_listings form.job_filters input#search_keywords,
.job_listings form.job_filters input#search_location{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;         /* kills margin:0 auto */
  box-sizing: border-box !important;
}

/* 5) If your theme applies max-width to ALL search/text inputs, override it here */
.job_listings form.job_filters input[type="search"],
.job_listings form.job_filters input[type="text"]{
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 6) Submit column */
.job_listings form.job_filters .search_submit{
  width: auto !important;
  justify-self: end !important;
}
.job_listings form.job_filters .search_submit input,
.job_listings form.job_filters .search_submit button{
  width: auto !important;
}

/* 7) Mobile stack */
@media (max-width: 860px){
  .job_listings form.job_filters .search_jobs{
    grid-template-columns: 1fr !important;
  }
  .job_listings form.job_filters .search_submit{
    justify-self: stretch !important;
  }
  .job_listings form.job_filters .search_submit input,
  .job_listings form.job_filters .search_submit button{
    width: 100% !important;
  }
}

/* =========================================================
   WPJM Jobs Filters — icon alignment + status bar (FM style)
   Targets: .search_keywords, .search_location, .showing_jobs
   ========================================================= */

/* 0) Make keyword/location wrappers a positioning context */
.job_listings form.job_filters .search_jobs .search_keywords,
.job_listings form.job_filters .search_jobs .search_location{
  position: relative !important;
}

/* 1) Kill any theme-injected icon behavior (commonly on label/input) */
.job_listings form.job_filters .search_jobs .search_keywords label:before,
.job_listings form.job_filters .search_jobs .search_location label:before,
.job_listings form.job_filters .search_jobs .search_keywords label:after,
.job_listings form.job_filters .search_jobs .search_location label:after{
  content: none !important;
  display: none !important;
}

.job_listings form.job_filters .search_jobs .search_keywords input,
.job_listings form.job_filters .search_jobs .search_location input{
  background-image: none !important; /* remove background icons */
}

/* 2) Add Framed Minds-style icons via pseudo-elements on wrapper */
.job_listings form.job_filters .search_jobs .search_keywords:before,
.job_listings form.job_filters .search_jobs .search_location:before{
  content: "" !important;
  position: absolute !important;
  left: 14px !important;
  top: 38px !important; /* aligns with input vertically when label is above */
  width: 18px !important;
  height: 18px !important;
  opacity: .55 !important;
  pointer-events: none !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
}

/* Keyword icon (magnifier) — inline SVG */
.job_listings form.job_filters .search_jobs .search_keywords:before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231c1c1c' d='M10 18a8 8 0 1 1 5.293-14.01A8 8 0 0 1 10 18Zm0-14a6 6 0 1 0 3.98 10.49A6 6 0 0 0 10 4Zm10.707 16.293-4.11-4.11 1.414-1.414 4.11 4.11-1.414 1.414Z'/%3E%3C/svg%3E");
}

/* Location icon (pin) — inline SVG */
.job_listings form.job_filters .search_jobs .search_location:before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231c1c1c' d='M12 22s7-5.686 7-12a7 7 0 1 0-14 0c0 6.314 7 12 7 12Zm0-10.2A2.8 2.8 0 1 1 12 6.2a2.8 2.8 0 0 1 0 5.6Z'/%3E%3C/svg%3E");
}

/* 3) Make room for icons inside the inputs */
.job_listings form.job_filters input#search_keywords,
.job_listings form.job_filters input#search_location{
  padding-left: 42px !important;
  height: 44px !important;
  line-height: 44px !important;
}

/* 4) Labels should sit cleanly above inputs (no weird centering) */
.job_listings form.job_filters .search_jobs .search_keywords label,
.job_listings form.job_filters .search_jobs .search_location label{
  display: block !important;
  margin: 0 0 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: rgba(28,28,28,.70) !important;
}

/* 5) If your layout changes on mobile, re-align icon vertical position */
@media (max-width: 860px){
  .job_listings form.job_filters .search_jobs .search_keywords:before,
  .job_listings form.job_filters .search_jobs .search_location:before{
    top: 38px !important;
  }
}

/* =========================================================
   WPJM "Search completed..." bar — make it calm + on-brand
   ========================================================= */

.job_listings .showing_jobs,
.job_listings .wp-job-manager-showing-all,
.job_listings .wp-job-manager-showing-filtered{
  background: rgba(127,178,62,.08) !important;
  border: 1px solid rgba(127,178,62,.18) !important;
  color: rgba(28,28,28,.72) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin: 12px 0 0 !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

/* Reset link: subtle, not loud */
.job_listings .showing_jobs a.reset{
  color: rgba(28,28,28,.70) !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}
.job_listings .showing_jobs a.reset:hover{
  color: rgba(28,28,28,.92) !important;
}

/* Sometimes WPJM shows an RSS icon/button — soften it */
.job_listings .showing_jobs a.rss_link,
.job_listings .showing_jobs a.rss_link:visited{
  opacity: .65 !important;
}

/* =========================================================
   FM Awards Tab in Account Settings
   ========================================================= */

.fm-awards-note,
.fm-awards-soft {
    font-size: 14px;
    color: #4A5560; /* matches your secondary text */
    margin-top: 6px;
}

.fm-awards-echo {
    margin-top: 24px;
    padding: 16px 20px;
    background-color: #F4F1E8; /* warm neutral */
    border-radius: 8px;
}

.fm-awards-echo p {
    margin: 0;
    font-style: italic;
    color: #151515;
}

/* FM Awards icon - default state */
.bp-settings-container li#fm-awards-nav-personal-li > a#fm-awards-nav:before{
    content: "\ef32";                 /* <-- replace with your chosen icon code */
    font-family: 'bb-icons' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    text-transform: none;
    display: inline-block;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #9b9c9f !important;        /* matches your other icons */
}


