/* =====================================================================
   Medi Response Careers Portal - public stylesheet
   ===================================================================== */

:root {
  --blue:       #20409A;
  --blue-dark:  #17307a;
  --blue-tint:  #eef2fc;
  --red:        #ED1C24;
  --red-dark:   #c8151c;
  --ink:        #1d2433;
  --muted:      #67718a;
  --line:       #e2e6ef;
  --bg:         #f2f4f8;
  --white:      #ffffff;
  --green:      #0f8a4d;
  --amber:      #b26a00;

  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --shadow-lg:  0 12px 32px rgba(16,24,40,.12);
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 780px; }
.wrap--form   { max-width: 900px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Honeypot - hidden from people, visible to naive bots. */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Conditional blocks use the hidden attribute; it must beat our grid rules. */
[hidden] { display: none !important; }

/* --- Skip link ------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--blue); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Header ---------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }

/* The supplied artwork already contains the company name and the tagline, so
   the header shows the lockup itself rather than repeating either as text. */
.brand__logo { height: 42px; width: auto; flex: none; }
.brand__divider { width: 1px; height: 30px; background: var(--line); flex: none; }
.brand__context {
  font-size: .95rem; font-weight: 600; color: var(--muted);
  letter-spacing: .01em; white-space: nowrap;
}

@media (max-width: 560px) {
  .brand__logo { height: 34px; }
  .brand__divider, .brand__context { display: none; }
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 14px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-size: .93rem; font-weight: 500;
}
.site-nav a:hover { background: var(--blue-tint); color: var(--blue); }
.site-nav a.is-active { background: var(--blue-tint); color: var(--blue); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 11px; cursor: pointer; line-height: 1;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 20px 14px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 10px; border-radius: var(--radius-sm); }
  .site-header__bar { position: relative; }
}

