/* Dominando360® Engine 360® — Fluxo público
   V11.9.8: títulos das perguntas fora do fieldset nativo. */

/* O formulário não deve forçar a etapa a ocupar uma linha flexível gigante. */
.flow-embed form {
  grid-template-rows: auto auto !important;
  min-height: 0 !important;
  width: min(100%, 680px) !important;
  padding: 22px !important;
}

/* Reset real do fieldset/legend do navegador. */
.flow-embed fieldset.step {
  min-inline-size: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  padding: 30px 10px 18px !important;
}

.flow-embed fieldset.step > legend {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  white-space: normal !important;
}

/* Todas as etapas passam a começar no topo, sem o vazio central. */
.flow-embed .step {
  align-content: start !important;
  justify-content: stretch !important;
  gap: 18px !important;
  min-height: 510px !important;
}

.flow-embed .step.active {
  display: grid !important;
}

.flow-embed .step > small {
  order: -2;
  margin: 0 !important;
}

.flow-embed .step > h1,
.flow-embed .step > h2,
.flow-embed .step > legend {
  line-height: 1.06 !important;
  margin: 0 !important;
}

.flow-embed .step > p {
  max-width: 620px;
}

.flow-embed .step textarea {
  width: 100% !important;
  resize: vertical;
}

.flow-embed .option {
  min-height: 52px;
  align-items: center;
}

.flow-embed .nav {
  margin-top: 2px;
  flex-wrap: wrap;
}

/* Mensagem + ação mantém o mesmo esqueleto das perguntas. */
.flow-embed .flow-message-step {
  padding: 30px 10px 18px !important;
  align-content: start !important;
}

.flow-embed .flow-message-actions {
  display: flex !important;
  width: auto !important;
  margin-top: 8px !important;
}

.flow-embed .flow-message-actions .inline-action,
.flow-embed .flow-message-actions button {
  width: auto !important;
  max-width: 100%;
  min-height: 48px;
  padding-inline: 24px !important;
}

/* Tela inicial interna segue o mesmo alinhamento superior. */
.flow-embed form > .step:first-of-type {
  padding-top: 48px !important;
}

/* Card da abertura premium: conteúdo no topo e proporções consistentes. */
.flow-embed .start-preview {
  align-content: start !important;
  justify-content: stretch !important;
  min-height: 560px !important;
  padding: 72px 34px 34px !important;
}

@media (max-width: 640px) {
  .flow-embed form {
    padding: 16px !important;
  }

  .flow-embed fieldset.step,
  .flow-embed .flow-message-step {
    min-height: auto !important;
    padding: 24px 2px 12px !important;
  }

  .flow-embed form > .step:first-of-type {
    padding-top: 30px !important;
  }

  .flow-embed .start-preview {
    min-height: 420px !important;
    padding: 42px 24px 24px !important;
  }
}


/* V11.9.8 — título das perguntas como cabeçalho real do card. */
.flow-embed .flow-question-step {
  width: 100% !important;
  min-height: 510px !important;
  margin: 0 !important;
  padding: 24px 10px 18px !important;
  align-content: start !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}

.flow-embed .flow-question-step > small {
  order: 1 !important;
  margin: 0 !important;
}

.flow-embed .flow-question-title {
  order: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: var(--flow-title-size) !important;
  line-height: 1.12 !important;
  font-weight: 400 !important;
  color: var(--flow-text) !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.flow-embed .flow-question-step > .option,
.flow-embed .flow-question-step > label,
.flow-embed .flow-question-step > .nav,
.flow-embed .flow-question-step > .inline-action {
  order: 2 !important;
}

@media (max-width: 640px) {
  .flow-embed .flow-question-step {
    min-height: auto !important;
    padding: 20px 2px 12px !important;
  }

  .flow-embed .flow-question-title {
    font-size: var(--flow-mobile-title-size) !important;
    line-height: 1.14 !important;
    margin-bottom: 10px !important;
  }
}


/* V13.0.1 — Home Premium alinhada à Página Final */
.flow-embed .start-page {
  width: min(100%, 1240px) !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 520px) !important;
  gap: clamp(48px, 7vw, 96px) !important;
  align-items: center !important;
}

