/**
 * PERLUXI Resume Screener &mdash; Public Apply Layer
 * Shortcodes: [perluxi_openings] [perluxi_apply]
 * Scoped under .prsp-wrap so it never leaks into the surrounding theme.
 * Prefix: prsp- (distinct from the admin console's prs- prefix).
 */

.prsp-wrap {
  --prsp-accent:       #4f7df0;
  --prsp-accent-dark:  #3a66d6;
  --prsp-accent-light: #eef2fe;
  --prsp-ink:          #1a1d2e;
  --prsp-ink-mid:      #4b5068;
  --prsp-ink-muted:    #8b90a8;
  --prsp-surface:      #ffffff;
  --prsp-surface-2:    #f6f7fb;
  --prsp-border:       #e2e5f0;
  --prsp-border-light: #eef0f8;
  --prsp-danger:       #dc2626;
  --prsp-danger-bg:    #fee2e2;
  --prsp-success:      #16a34a;
  --prsp-success-bg:   #dcfce7;
  --prsp-radius:       8px;
  --prsp-radius-lg:    12px;
  --prsp-shadow:       0 1px 4px rgba(26,29,46,.08), 0 4px 16px rgba(26,29,46,.04);
  --prsp-shadow-lg:    0 8px 32px rgba(26,29,46,.16);

  font-family: 'Poppins', sans-serif;
  color: var(--prsp-ink);
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
}
.prsp-wrap *,
.prsp-wrap *::before,
.prsp-wrap *::after {
  box-sizing: border-box;
  font-family: inherit;
}
.prsp-wrap h1, .prsp-wrap h2, .prsp-wrap h3 { color: var(--prsp-ink); margin: 0 0 8px; font-weight: 600; }
.prsp-wrap p { margin: 0 0 10px; line-height: 1.55; }
.prsp-wrap a { color: var(--prsp-accent); }
.prsp-wrap a:hover { color: var(--prsp-accent-dark); }
.prsp-wrap button { cursor: pointer; }

/* ============================================================
   1. Buttons
   ============================================================ */
.prsp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--prsp-radius);
  border: 1px solid var(--prsp-border);
  background: var(--prsp-surface);
  color: var(--prsp-ink);
  transition: background .15s ease, border-color .15s ease, transform .05s ease, opacity .15s ease;
}
.prsp-btn:hover { background: var(--prsp-surface-2); }
.prsp-btn:active { transform: translateY(1px); }
.prsp-btn:focus-visible { outline: 2px solid var(--prsp-accent); outline-offset: 2px; }
.prsp-btn[disabled] { opacity: .55; cursor: not-allowed; }

.prsp-btn--primary {
  background: var(--prsp-accent);
  border-color: var(--prsp-accent);
  color: #fff;
}
.prsp-btn--primary:hover { background: var(--prsp-accent-dark); border-color: var(--prsp-accent-dark); }

.prsp-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--prsp-ink-mid);
}
.prsp-btn--ghost:hover { background: var(--prsp-surface-2); }

.prsp-btn--block { width: 100%; }
.prsp-btn--sm { font-size: 12px; padding: 7px 12px; }

.prsp-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--prsp-ink-muted);
  font-size: 14px;
  background: var(--prsp-surface-2);
  border-radius: var(--prsp-radius-lg);
  border: 1px dashed var(--prsp-border);
}

/* ============================================================
   3. Standalone [perluxi_apply] shortcode
   ============================================================ */
.prsp-wrap--standalone {
  background: var(--prsp-surface);
  border: 1px solid var(--prsp-border);
  border-radius: var(--prsp-radius-lg);
  box-shadow: var(--prsp-shadow);
  padding: 28px 30px;
}
.prsp-standalone-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--prsp-border-light); }
.prsp-standalone-title { font-size: 20px; }
.prsp-standalone-meta { font-size: 13px; color: var(--prsp-ink-muted); margin: 0; }

.prsp-job-picker { display: flex; flex-direction: column; gap: 8px; }
.prsp-job-picker label { font-size: 13px; font-weight: 500; color: var(--prsp-ink-mid); }

