/* Vaga Certa · quiz */
body.vc-quiz { min-height: 100svh; background: linear-gradient(180deg, #fff 0%, var(--sc-surface) 100%); }

.qbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--sc-gutter); background: color-mix(in oklab, #fff 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.qbar__count { margin: 0; font-size: 0.9rem; color: var(--sc-ink-soft); font-variant-numeric: tabular-nums; }
.qbar__track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--vc-blue-50); }
.qbar__track span { display: block; height: 100%; background: var(--sc-accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 380ms var(--sc-ease-out); }

.qmain { display: grid; justify-items: center; padding: clamp(1.5rem, 5vh, 4rem) 1rem 4rem; }
.qcard {
  width: min(40rem, 100%); display: grid; gap: var(--sc-6);
  padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 24px; background: #fff;
  box-shadow: inset 0 0 0 1px #E1E7F1, 0 2px 4px hsl(var(--sc-shadow-color) / 0.04), 0 30px 60px -36px hsl(var(--sc-shadow-color) / 0.4);
}
.qstep { display: grid; gap: var(--sc-5); }
.qstep.is-in { animation: qin 320ms var(--sc-ease-out); }
@keyframes qin { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.qkicker { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--sc-accent); }
.qh {
  margin: 0; font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance;
}
.qsub { margin: -0.5rem 0 0; color: var(--sc-ink-soft); text-wrap: pretty; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-4); }
.qgrid--3 { grid-template-columns: 2fr 1.4fr 1fr; }
.qfull { grid-column: 1 / -1; }

