/**
 * Formulario de alta — app.firmafy.com/alta
 *
 * Hoja propia del rediseño. No sustituye a estilos.css, que sigue sirviendo a
 * formulario_remoto.html y formulario_empresas.html.
 *
 * Paleta de marca heredada de estilos.css / nuevo_login.css:
 *   #037394 azul Firmafy · #FCD21C amarillo · #cce9f1 azul claro · #EFF8FB fondo
 */

:root {
	--ff-primary: #037394;
	--ff-primary-dark: #025973;
	--ff-primary-deep: #025b75;
	--ff-accent: #fcd21c;
	--ff-tint: #eff8fb;
	--ff-tint-strong: #cce9f1;
	--ff-bg: #f4f8fb;
	--ff-text: #16323d;
	--ff-muted: #62808c;
	--ff-line: #dbe4ea;
	--ff-danger: #c0392b;
	--ff-danger-bg: #fdecea;
	--ff-success: #1c7c3f;
	--ff-success-bg: #e8f6ed;
	--ff-radius: 14px;
	--ff-shadow: 0 10px 34px rgba(3, 115, 148, .10);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--ff-bg);
	color: var(--ff-text);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ layout */

.alta {
	display: grid;
	grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
	gap: 40px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 24px 64px;
	align-items: start;
}

/* ------------------------------------------------------------- panel marca */

.alta__brand {
	position: sticky;
	top: 48px;
	background: linear-gradient(160deg, var(--ff-primary) 0%, var(--ff-primary-deep) 100%);
	color: #fff;
	border-radius: var(--ff-radius);
	padding: 36px 32px;
	box-shadow: var(--ff-shadow);
}

.alta__logo {
	width: 168px;
	max-width: 100%;
	height: auto;
	margin-bottom: 28px;
}

.alta__claim {
	font-size: 24px;
	line-height: 1.3;
	font-weight: 600;
	margin: 0 0 24px;
}

.alta__bullets {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.alta__bullets li {
	position: relative;
	padding-left: 30px;
	margin-bottom: 12px;
	font-size: 14.5px;
	color: rgba(255, 255, 255, .92);
}

.alta__bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ff-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23037394' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.4l3 3 6-6.4'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.alta__legal {
	font-size: 12.5px;
	color: rgba(255, 255, 255, .78);
	margin: 0 0 16px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, .18);
}

.alta__seals {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.alta__seals img {
	height: 40px;
	width: auto;
	background: #fff;
	border-radius: 6px;
	padding: 5px 8px;
}

/* -------------------------------------------------------------- tarjeta FR */

.alta__card {
	background: #fff;
	border-radius: var(--ff-radius);
	box-shadow: var(--ff-shadow);
	padding: 36px 36px 32px;
}

.alta__title {
	font-size: 25px;
	font-weight: 600;
	margin: 0 0 6px;
	color: var(--ff-text);
}

.alta__subtitle {
	margin: 0 0 28px;
	color: var(--ff-muted);
	font-size: 14.5px;
}

/* ---------------------------------------------------------------- campos */

.ff-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 20px;
}

.ff-field {
	margin-bottom: 18px;
	min-width: 0;
}

.ff-field--full {
	grid-column: 1 / -1;
}

.ff-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ff-text);
	margin-bottom: 6px;
}

.ff-input,
.ff-select {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font: inherit;
	font-size: 14.5px;
	color: var(--ff-text);
	background: #fff;
	border: 1.5px solid var(--ff-line);
	border-radius: 10px;
	transition: border-color .18s ease, box-shadow .18s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ff-select {
	padding-right: 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2362808c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 6.5l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	background-size: 15px;
	cursor: pointer;
}

.ff-input::placeholder {
	color: #9db0ba;
}

.ff-input:focus,
.ff-select:focus {
	outline: none;
	border-color: var(--ff-primary);
	box-shadow: 0 0 0 3px rgba(3, 115, 148, .14);
}

.ff-error {
	display: none;
	font-size: 12.5px;
	color: var(--ff-danger);
	margin: 6px 2px 0;
}

.ff-field.is-invalid .ff-input,
.ff-field.is-invalid .ff-select {
	border-color: var(--ff-danger);
}

.ff-field.is-invalid .ff-error {
	display: block;
}

.ff-field.is-valid .ff-input,
.ff-field.is-valid .ff-select {
	border-color: #86c5a0;
}

/* ------------------------------------------------------------- checkboxes */

.ff-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	color: var(--ff-text);
	cursor: pointer;
	user-select: none;
}