.flow-embed .start-copy {
  align-self: center !important;
}

.flow-embed .start-copy .start-kicker {
  display: block !important;
  margin-bottom: 18px !important;
}

.flow-embed .start-copy .start-title {
  max-width: 760px !important;
  margin: 0 0 20px !important;
  line-height: .98 !important;
  text-wrap: balance;
}

.flow-embed .start-copy .start-subtitle {
  max-width: 680px !important;
  margin: 0 0 22px !important;
  line-height: 1.12 !important;
  text-wrap: balance;
}

.flow-embed .start-copy .start-text {
  max-width: 680px !important;
  line-height: 1.55 !important;
}

.flow-embed .start-preview {
  position: relative !important;
  overflow: hidden !important;
  min-height: 430px !important;
  padding: clamp(42px, 5vw, 58px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 34px 110px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.08) !important;
  transform: none !important;
}

.flow-embed .start-preview::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--flow-accent-start), var(--flow-primary), var(--flow-accent-end));
}

.flow-embed .start-preview > small {
  margin-bottom: 20px !important;
  color: var(--flow-primary) !important;
  letter-spacing: .16em !important;
}

.flow-embed .start-preview .start-card-title {
  margin: 0 0 22px !important;
  line-height: 1.08 !important;
  text-wrap: balance;
}

.flow-embed .start-preview .start-card-text {
  margin: 0 0 30px !important;
  line-height: 1.45 !important;
}

.flow-embed .start-preview [data-start-flow] {
  align-self: stretch !important;
  width: min(100%, var(--flow-start-button-width)) !important;
  margin: 0 auto !important;
  box-shadow: 0 16px 44px color-mix(in srgb, var(--flow-primary) 20%, transparent);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.flow-embed .start-preview [data-start-flow]:hover {
  transform: translateY(-1px);
  filter: brightness(1.025);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--flow-primary) 27%, transparent);
}

@media (max-width: 860px) {
  .flow-embed .start-page {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .flow-embed .start-copy {
    text-align: center !important;
  }
  .flow-embed .start-copy .start-title,
  .flow-embed .start-copy .start-subtitle,
  .flow-embed .start-copy .start-text {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .flow-embed .start-preview {
    min-height: 390px !important;
  }
}

@media (max-width: 640px) {
  .flow-embed .start-preview {
    min-height: auto !important;
    padding: 38px 26px 30px !important;
  }
  .flow-embed .start-preview .start-card-text {
    margin-bottom: 24px !important;
  }
}

/* V13.0.2 — perguntas longas: card cresce e o conteúdo nunca é cortado. */
.flow-embed {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  place-items: safe center !important;
}
.flow-embed form {
  height: auto !important;
  max-height: none !important;
}
.flow-embed .flow-question-step {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.flow-embed .flow-question-title {
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
}
.flow-embed .flow-question-title.is-long {
  font-size: min(var(--flow-title-size), 28px) !important;
  line-height: 1.18 !important;
  text-wrap: pretty;
}
.flow-embed .flow-question-title.is-very-long {
  font-size: min(var(--flow-title-size), 22px) !important;
  line-height: 1.22 !important;
}
@media (max-width: 640px) {
  .flow-embed .flow-question-title.is-long,
  .flow-embed .flow-question-title.is-very-long {
    font-size: min(var(--flow-mobile-title-size), 20px) !important;
    line-height: 1.22 !important;
  }
}

/* D360 V8.6.36 — padrão global: tipografia Regular em todos os cards do FORM */
.flow-embed .flow-question-step .flow-question-title,
.flow-embed .flow-question-title{
  font-weight:400!important;
  line-height:1.28!important;
  letter-spacing:0!important;
}
.flow-embed .flow-question-title.is-long{line-height:1.30!important}
.flow-embed .flow-question-title.is-very-long{line-height:1.32!important}
