/* LBR · LP /diagnostico v3 · modal, formulário, barra fixa e consentimento (iguais à v2) */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--gray); z-index: 20; }

.modal { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 100dvh; height: 100dvh; margin: 0 auto; background: var(--white); color: var(--navy); }
.modal::backdrop { background: rgba(10, 46, 63, 0.6); }
.modal__inner { padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); }
.modal__close { background: none; border: 0; color: var(--navy); font: 500 14px "Poppins", sans-serif; padding: 8px 0; margin-bottom: 8px; cursor: pointer; text-decoration: underline; }
.modal .h3 { font-weight: 400; font-size: 22px; line-height: 1.25; margin: 0 0 12px; padding: 0; }
.step-panel { border: 0; margin: 0; padding: 0; min-width: 0; }
.progress { font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-600); margin: 0 0 8px; }

.q { margin: 24px 0 0; }
.q__label { font-weight: 500; margin: 0 0 10px; }
.opt { display: block; margin-bottom: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; align-items: center; min-height: 48px; padding: 12px 16px; border: 1px solid var(--gray); border-radius: var(--r-md); cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.opt input:checked + span { border-color: var(--navy); background: var(--navy-100); font-weight: 500; }
.opt input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

.field { display: block; margin: 16px 0 0; }
.field__label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--gray-600); }
.field input { width: 100%; min-height: 48px; padding: 12px 14px; font: 400 16px "Poppins", system-ui, sans-serif; color: var(--navy); border: 1px solid var(--gray); border-radius: var(--r-md); background: var(--white); }
.field input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 2px var(--navy-100); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.hint { display: block; font-size: 14px; margin-top: 6px; color: var(--navy); }
.hint button { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }
.error { display: block; color: var(--bad); font-size: 14px; margin-top: 6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 4px; font-size: 14px; color: var(--oak); }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.consent a { color: var(--navy); }
[data-submit] { margin-top: 20px; }
[data-submit][aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.link-back, .link-alt { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--navy); font: 500 15px "Poppins", sans-serif; text-decoration: underline; cursor: pointer; padding: 8px; }

.result { padding-top: 8px; }
.result h2:focus { outline: none; }
.bookings { margin: 24px 0 8px; }
.bookings .microcopy { margin: 0 0 8px; }
.bookings iframe { width: 100%; height: 600px; border: 1px solid var(--gray); border-radius: var(--r-md); display: block; }
.confirm { margin-top: 12px; padding: 12px 14px; background: var(--navy-100); border-radius: var(--r-md); color: var(--navy); }

.consent-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; background: var(--white); border: 1px solid var(--gray); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 16px; font-size: 14px; color: var(--oak); }
.consent-bar p { margin: 0 0 12px; }
.consent-bar__actions { display: flex; gap: 8px; }
.consent-bar__actions .btn { flex: 1; min-height: 44px; padding: 10px 12px; font-size: 15px; }

/* Com a barra fixa na tela, a de cookies sobe para não cobri-la */
body:has(#sticky-cta:not([hidden])) .consent-bar { bottom: calc(88px + env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
  .sticky-cta { display: none; }
  body:has(#sticky-cta:not([hidden])) .consent-bar { bottom: 24px; }
  .modal { height: auto; max-height: 92dvh; margin-top: 4vh; border-radius: var(--r-md); }
  .modal__inner { padding: 32px; }
  .consent-bar { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
}
