.form-step {
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-step.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-step.has-multiple-fields {
  /* display: flex; */
  flex-wrap: wrap;
  gap: 1rem;
}

/* Campos que devem ficar lado a lado */
.form-step.has-multiple-fields .side-by-side {
  flex: 1 1 calc(50% - 0.5rem);
}

/* Campos normais ocupam linha inteira */
.form-step .form-group {
  flex: 1 1 100%;
}

/* Garante que textarea nunca fique lado a lado */
.form-step textarea {
  width: 100%;
  display: block;
}

.form-step > .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  flex: 1 1 100%;
  margin: unset !important;
}

.form-group label {
  align-self: stretch;
  color: #012b69;
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  margin: unset;
}

label[class="required"]::after {
  content: "*";
  color: red;
  margin-left: 4px;
}

input.form-control,
textarea.form-control {
  display: flex;
  align-items: flex-start;
  align-self: stretch;
  height: 2.5rem;
  border: 1px solid #b0bfd4;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.04),
    0 1px 2px 0 rgba(16, 24, 40, 0.04);
  background-color: #fcfdff;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.25rem;
  font-weight: 400;
  color: #012b69;
}

input.form-control::placeholder,
textarea.form-control::placeholder {
  color: #8a9fbf;
}

input.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border: 1px solid #8a9fbf;
}

textarea.form-control {
  height: 140px !important;
}

button[type="submit"] {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  align-self: stretch;
  border: 1px solid #22c55e !important;
  border-radius: 0.25rem;
  background: linear-gradient(180deg, #16a34a 0%, #158e42 78%, #15803d 100%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  padding: 0.625rem 1rem;
  gap: 0.375rem;
  height: 2.5rem;
  transition: color 0.4s cubic-bezier(0.4, 0, 1, 1),
    background-color 0.4s cubic-bezier(0.4, 0, 1, 1),
    border-color 0.4s cubic-bezier(0.4, 0, 1, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 1, 1),
    background-position 500ms cubic-bezier(0.4, 0, 1, 1);

  color: #fcfdff;
  text-align: justify;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25rem;
}

button[type="submit"]:hover {
  background: linear-gradient(180deg, #158e42 0%, #17773c 100%);
  background-position: 100% 100%;
}

button[type="submit"]:focus {
  background: linear-gradient(180deg, #16a34a 0%, #158e42 78%, #15803d 100%);
  border-color: #86efac !important;
  outline: none;
  box-shadow: 0 0 0 2px #4ade80;

  color: #86efac;
}

button[type="submit"]:active {
  border-color: #86efac !important;
  box-shadow: 0 0 0 2px #4ade80;
  background: linear-gradient(180deg, #158e42 0%, #166534 100%);

  color: #86efac;
}

/* Botões de navegação */
.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  width: 100%;
  gap: 16px;
}

.step-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.step-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-prev {
  flex: 1;
  background-color: #6b7280;
  color: white;
  border: none;
}

.btn-prev:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-next {
  flex: 1;
  background-color: #012b69;
  color: white;
  border: none;
}

.btn-next:hover:not(:disabled) {
  background-color: #011a42;
}

.btn-submit {
  flex: 1;
  background: linear-gradient(180deg, #16a34a 0%, #158e42 78%, #15803d 100%);
  color: white;
  border: 1px solid #22c55e !important;
}

.btn-submit:hover {
  background: linear-gradient(180deg, #158e42 0%, #17773c 100%);
}

.hidden {
  display: none !important;
}

.border-red-500 {
  border-color: #ef4444 !important;
}

/* Ajustes para o formulário em steps */
.confirmation-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

.step-buttons {
    width: 100%;
    margin-top: 1.5rem;
}

.step-buttons .btn-submit {
    width: 100%;
    margin: 0;
}

.final-step-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.final-step-buttons .step-btn {
    flex: 1;
}

/* Ocultar botões do último step inicialmente */
.final-step-buttons {
    display: none;
}

/* Mostrar botões do último step quando estiver ativo */
.form-step.active .final-step-buttons {
    display: flex;
}

/* Ocultar navegação padrão no último step */
.form-step:last-child.active ~ .step-navigation {
    display: none;
}

/* Garantir que step-buttons fique dentro do step */
.step-buttons {
    width: 100%;
}

.confirmation-message > h3 {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}

.confirmation-message > p {
  font-size: 0.90rem !important;
  line-height: 18px !important;
}