/* ==========================================================================
   CAREERS — JOB DESCRIPTION AND APPLICATION FORM
   --------------------------------------------------------------------------
   Loaded only on the apply-*.html pages (the few job-description styles are
   small enough to live here too and are harmless elsewhere).
   Uses the same tokens as the rest of the site — change colours in theme.css.
   ========================================================================== */

/* ------------------------------------------------- JOB DESCRIPTION PAGE */
.job-facts {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
}
.job-facts h4 {
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.job-facts dl {
  display: grid; grid-template-columns: auto 1fr;
  gap: 10px 18px; margin: 0; font-size: var(--fs-sm);
}
.job-facts dt { color: var(--muted); }
.job-facts dd {
  margin: 0; text-align: right;
  font-family: var(--font-heading); font-weight: var(--fw-semibold); color: var(--heading);
}

.job-apply-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--ink), var(--ink-deep));
  border-radius: var(--radius-lg); padding: clamp(26px, 3.4vw, 40px);
}
.job-apply-band h3 { color: #fff; margin-bottom: .35em; }
.job-apply-band p { color: rgba(255, 255, 255, .78); margin: 0; }

.btn--lg { padding: 18px 38px; font-size: 1.15rem; }

.job-card-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.job-card h3 a { transition: color var(--t-fast); }
.job-card:hover h3 a { color: var(--brand); }

/* ------------------------------------------------------------- STEPPER */
.stepper {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 30px; counter-reset: st;
}
.stepper li {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; position: relative; padding-top: 6px;
}
.stepper li::before {
  content: ""; position: absolute; top: 24px; left: -50%; right: 50%;
  height: 2px; background: var(--border);
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-active::before { background: var(--brand); }
.stepper-num {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; position: relative; z-index: 1;
  background: #fff; border: 2px solid var(--border); color: var(--muted);
  font-family: var(--font-heading); font-weight: var(--fw-bold);
  transition: all var(--t);
}
.stepper li.is-active .stepper-num { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--brand-tint); }
.stepper li.is-done .stepper-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper-label {
  font-size: var(--fs-xs); color: var(--muted);
  font-family: var(--font-heading); font-weight: var(--fw-semibold);
}
.stepper li.is-active .stepper-label { color: var(--heading); }

/* --------------------------------------------------------- APPLY FORM */
.apply-form { padding: clamp(24px, 3.4vw, 44px); }
.apply-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.apply-step.is-active { display: block; animation: stepIn .4s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.apply-step-title {
  font-family: var(--font-heading); font-size: var(--fs-h3);
  font-weight: var(--fw-semibold); color: var(--heading);
  padding: 0; margin-bottom: 6px;
}
.field-help { font-size: var(--fs-xs); color: var(--muted); margin-top: -3px; }

.apply-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border);
}

/* --------------------------------------------------- PROFILE PICTURE */
.photo-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.photo-drop {
  width: 128px; height: 128px; flex: none; border-radius: 50%;
  border: 2px dashed var(--border); background: var(--bg-alt);
  display: grid; place-items: center; cursor: pointer; overflow: hidden;
  position: relative; transition: border-color var(--t), background var(--t);
}
.photo-drop:hover, .photo-drop:focus-visible, .photo-drop.is-over {
  border-color: var(--brand); background: var(--brand-tint);
}
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  display: grid; place-items: center; gap: 6px;
  color: var(--muted); text-align: center; pointer-events: none;
}
.photo-placeholder svg { width: 30px; height: 30px; }
.photo-placeholder small { font-size: var(--fs-xs); }
.photo-drop.has-image .photo-placeholder { display: none; }
.photo-row .error { display: none; margin-top: 10px; }