.prsp-select {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--prsp-radius);
  border: 1px solid var(--prsp-border);
  background: var(--prsp-surface);
  color: var(--prsp-ink);
  max-width: 420px;
}
.prsp-select:focus { outline: none; border-color: var(--prsp-accent); box-shadow: 0 0 0 3px var(--prsp-accent-light); }

.prsp-inline-wizard { margin-top: 20px; }
.prsp-inline-wizard:empty { margin-top: 0; }

/* ============================================================
   4. Modal
   ============================================================ */
.prsp-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 46, .55);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.prsp-modal-bg[hidden] { display: none; }
.prsp-modal-bg--open {
  opacity: 1;
  pointer-events: auto;
}

.prsp-modal {
  background: var(--prsp-surface);
  border-radius: var(--prsp-radius-lg);
  box-shadow: var(--prsp-shadow-lg);
  width: 100%;
  max-width: 640px;
  padding: 32px 32px 28px;
  position: relative;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  animation: prspModalIn .18s ease;
}
@keyframes prspModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.prsp-modal .prsp-modal__close,
.prsp-modal__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--prsp-surface-2) !important;
  color: var(--prsp-ink-mid) !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.prsp-modal .prsp-modal__close:hover,
.prsp-modal__close:hover {
  background: var(--prsp-border-light) !important;
  color: var(--prsp-ink) !important;
}

.prsp-modal__title { font-size: 20px; margin-bottom: 6px; padding-right: 30px; }
.prsp-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.prsp-modal__meta .prsp-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--prsp-pill-bg, #eef2fe);
  color: var(--prsp-accent, #4f7df0);
  white-space: nowrap;
}
.prsp-modal__meta .prsp-pill--salary {
  background: var(--prsp-accent, #4f7df0);
  color: #fff;
}
.prsp-modal__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--prsp-ink-mid);
  margin-bottom: 22px;
  max-height: 40vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.prsp-modal__desc p { margin: 0 0 12px; }
.prsp-modal__desc p:last-child { margin-bottom: 0; }
.prsp-modal__desc ul,
.prsp-modal__desc ol { margin: 0 0 12px; padding-left: 22px; list-style-position: outside; }
.prsp-modal__desc ul, .prsp-modal__desc ul li { list-style-type: disc; }
.prsp-modal__desc ol, .prsp-modal__desc ol li { list-style-type: decimal; }
.prsp-modal__desc li { margin-bottom: 4px; }
.prsp-modal__desc strong,
.prsp-modal__desc b { font-weight: 700; color: var(--prsp-ink); }
.prsp-modal__foot {
  padding-top: 16px;
  border-top: 1px solid var(--prsp-border-light);
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   4b. Open-count pill  [perluxi_openings_count]
   ============================================================ */
/* Matches the Elementor Icon Box "Open Position" pill exactly. */
.prsp-count-pill {
  display: inline-block;
  padding: 8.8px 16px;
  border-radius: 30px;
  background: rgba(29, 78, 216, .122);
  color: #60A5FA;
  border: 1px solid rgba(29, 78, 216, .251);
  box-shadow: none;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
}
.prsp-count-pill__dot {
  display: none;
}

/* ============================================================
   5. Wizard
   ============================================================ */
.prsp-wizard__progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding-right: 52px;
}
.prsp-wizard__step-dot {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--prsp-border);
  transition: background .2s ease;
}
.prsp-wizard__step-dot--active,
.prsp-wizard__step-dot--done {
  background: var(--prsp-accent);
}
.prsp-wizard__step-label {
  font-size: 12px;
  color: var(--prsp-ink-muted);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}

.prsp-wizard__title { font-size: 18px; margin-bottom: 4px; }
.prsp-wizard__subtitle { font-size: 13px; color: var(--prsp-ink-muted); margin-bottom: 22px; }