.ff-check input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 19px;
	width: 19px;
	height: 19px;
	margin: 1px 0 0;
	border: 1.5px solid var(--ff-line);
	border-radius: 5px;
	background: #fff;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.ff-check input[type="checkbox"]:checked {
	background: var(--ff-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.4l3 3 6-6.4'/%3E%3C/svg%3E") center / 13px no-repeat;
	border-color: var(--ff-primary);
}

.ff-check input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(3, 115, 148, .18);
}

.ff-check a {
	color: var(--ff-primary);
	font-weight: 600;
}

.ff-toggle-empresa {
	background: var(--ff-tint);
	border: 1px solid var(--ff-tint-strong);
	border-radius: 10px;
	padding: 14px 16px;
	margin: 2px 0 20px;
}

.ff-toggle-empresa .ff-check {
	font-weight: 600;
}

/* ------------------------------------------------------- bloque empresa */

.ff-empresa {
	display: none;
	border-top: 1px solid var(--ff-line);
	padding-top: 22px;
	margin-bottom: 4px;
}

.ff-empresa.is-open {
	display: block;
}

/* --------------------------------------------------------------- avisos */

.ff-note {
	font-size: 12.5px;
	color: var(--ff-muted);
	margin: 0 0 18px;
}

.ff-alert {
	display: none;
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 14px;
	margin-bottom: 18px;
}

.ff-alert.is-visible {
	display: block;
}

.ff-alert--error {
	background: var(--ff-danger-bg);
	color: #8c2c20;
	border: 1px solid #f3c8c2;
}

.ff-alert--success {
	background: var(--ff-success-bg);
	color: var(--ff-success);
	border: 1px solid #bfe4cd;
}

/* ------------------------------------------------------------- captcha */

.ff-captcha {
	display: flex;
	justify-content: center;
	margin: 4px 0 20px;
}

/* -------------------------------------------------------------- botón */

.ff-submit {
	width: 100%;
	height: 50px;
	border: none;
	border-radius: 10px;
	background: var(--ff-primary);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.ff-submit:hover:not(:disabled) {
	background: var(--ff-accent);
	color: var(--ff-primary);
}

.ff-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}

/* --------------------------------------------------------- intl-tel-input */

.iti {
	width: 100%;
	display: block;
}

.iti__flag-container {
	border-right: 1px solid var(--ff-line);
}

.iti--separate-dial-code .iti__selected-flag {
	background: transparent;
	border-radius: 10px 0 0 10px;
}

.iti input.ff-input {
	padding-left: 52px;
}

.iti--separate-dial-code input.ff-input {
	padding-left: 92px;
}

/* --------------------------------------------------------------- loader */

.ff-loader {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(244, 248, 251, .88);
	align-items: center;
	justify-content: center;
}

.ff-loader.is-visible {
	display: flex;
}

.ff-loader__box {
	text-align: center;
}

.ff-loader__box img {
	width: 190px;
	max-width: 60vw;
	height: auto;
	opacity: .85;
}

.ff-spinner {
	width: 30px;
	height: 30px;
	margin: 18px auto 0;
	border: 3px solid rgba(3, 115, 148, .22);
	border-top-color: var(--ff-primary);
	border-radius: 50%;
	animation: ff-spin .8s linear infinite;
}

@keyframes ff-spin {
	to {
		transform: rotate(360deg);
	}
}

.ff-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
	.alta {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 28px 18px 48px;
	}

	.alta__brand {
		position: static;
		padding: 28px 24px;
	}

	.alta__claim {
		font-size: 21px;
	}
}

@media (max-width: 620px) {
	.alta {
		padding: 18px 14px 40px;
	}

	.alta__brand {
		border-radius: 12px;
		padding: 24px 20px;
	}

	.alta__logo {
		width: 140px;
		margin-bottom: 20px;
	}

	.alta__bullets {
		margin-bottom: 22px;
	}

	.alta__card {
		padding: 24px 20px 22px;
		border-radius: 12px;
	}

	.alta__title {
		font-size: 22px;
	}

	.ff-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.ff-captcha {
		justify-content: flex-start;
		overflow-x: auto;
	}
}
