/* Request workers flow (contractors/request.html). Everything is scoped under .rq and reuses the
   site tokens from protrade.css: --ink, --blue, --tint-2, --rule, --radius, --radius-card, --mono. */

.rq [hidden] { display: none !important; }
.rq { padding: 56px 0 120px; background: linear-gradient(var(--white) 0, var(--tint-2) 420px, var(--tint-2) 100%); }
.rq__grid { display: grid; grid-template-columns: minmax(0, 760px) 392px; justify-content: space-between; align-items: start; }

/* ---------- step header ---------- */
.rq__head { display: grid; gap: 20px; margin-bottom: 40px; }
.rq__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.rq__steps button { display: grid; gap: 10px; width: 100%; padding: 12px 0 0; font: 500 14px/1.2 var(--sans); color: var(--muted); text-align: left; background: none; border: 0; border-top: 3px solid var(--rule); cursor: default; }
.rq__steps button:not(:disabled) { cursor: pointer; color: var(--ink); border-top-color: var(--blue); }
.rq__steps button:not(:disabled):hover { color: var(--blue); }
.rq__steps li[aria-current="step"] button { color: var(--ink); border-top-color: var(--blue); }
.rq__n { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: inherit; opacity: .7; }
.rq__steps button { grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }

/* ---------- step body ---------- */
.rq__form { display: block; }
.rq__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.rq__q { display: block; float: none; width: 100%; padding: 0; font-size: 38px; line-height: 1.263; font-weight: 400; letter-spacing: -.01em; color: var(--ink); }
.rq__sub { margin: 10px 0 32px; max-width: 600px; font-size: 18px; line-height: 1.4; color: var(--text-2); }
.rq__row { display: grid; gap: 20px 24px; }
.rq__row--2 { grid-template-columns: 1fr 1fr; }
.rq__f { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.rq__row .rq__f { margin-bottom: 8px; }
.rq__row { margin-bottom: 20px; }
.rq__f > label, .rq__f > legend { display: block; padding: 0; margin-bottom: 8px; font-size: 14px; line-height: 1.43; font-weight: 500; color: var(--ink); }
.rq__f legend span, .rq__f label span.opt { font-weight: 400; color: var(--muted); }
.rq input:not([type=radio]):not([type=checkbox]), .rq select, .rq textarea {
  width: 100%; height: 48px; padding: 12px 14px; font: 16px/1.25 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #C9CDE0; border-radius: var(--radius); appearance: none; -webkit-appearance: none; }
.rq select { padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.5l4 4 4-4' fill='none' stroke='%2300022F' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.rq textarea { height: auto; min-height: 104px; resize: vertical; }
.rq input::placeholder, .rq textarea::placeholder { color: #8A8DA0; }
.rq input:focus, .rq select:focus, .rq textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.rq [aria-invalid="true"] { border-color: #B42318 !important; }
.rq__date { margin-top: 12px; max-width: 240px; }

/* ---------- trade tiles ---------- */
.rq__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rq__tile { position: relative; display: flex; align-items: center; gap: 14px; height: 76px; padding: 0 18px; background: #fff; border: 1px solid #D5D9EA; border-radius: var(--radius); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rq__tile:hover { border-color: #9AA3D6; }
.rq__tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rq__tile img { width: 32px; height: 32px; flex: none; }
.rq__tile span { font-size: 17px; line-height: 1.2; font-weight: 500; color: var(--ink); }
.rq__tile::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border: 1px solid #C9CDE0; border-radius: 2px; background: #fff; }
.rq__tile:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #F7F8FF; }
.rq__tile:has(input:checked)::after { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.2l3 3 6-6.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.rq__tile:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- crew cards ---------- */
.rq__crews { display: grid; gap: 16px; margin-top: 16px; }
.rq__crews:empty { display: none; }
.rq__crew { padding: 20px 24px 22px; background: #fff; border: 1px solid #E1E4EE; border-radius: var(--radius-card); }
.rq__crew-h { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #ECEEF5; }
.rq__crew-h img { width: 28px; height: 28px; }
.rq__crew-h h3 { flex: 1; font-size: 20px; line-height: 1.2; font-weight: 500; color: var(--ink); }
.rq__rm { padding: 6px 0; font-size: 14px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rq__rm:hover { color: var(--ink); }
.rq__lvl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #ECEEF5; }
.rq__lvl b { display: block; font-size: 16px; font-weight: 500; color: var(--ink); }
.rq__lvl small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.rq__step-ctl { display: grid; grid-template-columns: 40px 52px 40px; height: 40px; border: 1px solid #C9CDE0; border-radius: var(--radius); overflow: hidden; }
.rq__step-ctl button { display: grid; place-items: center; font-size: 20px; line-height: 1; color: var(--ink); background: #fff; border: 0; cursor: pointer; }
.rq__step-ctl button:hover:not(:disabled) { background: var(--tint-2); }
.rq__step-ctl button:disabled { color: #B8BBCB; cursor: default; }
.rq .rq__step-ctl input:not([type=radio]):not([type=checkbox]) { height: 38px; padding: 0; line-height: 38px; min-width: 0; border: 0; border-inline: 1px solid #E1E4EE; border-radius: 0; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.rq__step-ctl input::-webkit-outer-spin-button, .rq__step-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* specialties: dropdown of checkboxes */
.rq__spec { position: relative; margin-top: 16px; }
.rq__spec > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.rq__spec > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.rq__ms { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 48px; padding: 0 14px; font: 16px/1.25 var(--sans); color: var(--ink); text-align: left; background: #fff; border: 1px solid #C9CDE0; border-radius: var(--radius); cursor: pointer; }
.rq__ms[aria-expanded="true"] { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: -1px; }
.rq__ms .ph-t { color: #8A8DA0; }
.rq__ms .v { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rq__ms svg { flex: none; width: 14px; height: 14px; transition: transform .15s; }
.rq__ms[aria-expanded="true"] svg { transform: rotate(180deg); }
.rq__menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; background: #fff; border: 1px solid #D5D9EA; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,2,47,.14); }
.rq__menu[hidden] { display: none; }
.rq__opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; font-size: 16px; color: var(--ink); border-radius: 2px; cursor: pointer; }
.rq__opt:hover { background: var(--tint-2); }
.rq__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.rq__opt small { margin-left: auto; font-size: 13px; color: var(--muted); }
.rq__menu-foot { display: flex; justify-content: flex-end; padding: 6px 4px 2px; border-top: 1px solid #ECEEF5; margin-top: 4px; }
.rq__menu-foot button { padding: 8px 12px; font: 500 14px/1 var(--sans); color: var(--blue); background: none; border: 0; cursor: pointer; }

/* ---------- chips (radio and checkbox groups) ---------- */
.rq__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rq__chips label { position: relative; cursor: pointer; }
.rq__chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rq__chips span { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; font-size: 15px; line-height: 1.2; color: var(--ink); background: #fff; border: 1px solid #D5D9EA; border-radius: var(--radius); transition: border-color .15s, background-color .15s; }
.rq__chips label:hover span { border-color: #9AA3D6; }
.rq__chips input:checked + span { color: #fff; background: var(--ink); border-color: var(--ink); }
.rq__chips--multi input:checked + span { color: var(--ink); background: #F7F8FF; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.rq__chips--multi input:checked + span::before { content: ""; width: 12px; height: 12px; margin-right: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.5 2.5L10 3.2' fill='none' stroke='%230C2AC1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.rq__chips input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.rq__chips--multi .rq__tag { margin-left: 8px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }

.rq__check { display: flex; align-items: center; gap: 10px; margin: -8px 0 24px; font-size: 16px; color: var(--ink); cursor: pointer; }
.rq__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.rq__fine { max-width: 600px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ---------- nav ---------- */
.rq__err { min-height: 0; margin: 0; font-size: 15px; line-height: 1.4; color: #B42318; }
.rq__err:not(:empty) { margin-top: 20px; }
.rq__nav { display: flex; align-items: center; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); }
.rq__nav .rq__next { margin-left: auto; height: 48px; padding: 0 28px; }
.rq__back { display: inline-flex; align-items: center; gap: 8px; padding: 12px 0; font: 500 16px/1 var(--sans); color: var(--ink); background: none; border: 0; cursor: pointer; }
.rq__back svg { width: 20px; height: 20px; }
.rq__back:hover { color: var(--blue); }
.rq__skip { padding: 12px 4px; font: 500 16px/1 var(--sans); color: var(--muted); background: none; border: 0; cursor: pointer; margin-left: auto; }
.rq__skip:not([hidden]) + .rq__next { margin-left: 0; }
.rq__skip:hover { color: var(--ink); }
.rq__mini { display: none; }
.rq .btn--line { height: 44px; padding: 0 18px; border: 1px solid #C9CDE0; background: #fff; color: var(--ink); }
.rq .btn--line:hover { border-color: var(--ink); }

/* ---------- summary ---------- */
.rq__sum { position: sticky; top: 123px; }
.rq__card { padding: 28px 28px 24px; background: #fff; border: 1px solid #E1E4EE; border-radius: var(--radius-card); }
.rq__card-k { font: 500 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rq__total { margin: 16px 0 4px; font-size: 48px; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.rq__total #rq-total-l { font-size: 20px; letter-spacing: 0; color: var(--muted); }
.rq__lines { margin: 16px 0 0; }
.rq__lines > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid #ECEEF5; }
.rq__lines dt { font-size: 14px; color: var(--muted); }
.rq__lines dd { margin: 0; font-size: 15px; line-height: 1.4; color: var(--ink); }
.rq__lines dd small { display: block; font-size: 13px; color: var(--muted); }
.rq__empty { margin-top: 8px; font-size: 15px; color: var(--muted); }
.rq__talk { margin-top: 16px; padding: 0 4px; font-size: 15px; color: var(--muted); }
.rq__talk a { color: var(--blue); font-weight: 500; }

/* ---------- done ---------- */
.rq__done:focus { outline: none; }
.rq__done .eyebrow { margin-bottom: 16px; }
.rq__callcard { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; background: var(--dark-45); color: var(--on-dark); border-radius: var(--radius-card); }
.rq__callcard-k { font-size: 24px; line-height: 1.25; color: #fff; }
.rq__callcard-v { margin-top: 4px; font-size: 16px; color: var(--on-dark-2); }
.rq__callcard-acts { display: flex; gap: 12px; flex: none; }
.rq__callcard .btn { height: 48px; padding: 0 22px; }
.rq__next-list { display: grid; gap: 0; margin-top: 40px; }
.rq__next-list li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 18px 0; border-top: 1px solid var(--rule); }
.rq__next-list .rq__n { padding-top: 5px; color: var(--blue); opacity: 1; }
.rq__next-list h3 { font-size: 18px; line-height: 1.3; font-weight: 500; color: var(--ink); }
.rq__next-list p { margin-top: 4px; font-size: 16px; line-height: 1.45; color: var(--text); }
.rq__restart { margin-top: 24px; padding: 8px 0; font: 500 15px/1 var(--sans); color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rq__noscript { margin-bottom: 24px; }

/* step enter */
@media (prefers-reduced-motion: no-preference) {
  .rq__step:not([hidden]), .rq__done:not([hidden]) { animation: rq-in .22s ease-out; }
  @keyframes rq-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- tablet and mobile ---------- */
@media (max-width: 1100px) {
  .rq__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
}
@media (max-width: 860px) {
  .rq { padding: 32px 0 0; }
  .rq__grid { grid-template-columns: 1fr; gap: 0; }
  .rq__sum { position: static; margin: 40px 0 48px; }
  .rq__head { margin-bottom: 28px; }
  .rq__steps button { font-size: 13px; grid-template-columns: 1fr; row-gap: 6px; }
  .rq__q { font-size: 30px; line-height: 1.25; }
  .rq__sub { font-size: 16px; margin-bottom: 24px; }
  .rq__tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rq__tile { height: 64px; padding: 0 12px; gap: 10px; }
  .rq__tile img { width: 26px; height: 26px; }
  .rq__tile span { font-size: 15px; }
  .rq__tile::after { top: 6px; right: 6px; width: 16px; height: 16px; background-size: 16px; }
  .rq__crew { padding: 16px 16px 18px; }
  .rq__row--2 { grid-template-columns: 1fr; gap: 0; }
  .rq__row .rq__f { margin-bottom: 20px; }
  .rq__row { margin-bottom: 8px; }
  /* sticky action bar: thumb reach, and the running total stays visible */
  .rq__nav { position: sticky; bottom: 0; z-index: 20; margin: 28px -24px 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--rule); }
  .rq__mini { display: block; flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .rq__mini:empty { display: none; }
  .rq__back { font-size: 0; gap: 0; padding: 12px 8px 12px 0; }
  .rq__back svg { width: 22px; height: 22px; }
  .rq__nav .rq__next { margin-left: auto; padding: 0 20px; }
  .rq__mini + .rq__skip:not([hidden]) { margin-left: 0; }
  .rq__callcard { flex-direction: column; align-items: stretch; padding: 24px; }
  .rq__callcard-acts { flex-direction: column; }
}
/* start date sits inline with the start chips */
.rq__chips .rq__date { margin-top: 0; max-width: none; }
.rq__chips .rq__date input { height: 44px; }
.rq__chips .rq__date label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rq__chips .rq__date input { position: static; opacity: 1; width: auto; height: 44px; padding: 0 12px; font: 15px/1.2 var(--sans); color: var(--ink); background: #fff; border: 1px solid #D5D9EA; border-radius: var(--radius); }
.rq__chips .rq__date input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }

/* clean-up pass: tile checkbox centred with icon and label; side note on the card edge; balanced questions */
.rq__tile::after { top: 50%; margin-top: -9px; right: 16px; }
.rq__talk { padding: 0; }
.rq__q { text-wrap: balance; }
/* phones: keep the trade name clear of the checkbox */
.rq__tile span { min-width: 0; }
.rq__tile { padding-right: 44px; }
@media (max-width: 760px) {
  .rq__tile { padding: 0 34px 0 10px; gap: 8px; }
  .rq__tile::after { right: 10px; }
  .rq__tile span { font-size: 15px; }
}
@media (max-width: 360px) { .rq__tile img { width: 22px; height: 22px; } .rq__tile span { font-size: 14px; } }
.rq__grid > * { min-width: 0; }
@media (max-width: 760px) { .rq__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 374px) {
  .rq__tile { padding: 0 32px 0 12px; }
  .rq__tile img { display: none; }
  .rq__tile span { font-size: 15px; overflow-wrap: normal; }
}
