/* =========================================================
   Zorvia careers module – sits on top of the site theme
   (vendors.min.css / style.min.css). Fonts are inherited from
   the theme; only careers-specific pieces are styled here.
   ========================================================= */
:root {
  --zc-brand: #4f3184;          /* button colour used on zorvia.com */
  --zc-brand-dark: #3b2366;
  --zc-brand-tint: #4c318630;   /* form section background on zorvia.com */
  --zc-ink: #2e3844;            /* mobile nav colour on zorvia.com */
  --zc-muted: #6c757d;
  --zc-line: #e4e4e4;
  --zc-danger: #c0392b;
  --zc-ok: #198754;
}

#openings, #apply { scroll-margin-top: 20px; }
.zc-req { color: var(--zc-danger); }
.zc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons (match the site's purple submit button) ---------- */
.zc-btn, .zc-btn:focus { background: var(--zc-brand) !important; color: #fff !important; border: 2px solid var(--zc-brand) !important; }
.zc-btn:hover { background: var(--zc-brand-dark) !important; border-color: var(--zc-brand-dark) !important; color: #fff !important; }
.zc-btn:disabled { opacity: .65; cursor: progress; }
.zc-btn-outline { background: #fff !important; color: var(--zc-brand) !important; border: 2px solid var(--zc-brand) !important; }
.zc-btn-outline:hover { background: var(--zc-brand) !important; color: #fff !important; }
.zc-openings :focus-visible, .zc-apply :focus-visible { outline: 3px solid color-mix(in srgb, var(--zc-brand) 45%, transparent); outline-offset: 2px; }

/* ---------- Department index ---------- */
.zc-dept-index { position: sticky; top: 24px; border: 1px solid var(--zc-line); border-radius: 6px; background: #fff; padding: 26px 28px 14px; }
.zc-dept-index__title { display: block; font-size: 20px; margin-bottom: 10px; }
.zc-dept-index ul { list-style: none; margin: 0; padding: 0; }
.zc-dept-index li + li { border-top: 1px solid var(--zc-line); }
.zc-dept-index a { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; color: var(--zc-ink); font-weight: 500; text-decoration: none; }
.zc-dept-index a::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted #b5b5b5; transform: translateY(-4px); }
.zc-dept-index b, .zc-dept-index em { order: 2; white-space: nowrap; font-size: 14px; }
.zc-dept-index b { color: var(--zc-brand); font-weight: 700; min-width: 22px; text-align: right; }
.zc-dept-index em { font-style: normal; color: var(--zc-muted); }
.zc-dept-index a:hover span, .zc-dept-index a.is-active span { color: var(--zc-brand); }
.zc-dept-index a.is-active span { font-weight: 700; }

/* ---------- Job list ---------- */
.zc-dept-group { margin-bottom: 36px; }
.zc-dept-group__head { padding-bottom: 10px; border-bottom: 2px solid var(--zc-ink); }
.zc-dept-group__head p { font-size: 15px; color: var(--zc-muted); line-height: 1.5; }
.zc-job { border-bottom: 1px solid var(--zc-line); }
.zc-job__toggle { width: 100%; display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 18px; padding: 20px 4px; background: none; border: 0; text-align: left; color: var(--zc-ink); cursor: pointer; font: inherit; }
.zc-job__title { font-size: 19px; line-height: 1.3; color: var(--zc-ink); }
.zc-job__toggle:hover .zc-job__title { color: var(--zc-brand); }
.zc-job__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.zc-job__meta span { font-size: 13px; line-height: 1.4; color: var(--zc-ink); background: color-mix(in srgb, var(--zc-brand) 8%, #fff); border-radius: 50px; padding: 5px 12px; white-space: nowrap; }
.zc-job__chev { width: 11px; height: 11px; border-right: 2px solid var(--zc-brand); border-bottom: 2px solid var(--zc-brand); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; justify-self: center; }
.zc-job.is-open .zc-job__chev { transform: rotate(-135deg); }
.zc-job__body { padding: 0 4px 28px; }
.zc-job__summary { margin-bottom: 18px; }
.zc-job__body ul { padding-left: 20px; margin: 0; }
.zc-job__body li { margin-bottom: 4px; line-height: 1.6; }
.zc-job__facts { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 8px 0 24px; padding: 16px 0; border-top: 1px dashed var(--zc-line); border-bottom: 1px dashed var(--zc-line); }
.zc-job__facts dt { font-size: 13px; font-weight: 400; color: var(--zc-muted); }
.zc-job__facts dd { margin: 0; font-weight: 600; color: var(--zc-ink); }
.zc-empty { color: var(--zc-muted); }
.zc-empty--box { background: var(--zc-brand-tint); border-radius: 6px; padding: 40px; }
.zc-empty--box p { margin-bottom: 20px; }

/* ---------- Application form ---------- */
.zc-apply__title { border-bottom: 1px dashed #6c757d; padding-bottom: 20px; letter-spacing: 0 !important; font-size: 31px; display: inline-block; padding-left: 20px; padding-right: 20px; }
.zc-steps { list-style: none; counter-reset: zc; margin: 0; padding: 0; position: sticky; top: 24px; }
.zc-steps li { counter-increment: zc; display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--zc-muted); font-weight: 600; }
.zc-steps li::before { content: counter(zc); display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #c9bfdc; background: #fff; font-size: 14px; color: var(--zc-muted); }
.zc-steps li.is-active { color: var(--zc-ink); }
.zc-steps li.is-active::before { background: var(--zc-brand); border-color: var(--zc-brand); color: #fff; }
.zc-steps li.is-done::before { content: "✓"; border-color: var(--zc-brand); color: var(--zc-brand); }

.zc-form, .zc-done { background: #fff; border-radius: 6px; padding: 40px; box-shadow: 0 10px 30px rgba(46, 56, 68, .08); }
.zc-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.zc-step legend { font-size: 24px; margin-bottom: 22px; float: none; width: auto; padding: 0; }
.zc-step legend:focus { outline: none; }
.zc-step .form-label { font-size: 15px; }
.zc-form .form-control, .zc-form .form-select { margin-top: 2px; }
.zc-form .form-control.is-invalid, .zc-form .form-select.is-invalid { border-color: var(--zc-danger) !important; }
.zc-form input[readonly] { background: #f5f5f5; }
.zc-hint { font-size: 15px; color: var(--zc-muted); margin: 4px 0 12px; }

.zc-row-card { position: relative; border: 1px solid var(--zc-line); border-left: 3px solid var(--zc-brand); border-radius: 6px; padding: 22px 22px 6px; margin-bottom: 14px; background: #fcfbfe; }
.zc-row-card__remove { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 13px; font-weight: 600; color: var(--zc-danger); cursor: pointer; }
.zc-add { background: none; border: 0; padding: 4px 0; color: var(--zc-brand); font-weight: 700; cursor: pointer; }
.zc-add:hover { text-decoration: underline; }

.zc-seg { display: inline-flex; border: 1px solid #c9bfdc; border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.zc-seg label { display: flex; align-items: center; gap: 8px; padding: 10px 18px; margin: 0; cursor: pointer; font-weight: 500; color: var(--zc-ink); }
.zc-seg label + label { border-left: 1px solid #c9bfdc; }
.zc-seg label.is-checked { background: color-mix(in srgb, var(--zc-brand) 10%, #fff); color: var(--zc-brand-dark); font-weight: 600; }
.zc-seg input, .zc-check input { accent-color: var(--zc-brand); }

.zc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; }
.zc-check input { width: 18px; height: 18px; margin-top: 3px; flex: none; }

.zc-upload__box { position: relative; display: block; border: 2px dashed #b9add0; border-radius: 6px; padding: 26px; text-align: center; background: #fcfbfe; cursor: pointer; transition: border-color .15s, background-color .15s; }
.zc-upload__box input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.zc-upload__box.is-drag { border-color: var(--zc-brand); background: color-mix(in srgb, var(--zc-brand) 6%, #fff); }
.zc-upload__box.has-file { border-style: solid; border-color: var(--zc-brand); }
.zc-upload__box:focus-within { outline: 3px solid color-mix(in srgb, var(--zc-brand) 35%, transparent); }
.zc-upload__label, .zc-upload__hint, .zc-upload__name { display: block; }
.zc-upload__label strong { color: var(--zc-brand); }
.zc-upload__hint { font-size: 13px; color: var(--zc-muted); }
.zc-upload__name { margin-top: 6px; font-weight: 700; color: var(--zc-brand); }

.zc-error { background: #fdecea; color: var(--zc-danger); border-radius: 6px; padding: 12px 16px; font-weight: 600; margin: 12px 0 0; }
.zc-nav { display: flex; align-items: center; gap: 12px; padding-top: 24px; margin-top: 24px; border-top: 1px dashed #c9c9c9; }
.zc-nav__count { margin-left: auto; margin-right: 6px; color: var(--zc-muted); font-size: 14px; }
.zc-nav .btn { margin: 0 !important; }
.zc-done { border-left: 4px solid var(--zc-brand); }
.zc-done:focus { outline: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .zc-dept-index, .zc-steps { position: static; }
  .zc-steps { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; }
}
@media (max-width: 767px) {
  .zc-form, .zc-done { padding: 26px 18px; }
  .zc-job__toggle { grid-template-columns: 1fr 20px; }
  .zc-job__meta { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .zc-job__chev { grid-row: 1 / span 2; grid-column: 2; }
  .zc-seg { display: flex; flex-direction: column; }
  .zc-seg label + label { border-left: 0; border-top: 1px solid #c9bfdc; }
  .zc-steps li { font-size: 0; padding: 4px 0; gap: 0; }
  .zc-steps li.is-active { font-size: 14px; gap: 8px; }
  .zc-nav { flex-wrap: wrap; }
  .zc-nav__count { order: -1; width: 100%; margin: 0 0 4px; }
  .zc-apply__title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .zc-job__chev, .zc-upload__box { transition: none; } }