/* ----------------------------------------------------- DOCUMENT DROPS */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.doc-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--bg-alt); padding: 28px 22px; text-align: center;
  cursor: pointer; transition: border-color var(--t), background var(--t), transform var(--t);
}
.doc-drop:hover, .doc-drop.is-over { border-color: var(--brand); background: var(--brand-tint); transform: translateY(-3px); }
.doc-drop.has-file { border-style: solid; border-color: var(--brand); background: #fff; }
.doc-drop.has-error { border-color: var(--danger); background: #FEF3F2; }
.doc-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: var(--radius);
  display: grid; place-items: center; background: #fff; color: var(--brand);
  border: 1px solid var(--border);
}
.doc-icon svg { width: 24px; height: 24px; }
.doc-drop h4 { margin-bottom: 6px; font-size: 1rem; }
.doc-drop p { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.doc-browse { color: var(--brand); text-decoration: underline; }
.doc-file {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--brand-tint); font-size: var(--fs-xs); color: var(--heading);
}
.doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.doc-remove {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: rgba(23,23,23,.1); color: var(--ink);
  transition: background var(--t-fast);
}
.doc-remove:hover { background: var(--brand); color: #fff; }
.doc-remove svg { width: 12px; height: 12px; }
.doc-drop .error { display: none; margin-top: 10px; }
.doc-drop.has-error .error { display: block; }

/* --------------------------------------------------- CHOICE CONTROLS */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.choice {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-size: var(--fs-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.choice:hover { border-color: var(--brand-soft); background: var(--brand-tint); }
.choice input { margin: 3px 0 0; accent-color: var(--brand); flex: none; width: 17px; height: 17px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice--consent { grid-column: 1 / -1; align-items: flex-start; line-height: 1.6; }
.choice--consent a { color: var(--brand); text-decoration: underline; }

/* ---------------------------------------------------------- REVIEW */
.review { display: grid; gap: 12px; }
.review-group {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-alt); padding: 22px 24px;
}
.review-group h4 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.review-edit {
  font-size: var(--fs-xs); color: var(--brand); text-decoration: underline;
  font-family: var(--font-body); font-weight: var(--fw-normal); cursor: pointer;
}
.review dl { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 9px 18px; margin: 0; font-size: var(--fs-sm); }
.review dt { color: var(--muted); }
.review dd { margin: 0; color: var(--heading); overflow-wrap: anywhere; }
.review .empty { color: var(--muted); font-style: italic; }

/* -------------------------------------------------------- RESPONSIVE */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; }
  .stepper-label { display: none; }
  .stepper li::before { top: 24px; }
}
@media (max-width: 620px) {
  .photo-row { gap: 18px; }
  .photo-drop { width: 104px; height: 104px; }
  .review dl { grid-template-columns: 1fr; gap: 3px 0; }
  .review dt { margin-top: 8px; }
  .apply-nav { flex-direction: column-reverse; align-items: stretch; }
  .apply-nav .btn { width: 100%; }
  .job-apply-band .btn { width: 100%; }
}

/* -------------------------------------------------- POSITION FILLED ---- */
.badge--filled {
  background: #e7f4ec; color: #1b6b3a;
}
.badge--filled::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #2f9e5c; flex: none;
}
.job-card--filled { background: var(--bg-alt); border-style: dashed; }
.job-card--filled:hover { transform: none; box-shadow: none; }
.job-card--filled h3 a { color: var(--muted); }
.job-card--filled .tagline,
.job-card--filled p { color: var(--muted); }

.job-closed {
  display: flex; align-items: flex-start; gap: 22px; flex-wrap: nowrap;
  background: #fff; border: 1px solid var(--border);
  border-left: 5px solid #2f9e5c;
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.4vw, 40px);
  box-shadow: var(--shadow-sm);
}
.job-closed h3 { margin-bottom: .45em; }
.job-closed p { margin: 0 0 .8em; color: var(--muted); }
.job-closed p:last-of-type { margin-bottom: 0; }
.job-closed-mark {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e7f4ec; color: #1b6b3a;
}
.job-closed-mark svg { width: 28px; height: 28px; }

.filled-note {
  display: flex; align-items: center; gap: 10px;
  background: #e7f4ec; color: #1b6b3a;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-heading); font-weight: var(--fw-semibold);
  font-size: var(--fs-sm); line-height: 1.35;
}
.filled-note svg { width: 18px; height: 18px; flex: none; }

@media (max-width: 640px) {
  .job-closed { flex-wrap: wrap; gap: 16px; }
  .job-closed .btn { width: 100%; }
}