.prsp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.prsp-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--prsp-ink-mid);
}
.prsp-field .prsp-optional {
  font-weight: 400;
  color: var(--prsp-ink-muted);
}
.prsp-field input[type="text"],
.prsp-field input[type="email"],
.prsp-field input[type="tel"],
.prsp-field input[type="url"],
.prsp-field select,
.prsp-field textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--prsp-radius);
  border: 1px solid var(--prsp-border);
  background: var(--prsp-surface);
  color: var(--prsp-ink);
  width: 100%;
}
.prsp-field textarea { resize: vertical; min-height: 90px; }
.prsp-field input:focus,
.prsp-field select:focus,
.prsp-field textarea:focus {
  outline: none;
  border-color: var(--prsp-accent);
  box-shadow: 0 0 0 3px var(--prsp-accent-light);
}
.prsp-field .prsp-help {
  font-size: 12px;
  color: var(--prsp-ink-muted);
}
.prsp-field .prsp-error {
  font-size: 12px;
  color: var(--prsp-danger);
  display: none;
}
.prsp-field--invalid input,
.prsp-field--invalid select,
.prsp-field--invalid textarea {
  border-color: var(--prsp-danger);
}
.prsp-field--invalid .prsp-error { display: block; }

.prsp-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) {
  .prsp-field-row { grid-template-columns: 1fr; }
}

/* Yes/No pills */
.prsp-yesno { display: flex; gap: 10px; }
.prsp-yesno label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--prsp-border);
  border-radius: var(--prsp-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--prsp-ink-mid);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.prsp-yesno input { position: absolute; opacity: 0; pointer-events: none; }
.prsp-yesno label:has(input:checked) {
  border-color: var(--prsp-accent);
  background: var(--prsp-accent-light);
  color: var(--prsp-accent-dark);
}

/* Checkbox / multiselect list */
.prsp-check-list { display: flex; flex-direction: column; gap: 8px; }
.prsp-check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--prsp-ink-mid);
  font-weight: 400;
  cursor: pointer;
}
.prsp-check-list input { width: auto; }

/* ============================================================
   6. File drop zone
   ============================================================ */
