/**
 * VISOFT Email Marketing Pro - Formulário de subscrição.
 *
 * Estrutura:
 *  - Desktop: Nome / E-mail / Telemóvel em linha (flex) + botão abaixo.
 *  - Mobile : campos empilhados a 100% e botão em largura total.
 *
 * Personalização: basta redefinir as variáveis CSS no tema, por exemplo
 * .visoft-em-form { --visoft-em-accent: #d4351c; }
 */

.visoft-em-form {
	--visoft-em-accent: #0073aa;
	--visoft-em-accent-dark: #005a87;
	--visoft-em-border: #ccd0d4;
	--visoft-em-radius: 6px;

	box-sizing: border-box;
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	padding: 24px;
	background: #f9f9f9;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	color: #1e1e1e;
	font-size: 15px;
	line-height: 1.5;
}

.visoft-em-form *,
.visoft-em-form *::before,
.visoft-em-form *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------------
 * Linha de campos
 * ------------------------------------------------------------------ */

.visoft-em-form .visoft-em-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
}

.visoft-em-form .visoft-em-field {
	display: flex;
	flex: 1 1 200px;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.visoft-em-form .visoft-em-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: #1e1e1e;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.visoft-em-form .visoft-em-input {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 11px 14px;
	color: #1e1e1e;
	background-color: #ffffff;
	background-image: none;
	border: 1px solid var(--visoft-em-border);
	border-radius: var(--visoft-em-radius);
	box-shadow: none;
	font-family: inherit;
	font-size: 16px; /* 16px evita o zoom automático ao focar no iOS */
	font-weight: 400;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.visoft-em-form .visoft-em-input::placeholder {
	color: #8c8f94;
	opacity: 1;
}

.visoft-em-form .visoft-em-input:focus {
	border-color: var(--visoft-em-accent);
	box-shadow: 0 0 0 3px rgba(0, 115, 170, .16);
	outline: none;
}

/* ---------------------------------------------------------------------
 * Botão
 * ------------------------------------------------------------------ */

.visoft-em-form .visoft-em-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 0;
}

.visoft-em-form .visoft-em-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 12px 28px;
	color: #ffffff;
	background-color: var(--visoft-em-accent);
	background-image: none;
	border: none;
	border-radius: var(--visoft-em-radius);
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .18s ease, transform .12s ease;
}

.visoft-em-form .visoft-em-submit:hover,
.visoft-em-form .visoft-em-submit:focus {
	color: #ffffff;
	background-color: var(--visoft-em-accent-dark);
}

.visoft-em-form .visoft-em-submit:active {
	transform: translateY(1px);
}

.visoft-em-form .visoft-em-submit:focus-visible {
	outline: 3px solid rgba(0, 115, 170, .35);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------
 * Mensagens de retorno
 * ------------------------------------------------------------------ */

.visoft-em-form .visoft-em-message,
.visoft-em-message {
	margin: 0 0 18px;
	padding: 12px 16px;
	color: #14425c;
	background: #eef6fb;
	border-left: 4px solid var(--visoft-em-accent, #0073aa);
	border-radius: var(--visoft-em-radius, 6px);
	font-size: 15px;
	line-height: 1.45;
}

.visoft-em-message--success {
	color: #14532d;
	background: #edf7ee;
	border-left-color: #1a7f37;
}

.visoft-em-message--warning {
	color: #7a4a00;
	background: #fdf6e7;
	border-left-color: #b26a00;
}

.visoft-em-message--error {
	color: #7f1d1d;
	background: #fdeeec;
	border-left-color: #c0392b;
}

/* Campo armadilha anti-spam: invisível mas acessível a bots. */
.visoft-em-form .visoft-em-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
}

/* ---------------------------------------------------------------------
 * Responsivo
 * ------------------------------------------------------------------ */

/* Tablet */
@media (max-width: 782px) {
	.visoft-em-form {
		padding: 20px;
	}

	.visoft-em-form .visoft-em-grid {
		gap: 14px;
	}
}

/* Telemóvel: campos um por linha e botão em largura total */
@media (max-width: 600px) {
	.visoft-em-form {
		padding: 18px 16px;
		border-radius: 8px;
	}

	.visoft-em-form .visoft-em-field {
		flex: 1 1 100%;
	}

	.visoft-em-form .visoft-em-actions {
		margin-top: 16px;
	}

	.visoft-em-form .visoft-em-submit {
		width: 100%;
		padding: 14px 20px;
	}
}

/* Telemóveis pequenos */
@media (max-width: 400px) {
	.visoft-em-form {
		padding: 16px 14px;
	}

	.visoft-em-form .visoft-em-label {
		font-size: 13.5px;
	}

	.visoft-em-form .visoft-em-submit {
		font-size: 15px;
	}
}