/* Chips (múltipla escolha) */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0; padding: 0; border: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0.55rem 1rem;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px #CFD8E6;
  font-size: 0.95rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background-color 140ms var(--sc-ease-out), box-shadow 140ms var(--sc-ease-out), color 140ms var(--sc-ease-out), transform 120ms var(--sc-ease-out);
}
.chip input:checked + span { background: var(--vc-blue-50); color: var(--vc-blue-700); box-shadow: inset 0 0 0 1.5px var(--sc-accent); }
.chip input:checked + span::before { content: ""; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%231F4FD8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.chip input:focus-visible + span { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.chip span:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .chip input:not(:checked):not(:disabled) + span:hover { box-shadow: inset 0 0 0 1.5px #9FB0CB; } }

/* Cartões de opção única */
.opts { display: grid; gap: 0.7rem; margin: 0; padding: 0; border: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label {
  display: grid; gap: 0.15rem; padding: 1rem 1.15rem 1rem 3.1rem; border-radius: var(--vc-r); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px #CFD8E6; transition: box-shadow 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out);
}
.opt label::before { content: ""; position: absolute; left: 1.1rem; top: 1.15rem; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px #AEBBD0; background: #fff; }
.opt input:checked + label { background: var(--vc-blue-50); box-shadow: inset 0 0 0 1.5px var(--sc-accent); }
.opt input:checked + label::before { box-shadow: inset 0 0 0 6px var(--sc-accent); }
.opt input:focus-visible + label { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.opt strong { font-weight: 600; }
.opt small { color: var(--sc-ink-soft); font-size: 0.9rem; }
.opts--row { grid-template-columns: 1fr 1fr; }

/* Repetidores (experiência, cursos) */
.rep { display: grid; gap: var(--sc-4); }
.rep__item { display: grid; gap: var(--sc-4); padding: 1.2rem; border-radius: 18px; background: var(--sc-surface); box-shadow: inset 0 0 0 1px #E1E7F1; }
.rep__head { display: flex; justify-content: space-between; align-items: center; }
.rep__head strong { font-size: 0.95rem; }
.rep__del { background: none; border: 0; color: var(--vc-pen); font-weight: 500; cursor: pointer; padding: 0.4rem 0.6rem; border-radius: 8px; }
.rep__del:hover { background: #FBEDEB; }
.rep__add { justify-self: start; }
.check { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 500; cursor: pointer; min-height: 44px; }
.check input { width: 20px; height: 20px; }

/* Foto */
.photo { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.photo__preview { width: 112px; height: 112px; border-radius: 50%; background: var(--vc-blue-50) center / cover no-repeat; box-shadow: inset 0 0 0 1.5px var(--vc-blue-100); display: grid; place-items: center; color: var(--vc-blue-700); font-weight: 600; }
.photo__actions { display: grid; gap: 0.6rem; }
.photo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Revisão */
.review { display: grid; gap: 0.2rem; margin: 0; padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--sc-surface); }
.review div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid #E3E9F3; font-size: 0.93rem; }
.review div:last-child { border-bottom: 0; }
.review dt { color: var(--sc-ink-soft); }
.review dd { margin: 0; }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.93rem; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

.qnav { display: flex; justify-content: space-between; gap: 0.75rem; }
.qnav .vc-btn { min-width: 8.5rem; }

/* Carregando */
.qload { width: min(32rem, 100%); display: grid; justify-items: center; text-align: center; gap: var(--sc-5); padding-top: 4vh; }
.qload__sheet { width: 150px; aspect-ratio: 210/297; padding: 18px 16px; border-radius: 6px; background: #fff; display: flex; flex-direction: column; gap: 9px; border-top: 5px solid var(--sc-accent); box-shadow: 0 24px 48px -24px hsl(var(--sc-shadow-color) / 0.45); }
.qload__sheet i { display: block; height: 7px; border-radius: 7px; background: var(--vc-blue-50); transform-origin: 0 50%; animation: qline 1.6s var(--sc-ease-out) infinite; }
.qload__sheet i:nth-child(1) { width: 70%; height: 11px; background: var(--vc-blue-100); }
.qload__sheet i:nth-child(odd) { width: 86%; }
.qload__sheet i:nth-child(2) { animation-delay: 0.12s; } .qload__sheet i:nth-child(3) { animation-delay: 0.24s; }
.qload__sheet i:nth-child(4) { animation-delay: 0.36s; } .qload__sheet i:nth-child(5) { animation-delay: 0.48s; }
.qload__sheet i:nth-child(6) { animation-delay: 0.6s; } .qload__sheet i:nth-child(7) { animation-delay: 0.72s; }
@keyframes qline { 0% { transform: scaleX(0.2); opacity: 0.4; } 60%, 100% { transform: scaleX(1); opacity: 1; } }
.qload__h { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.8rem; letter-spacing: -0.02em; }
.qload__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; text-align: left; }
.qload__steps li { display: flex; gap: 0.6rem; align-items: center; color: #8592A8; transition: color 200ms var(--sc-ease-out); }
.qload__steps li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px #C6D0E0; flex: none; }
.qload__steps li.is-on { color: var(--sc-ink); font-weight: 500; }
.qload__steps li.is-on::before { box-shadow: inset 0 0 0 6px var(--sc-accent); }
.qload__steps li.is-done { color: var(--sc-ink-soft); }
.qload__steps li.is-done::before { background: var(--vc-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l2.8 2.8 6-6.4' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; box-shadow: none; }

@media (max-width: 640px) {
  /* No celular o quiz ocupa a tela toda: sem cartão, barra de ações presa embaixo. */
  body.vc-quiz { background: #fff; }
  .qbar { padding: 0.7rem 1.1rem; }
  .qbar .vc-mark img { width: 26px; height: 26px; }
  .qbar .vc-mark span { font-size: 1.02rem; }
  .qmain { display: block; padding: 0; }
  .qcard {
    width: 100%; min-height: calc(100svh - 3.4rem); border-radius: 0; box-shadow: none;
    padding: 1.4rem 1.15rem 0; gap: var(--sc-5); grid-template-rows: 1fr auto auto;
  }
  .qstep { gap: var(--sc-4); align-content: start; }
  .qh { font-size: 1.55rem; line-height: 1.12; }
  .qsub { font-size: 0.97rem; margin-top: -0.3rem; }
  .qkicker { font-size: 0.84rem; }
  .qgrid, .qgrid--3, .opts--row { grid-template-columns: 1fr; gap: var(--sc-3); }
  .opts { gap: 0.55rem; }
  .opt label { padding: 0.95rem 1rem 0.95rem 3rem; }
  .chips { gap: 0.5rem; }
  .chip span { min-height: 46px; padding: 0.55rem 0.95rem; font-size: 0.95rem; }
  .rep__item { padding: 1rem; border-radius: 16px; }
  .vc-textarea { min-height: 112px; }
  /* O campo focado nunca fica atrás da barra de baixo nem do topo. */
  .qcard :is(input, select, textarea) { scroll-margin-top: 5rem; scroll-margin-bottom: 7.5rem; }
  .qnav {
    position: sticky; bottom: 0; z-index: 5;
    margin: 0 -1.15rem; padding: 0.75rem 1.15rem max(0.75rem, env(safe-area-inset-bottom));
    background: color-mix(in oklab, #fff 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -1px 0 #E8EDF5; border-radius: 0; gap: 0.6rem;
  }
  .qnav .vc-btn { min-width: 0; min-height: 54px; font-size: 1rem; }
  .qnav #back { flex: 0 0 auto; padding: 0 1.15rem; }
  .qnav #next { flex: 1 1 auto; }
  .review { padding: 0.9rem 1rem; }
  .review div { grid-template-columns: 1fr; gap: 0.1rem; }
  .photo { flex-direction: column; align-items: stretch; }
  .photo__preview { align-self: center; width: 136px; height: 136px; }
  .photo__btns { display: grid; gap: 0.6rem; }
  .photo__btns .vc-btn { width: 100%; }
  .qload { padding: 2.5rem 1.25rem 3rem; margin: 0 auto; }
}
@media (max-width: 640px) and (max-height: 640px) {
  .qh { font-size: 1.35rem; }
  .qcard { padding-top: 1rem; }
}
.photo__btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.photo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .qstep.is-in { animation: none; }
  .qload__sheet i { animation: none; }
  .qbar__track span { transition: none; }
}
.qnav #next { margin-left: auto; }
