/*
 * AHEAD Staffing job board — frontend styles.
 *
 * Two WPCodeBox snippets folded in here: the job-description styles (snippet 2, "Ajb job description
 * v4") and the new registration form. Keeping them in the plugin means they ship and version with the
 * markup they style, instead of living in an admin screen where they can be toggled off silently.
 *
 * Brand values are AHEAD's, taken from the existing build: #1a56db primary, #1F2937 ink.
 */

:root {
  --ajb-primary: #1a56db;
  --ajb-primary-dark: #1348b8;
  --ajb-ink: #1F2937;
  --ajb-body: #374151;
  --ajb-muted: #6B7280;
  --ajb-line: #E5E7EB;
  --ajb-bg-soft: #F8FAFC;
  --ajb-ok: #047857;
  --ajb-ok-bg: #ECFDF5;
  --ajb-err: #B91C1C;
  --ajb-err-bg: #FEF2F2;
}

/* ---------------------------------------------------------------- job description */

.ajb-job-description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ajb-body);
}
.ajb-job-description h3.ajb-section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--ajb-ink);
  margin: 32px 0 12px;
}
.ajb-job-description h3.ajb-section-heading:first-child { margin-top: 0; }
.ajb-job-description ul { padding-left: 24px; margin: 0 0 16px; }
.ajb-job-description li { margin-bottom: 8px; }
.ajb-job-description p  { margin: 0 0 16px; }
.ajb-job-description a  { color: var(--ajb-primary); text-decoration: underline; }
.ajb-job-description a:hover { color: var(--ajb-primary-dark); }
/* Fallback for descriptions whose labels did not match the heading patterns. */
.ajb-job-description strong,
.ajb-job-description b { font-weight: 700; color: var(--ajb-ink); }

/* ---------------------------------------------------------------- registration form */

.ajb-apply {
  border: 1px solid var(--ajb-line);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
}
.ajb-apply__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ajb-ink);
  margin: 0 0 6px;
}
.ajb-apply__intro {
  font-size: 14px;
  color: var(--ajb-muted);
  margin: 0 0 20px;
  line-height: 1.6;
}
.ajb-apply__row { display: flex; gap: 14px; flex-wrap: wrap; }
.ajb-apply__row > .ajb-apply__field { flex: 1 1 190px; }
.ajb-apply__field { margin-bottom: 16px; }
.ajb-apply__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ajb-ink);
  margin-bottom: 6px;
}
.ajb-apply__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  font-size: 15px;
  color: var(--ajb-ink);
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ajb-apply__field input:focus {
  outline: none;
  border-color: var(--ajb-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .14);
}
.ajb-apply__field input[aria-invalid="true"] { border-color: var(--ajb-err); }
.ajb-apply__field--ssn input { max-width: 140px; letter-spacing: .18em; }
.ajb-apply__help {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ajb-muted);
  margin: 7px 0 0;
}

.ajb-apply__submit {
  display: inline-block;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--ajb-primary);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.ajb-apply__submit:hover { background: var(--ajb-primary-dark); }
.ajb-apply__submit[disabled] { opacity: .6; cursor: progress; }

.ajb-apply__legal {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ajb-muted);
  margin: 14px 0 0;
}

/* The honeypot must be unreachable for people but present for bots: not display:none, which some
   bots skip, and never removed from the accessibility tree by accident. */
.ajb-apply__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- notices */

.ajb-form-notice {
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.ajb-form-notice--ok    { background: var(--ajb-ok-bg);  color: var(--ajb-ok);  border: 1px solid #A7F3D0; }
.ajb-form-notice--error { background: var(--ajb-err-bg); color: var(--ajb-err); border: 1px solid #FECACA; }

@media (max-width: 540px) {
  .ajb-apply { padding: 20px 16px; }
  .ajb-apply__row { gap: 0; }
  .ajb-apply__row > .ajb-apply__field { flex-basis: 100%; }
}