/* --- Hero ------------------------------------------------------------ */
.hero {
  background: linear-gradient(140deg, var(--blue) 0%, #16296b 100%);
  color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(237,28,36,.14);
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p  { color: #d3dcf5; font-size: 1.07rem; margin-bottom: 1.6em; }
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; position: relative; z-index: 1; }
.hero-stat__num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hero-stat__label { font-size: .82rem; color: #b9c6ec; margin-top: 5px; }

/* --- Page head (interior pages) -------------------------------------- */
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 34px 0 30px; }
.page-head h1 { margin-bottom: .25em; }
.page-head p  { color: var(--muted); margin: 0; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 7px; opacity: .55; }

/* --- Main ------------------------------------------------------------ */
.main { padding: 40px 0 72px; }
.section { margin-bottom: 44px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__count { color: var(--muted); font-size: .9rem; }

/* --- Cards ----------------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card__body { padding: 24px; }
.card__head {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; font-size: 1.08rem; }

/* --- Job list -------------------------------------------------------- */
.job-list { display: grid; gap: 16px; }

.job-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  position: relative; display: block; text-decoration: none; color: inherit;
}
.job-card:hover { border-color: #c3cee9; box-shadow: var(--shadow-lg); transform: translateY(-2px); color: inherit; }
.job-card--featured { border-left: 4px solid var(--red); }

.job-card__top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.job-card__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; color: var(--blue); }
.job-card:hover .job-card__title { color: var(--blue-dark); }
.job-card__ref { font-size: .78rem; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.job-card__summary { color: var(--muted); font-size: .93rem; margin: 10px 0 14px; }

.job-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--muted); }
.job-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.job-meta__item svg { width: 15px; height: 15px; flex: none; opacity: .65; }

.job-card__foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.job-card__cta { font-weight: 600; font-size: .9rem; color: var(--red); }

/* --- Badges / pills -------------------------------------------------- */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--blue-tint); color: var(--blue); white-space: nowrap;
}
.badge--featured { background: #fdeaea; color: var(--red-dark); }
.badge--closing  { background: #fff4e0; color: var(--amber); }
.badge--open     { background: #e6f6ed; color: var(--green); }
.badge--closed   { background: #f0f1f5; color: var(--muted); }

/* --- Filters --------------------------------------------------------- */
.filters {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.filters__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.filters .field { margin: 0; }
@media (max-width: 900px) { .filters__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .filters__grid { grid-template-columns: 1fr; } }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: .84rem; text-decoration: none; color: var(--ink);
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip__x { font-weight: 700; opacity: .55; }

/* --- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 8px 16px; font-size: .87rem; }
.btn--lg { padding: 15px 32px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* --- Alerts ---------------------------------------------------------- */
.alert {
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 22px;
  border: 1px solid; font-size: .94rem;
}
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert__title { font-weight: 700; margin-bottom: .4em; }
.alert ul { margin-bottom: 0; padding-left: 1.2em; }
.alert--error   { background: #fdecec; border-color: #f6c9c9; color: #8c1a1f; }
.alert--success { background: #e8f6ee; border-color: #bfe3ce; color: #10603a; }
.alert--info    { background: var(--blue-tint); border-color: #cbd7f4; color: #1b3475; }
.alert--warning { background: #fff5e3; border-color: #f2d9a8; color: #7d4c00; }

/* --- Forms ----------------------------------------------------------- */
.form-section {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.form-section__head { padding: 18px 24px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.form-section__head h2 { margin: 0 0 3px; font-size: 1.05rem; }
.form-section__head p  { margin: 0; font-size: .87rem; color: var(--muted); }
.form-section__step {
  display: inline-block; width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: .78rem; font-weight: 700;
  text-align: center; line-height: 24px; margin-right: 9px; vertical-align: 2px;
}
.form-section__body { padding: 22px 24px 8px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field { margin-bottom: 18px; min-width: 0; }
.field--full  { grid-column: 1 / -1; }
.field--half  { grid-column: span 1; }
.field--third { grid-column: span 1; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .field--half, .field--third { grid-column: 1 / -1; }
}

.field__label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field__help  { font-size: .82rem; color: var(--muted); margin: 0 0 7px; }
.field__help--indent { margin-left: 28px; }
.field__error { font-size: .83rem; color: var(--red-dark); margin: 6px 0 0; font-weight: 500; }
.req { color: var(--red); }

.input {
  width: 100%; padding: 11px 13px; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--white); border: 1px solid #cfd5e2; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32,64,154,.13);
}
.input:disabled, .input[readonly] { background: #f6f7fa; color: var(--muted); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.55; }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2367718a'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px;
  padding-right: 34px;
}
.input--file { padding: 9px 12px; background: #fafbfd; font-size: .9rem; }
.input--file::file-selector-button {
  font-family: inherit; font-size: .86rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  padding: 7px 13px; border-radius: var(--radius-sm); margin-right: 12px; cursor: pointer;
}
.input--file::file-selector-button:hover { border-color: var(--blue); color: var(--blue); }

.field--invalid .input { border-color: #e08b8b; background: #fffafa; }
.field--invalid .input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,28,36,.12); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; line-height: 1.5; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--blue); cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; }

.radio-row { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 2px; }
.radio { display: inline-flex; align-items: center; gap: 8px; font-size: .93rem; cursor: pointer; }
.radio input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }

.form-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 20px 0 8px;
}
.form-note { font-size: .85rem; color: var(--muted); }

/* --- Job detail ------------------------------------------------------ */
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .job-layout { grid-template-columns: 1fr; } }

.job-body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); }
.job-body h2 { font-size: 1.15rem; margin-top: 1.8em; padding-top: .2em; }
.job-body h2:first-child { margin-top: 0; }
.job-body ul { padding-left: 1.25em; }
.job-body li::marker { color: var(--red); }

.job-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
@media (max-width: 900px) { .job-aside { position: static; } }

.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9rem; margin: 0; }
.fact-list li:last-child { border-bottom: 0; }
.fact-list__label { color: var(--muted); flex: none; }
.fact-list__value { font-weight: 600; text-align: right; }

.doc-checklist { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.doc-checklist li { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; margin: 0; }
.doc-checklist li::before { content: "\2713"; color: var(--green); font-weight: 700; flex: none; }

/* --- Empty state ----------------------------------------------------- */
.empty {
  background: var(--white); border: 1px dashed #ccd3e3; border-radius: var(--radius);
  padding: 52px 28px; text-align: center;
}
.empty__icon { font-size: 2.4rem; margin-bottom: 10px; opacity: .5; }
.empty h3 { margin-bottom: .35em; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 1.3em; }

/* --- Confirmation ---------------------------------------------------- */
.confirm { text-align: center; padding: 20px 0 10px; }
.confirm__tick {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 22px;
  background: #e8f6ee; color: var(--green); display: grid; place-items: center; font-size: 2.2rem;
}
.reference-box {
  background: var(--blue-tint); border: 1px dashed #b9c8ee; border-radius: var(--radius);
  padding: 20px; margin: 26px auto; max-width: 420px;
}
.reference-box__label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.reference-box__value {
  font-size: 1.7rem; font-weight: 800; letter-spacing: .09em; color: var(--blue);
  font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: 5px;
}

/* --- Steps / progress ------------------------------------------------ */
.steps { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.steps li {
  display: flex; align-items: center; gap: 9px; font-size: .87rem; color: var(--muted);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; margin: 0;
}
.steps li b { color: var(--ink); }

/* --- Prose (privacy page) -------------------------------------------- */
.prose { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow); }
.prose h2 { margin-top: 1.7em; font-size: 1.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; font-size: 1.02rem; }
@media (max-width: 600px) { .prose { padding: 24px 20px; } }

/* --- Footer ---------------------------------------------------------- */
.site-footer { background: #131a2b; color: #97a1ba; padding: 48px 0 28px; font-size: .9rem; margin-top: auto; }
.site-footer a { color: #c6cee2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-bottom {
  border-top: 1px solid #232c42; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .84rem;
}
.footer-brand__logo { height: 38px; width: auto; margin-bottom: 16px; }

body { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1 0 auto; }

/* --- Print ----------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .job-aside, .btn, .filters { display: none !important; }
  body { background: #fff; }
  .job-body { border: 0; box-shadow: none; padding: 0; }
}

/* --- Pre-interview form (added 2026-09-10) ---------------------------
   Two blocks the rest of the portal has no equivalent for: the verbatim
   legal consent text, and the drawn signature pad.                     */
.consent-block {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--muted);
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 4px 0 16px;
}
.consent-block p      { margin: 0 0 10px; }
.consent-block p:last-child { margin-bottom: 0; }
.consent-block strong { color: var(--ink); }
.consent-block ul     { margin: 8px 0 10px; padding-left: 20px; }
.consent-block li     { margin-bottom: 4px; }

.signature-pad {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.signature-pad canvas {
  width: 100%;
  height: 150px;
  display: block;
  /* Without this the browser scrolls the page instead of drawing on a phone. */
  touch-action: none;
  cursor: crosshair;
}
.signature-pad__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}

/* Document rows. These already exist in admin.css; the interviewer's outcome
   page is a public page and only loads site.css, so the same rules live here
   too. Admin pages load admin.css afterwards, so nothing changes there. */
.doc-row {
  display: flex; align-items: center; gap: 13px; padding: 12px 18px; border-bottom: 1px solid #eef0f5;
}
.doc-row:last-child { border-bottom: 0; }
.doc-row__icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm); flex: none;
  background: var(--blue-tint); color: var(--blue); display: grid; place-items: center;
  font-size: .68rem; font-weight: 800; letter-spacing: .02em;
}
.doc-row__main { flex: 1; min-width: 0; }
.doc-row__name { font-weight: 600; font-size: .9rem; word-break: break-all; }
.doc-row__meta { font-size: .79rem; color: var(--muted); margin-top: 2px; }
.doc-row__actions { display: flex; gap: 7px; flex: none; }
