/**
 * CF7 Multi-Step — estilos do front-end.
 *
 * Todas as cores usam variáveis CSS. Para personalizar num tema,
 * basta redefinir as variáveis, por exemplo:
 *
 *   .wpcf7-form.cf7ms-active { --cf7ms-accent: #1c2b5e; }
 */

.wpcf7-form.cf7ms-active {
	--cf7ms-accent: #0099cc;          /* azul-marinho dos botões        */
	--cf7ms-accent-hover: #14204a;    /* azul-marinho no hover          */
	--cf7ms-on-accent: #ffffff;       /* cor do ícone/texto nos botões  */
	--cf7ms-radius: 10px;             /* arredondamento dos botões      */
	--cf7ms-track: #e6ebf5;           /* fundo da barra de progresso    */
	--cf7ms-error: #dc3232;           /* cor dos erros                  */
	--cf7ms-btn-size: 48px;           /* altura dos botões de navegação */
}

/* ---------------------------------------------------------------------
 * Passos
 * ------------------------------------------------------------------- */
.wpcf7-form.cf7ms-active .cf7ms-step {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0; /* evita o overflow herdado de <fieldset> */
	display: none;
}

.wpcf7-form.cf7ms-active .cf7ms-step.cf7ms-current {
	display: block;
	animation: cf7ms-fade 0.25s ease;
}

.wpcf7-form.cf7ms-active .cf7ms-step > legend {
	font-weight: 700;
	font-size: 1.1em;
	line-height: 1.3;
	margin: 0 0 14px;
	padding: 0;
	width: 100%;
}

@keyframes cf7ms-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* Elementos escondidos por uma regra condicional (passos ou blocos). */
.wpcf7-form.cf7ms-active .cf7ms-hidden-cond {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * Barra de progresso
 * ------------------------------------------------------------------- */
.cf7ms-progress {
	margin: 0 0 22px;
}

.cf7ms-progress-label {
	font-size: 13px;
	line-height: 1.4;
	color: #5a6172;
	margin-bottom: 8px;
	letter-spacing: 0.01em;
}

.cf7ms-progress-track {
	background: var(--cf7ms-track);
	height: 6px;
	border-radius: 999px;
	overflow: hidden;
}

.cf7ms-progress-fill {
	background: var(--cf7ms-accent);
	height: 100%;
	width: 0;
	border-radius: 999px;
	transition: width 0.35s ease;
}

/* ---------------------------------------------------------------------
 * Navegação (Anterior / Seguinte / Enviar)
 * ------------------------------------------------------------------- */
.cf7ms-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
}

.cf7ms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--cf7ms-accent);
	color: var(--cf7ms-on-accent);
	border: 0;
	border-radius: var(--cf7ms-radius);
	min-width: 56px;
	height: var(--cf7ms-btn-size);
	padding: 0 20px;
	margin: 0;
	font: inherit;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background 0.2s ease, transform 0.05s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cf7ms-btn:hover,
.cf7ms-btn:focus-visible {
	background: var(--cf7ms-accent-hover);
	color: var(--cf7ms-on-accent);
}

.cf7ms-btn:focus-visible {
	outline: 3px solid rgba(28, 43, 94, 0.35);
	outline-offset: 2px;
}

.cf7ms-btn:active {
	transform: translateY(1px);
}

.cf7ms-btn svg {
	width: 22px;
	height: 22px;
	display: block;
	flex: 0 0 auto;
}

.cf7ms-btn.cf7ms-is-submit {
	padding: 0 28px;
	min-width: 120px;
}

/* Esconde o botão de submit nativo do CF7 (é acionado por JS),
 * mantendo-o acessível/clicável programaticamente. */
.cf7ms-hidden-submit {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---------------------------------------------------------------------
 * Estados de erro (validação por passo)
 * ------------------------------------------------------------------- */
.wpcf7-form.cf7ms-active .cf7ms-invalid,
.wpcf7-form.cf7ms-active .cf7ms-invalid:focus {
	outline: 2px solid var(--cf7ms-error) !important;
	outline-offset: 1px;
	border-color: var(--cf7ms-error) !important;
}

.cf7ms-step-error {
	color: var(--cf7ms-error);
	font-size: 14px;
	line-height: 1.4;
	margin: 12px 0 0;
	min-height: 1px;
}

.cf7ms-step-error:empty {
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Responsivo
 * ------------------------------------------------------------------- */
@media (max-width: 480px) {
	.cf7ms-btn {
		padding: 0 16px;
	}
	.cf7ms-btn.cf7ms-is-submit {
		padding: 0 20px;
		min-width: 100px;
	}
}