.prsp-dropzone {
  border: 2px dashed var(--prsp-border);
  border-radius: var(--prsp-radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: var(--prsp-surface-2);
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}
.prsp-dropzone:hover,
.prsp-dropzone--drag {
  border-color: var(--prsp-accent);
  background: var(--prsp-accent-light);
}
.prsp-dropzone__icon { font-size: 22px; margin-bottom: 8px; color: var(--prsp-ink-muted); }
.prsp-dropzone__text { font-size: 13px; color: var(--prsp-ink-mid); }
.prsp-dropzone__browse { color: var(--prsp-accent); font-weight: 500; text-decoration: underline; }
.prsp-dropzone__hint { font-size: 11px; color: var(--prsp-ink-muted); margin-top: 6px; }
.prsp-dropzone input[type="file"] { display: none; }

.prsp-file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--prsp-border);
  border-radius: var(--prsp-radius);
  background: var(--prsp-surface);
  font-size: 13px;
  margin-top: 10px;
}
.prsp-file-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prsp-file-chip__remove {
  border: none;
  background: transparent;
  color: var(--prsp-danger);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

/* ============================================================
   7. Review step
   ============================================================ */
.prsp-review-group {
  border: 1px solid var(--prsp-border-light);
  border-radius: var(--prsp-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.prsp-review-group__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--prsp-ink-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.prsp-review-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; }
.prsp-review-row dt { color: var(--prsp-ink-muted); flex-shrink: 0; }
.prsp-review-row dd { margin: 0; text-align: right; color: var(--prsp-ink); word-break: break-word; }

/* EEO voluntary note */
.prsp-eeo-note {
  background: var(--prsp-surface-2);
  border: 1px solid var(--prsp-border-light);
  border-radius: var(--prsp-radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--prsp-ink-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ============================================================
   8. Wizard nav & success state
   ============================================================ */
.prsp-wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--prsp-border-light);
}
.prsp-wizard__nav-spacer { flex: 1; }

.prsp-form-error {
  background: var(--prsp-danger-bg);
  color: var(--prsp-danger);
  border-radius: var(--prsp-radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.prsp-success {
  text-align: center;
  padding: 20px 10px 6px;
}
.prsp-success__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--prsp-success-bg);
  color: var(--prsp-success);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.prsp-success__title { font-size: 18px; margin-bottom: 8px; }
.prsp-success__body { font-size: 13px; color: var(--prsp-ink-mid); margin-bottom: 20px; }

/* ============================================================
   9. Responsive
   ============================================================ */
@media (max-width: 640px) {
  .prsp-modal { padding: 24px 18px 22px; max-height: calc(100vh - 40px); }
  .prsp-modal-bg { padding: 20px 10px; }
  .prsp-wrap--standalone { padding: 20px 18px; }
}


/* ============================================================
   2. Job listing cards (WP Job Manager parity, v1.4.0)
   Cards now emit ul.job_listings > li.job_listing markup so the
   site's WP Job Manager frontend.css styles them identically to
   the [jobs] shortcode. The rules below are a self-contained
   FALLBACK that reproduces the WPJM look when WPJM's CSS is not
   present, plus small enhancements (pointer cursor, focus ring).
   They are intentionally low-specificity so WPJM's own rules win
   when both are loaded.
   ============================================================ */

/* Make the whole card obviously clickable + keyboard accessible. */
.prsp-openings li.job_listing .prsp-card-link { cursor: pointer; }
.prsp-openings li.job_listing .prsp-card-link:focus-visible {
	outline: 2px solid #4f7df0;
	outline-offset: -2px;
}

/* ---- Fallback layout (mirrors WPJM frontend.css) ---- */
/* Only applies when WPJM CSS is absent; when present, WPJM's more
   specific ul.job_listings selectors take precedence for shared props. */
ul.job_listings.prsp-openings {
	border-top: 1px solid #eee;
	margin: 0;
	padding: 0;
	list-style: none;
}
ul.job_listings.prsp-openings li.job_listing {
	border-bottom: 1px solid #eee;
	list-style: none outside;
	margin: 0;
	padding: 0;
}
ul.job_listings.prsp-openings li.job_listing .prsp-card-link {
	display: block;
	line-height: 1.5em;
	overflow: hidden;
	padding: 1em;
	position: relative;
	text-decoration: none;
	color: inherit;
}
ul.job_listings.prsp-openings li.job_listing .prsp-card-link:hover,
ul.job_listings.prsp-openings li.job_listing .prsp-card-link:focus {
	background-color: #fcfcfc;
}
ul.job_listings.prsp-openings li.job_listing .position {
	float: left;
	padding: 0;
	width: 60%;
	line-height: 1.5em;
	box-sizing: border-box;
}
ul.job_listings.prsp-openings li.job_listing .position h3 {
	font-size: inherit;
	line-height: inherit;
	margin: 0;
	padding: 0;
}
ul.job_listings.prsp-openings li.job_listing .location {
	float: right;
	width: 40%;
	font-size: .75em;
	line-height: 2em;
	padding: 0 0 0 1em;
	text-align: right;
	color: #999;
	box-sizing: border-box;
}
ul.job_listings.prsp-openings li.job_listing ul.meta {
	float: right;
	width: 40%;
	font-size: .75em;
	line-height: 2em;
	margin: 0;
	padding: 0;
	text-align: right;
	list-style: none outside;
	color: #999;
	box-sizing: border-box;
}
ul.job_listings.prsp-openings li.job_listing ul.meta li {
	display: block;
	list-style: none outside;
	margin: 0;
	font-size: 1em;
}
ul.job_listings.prsp-openings li.job_listing ul.meta .job-type { font-weight: 700; }

/* WPJM job-type accent colors (fallback parity) */
.prsp-openings .job-type.full-time { color: #90da36; }
.prsp-openings .job-type.part-time { color: #f08d3c; }
.prsp-openings .job-type.contract  { color: #39c; }
.prsp-openings .job-type.temporary { color: #d93674; }
.prsp-openings .job-type.internship { color: #6033cc; }
.prsp-openings .job-type.remote     { color: #39c; }

/* Clearfix for floated card internals. */
ul.job_listings.prsp-openings li.job_listing .prsp-card-link::after {
	content: "";
	display: block;
	clear: both;
}

/* Empty state keeps the plugin's own styling. */
.prsp-empty { clear: both; }

ul.job_listings.prsp-openings li.job_listing ul.meta .salary {
	color: var(--prsp-ink-muted);
	font-weight: 500;
	margin-top: 2px;
}
