/**
 * Formulario de registro.
 *
 * @package EmprendeDR
 * @since   0.8.0
 */

:root {
	--eag-color-white: #fff;
	--eag-color-emprende: #379237;        /* verde corporativo primario: CTA y enlaces */
	--eag-color-emprende-dark: #2d7a2d;   /* primario oscurecido: hover/focus y texto de títulos (contraste AA) */
	--eag-color-emprende-2: #5ab436;      /* verde corporativo secundario: acentos decorativos (viñetas) */
	--eag-field-border: #d7dde5;          /* borde de campos (input/select) */
	--eag-paynotice-rule: #d8ebe0;        /* filetes separadores del aviso de pago */
	--eag-info-text: #1f3b78;             /* texto y enlaces del aviso bajo el correo */
}

.eag-registro-wrap {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Tarjetas */
.eag-registro-card {
	background: var(--eag-color-white);
	border: 1px solid #e6eaf0;
	border-radius: 16px;
	padding: 22px;
	margin: 0 0 18px;
	box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.eag-registro-card-title {
	color: var(--eag-color-emprende-dark);
	font-weight: 900;
	font-size: 16px;
	letter-spacing: .8px;
	text-transform: uppercase;
	text-align: left;
	margin: 0 0 16px;
}

/* Filas de campo */
.eag-registro-row {
	margin: 0 0 14px;
}

.eag-registro-row label {
	display: block;
	font-weight: 800;
	font-size: 13px;
	margin: 0 0 8px;
	text-transform: uppercase;
}

/* Asterisco de campo obligatorio */
.eag-registro-row label .req,
.eag-consent-text .req {
	color: #d92d20;
	margin-left: 2px;
	font-weight: 700;
}

/* Ayuda de requisitos de contraseña */
.eag-registro-pass-hint {
	margin: -4px 0 14px;
	font-size: 13px;
	color: #64748b;
}

.eag-registro-row input,
.eag-registro-row select,
.eag-registro-select {
	width: 100%;
	height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--eag-field-border);
	border-radius: 12px;
	box-sizing: border-box;
	font-size: 15px;
}

/* Grid de dos columnas */
.eag-registro-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 700px) {
	.eag-registro-grid {
		grid-template-columns: 1fr;
	}
}

/* Visibilidad según tipo de facturación. El campo oculto sale del flujo del grid,
   así «Documento» reordena a la 2ª columna tanto en Particular como en Empresa. */
.eag-bill-empresa-only {
	display: none;
}

.eag-bill-type-empresa .eag-bill-particular-only {
	display: none;
}

.eag-bill-type-empresa .eag-bill-empresa-only {
	display: block;
}

/* Teléfono con prefijo */
.eag-registro-phone-wrap {
	display: flex;
	gap: 8px;
}

.eag-registro-phone-wrap select {
	flex: 0 0 auto;
	width: 260px;
	height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--eag-field-border);
	border-radius: 12px;
	box-sizing: border-box;
	font-size: 15px;
}

.eag-registro-phone-wrap input {
	flex: 1 1 0;
}

/* Botón de envío */
.eag-registro-actions {
	margin-top: 8px;
}

.eag-registro-submit {
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 14px 18px;
	font-weight: 900;
	font-size: 16px;
	background: var(--eag-color-emprende);
	color: var(--eag-color-white);
	cursor: pointer;
	letter-spacing: .5px;
}

.eag-registro-submit:hover,
.eag-registro-submit:focus {
	background: var(--eag-color-emprende-dark);
	outline: none;
}

/* Aviso PRG (Post/Redirect/Get) */
.eag-registro-notice {
	padding: 12px 14px;
	border-radius: 12px;
	margin: 0 0 18px;
	font-weight: 700;
}

.eag-registro-notice-err {
	border: 1px solid #ff4d4f;
	background: #fff1f0;
	color: #a8071a;
}

/* Filas de consentimiento */
.eag-consent-row {
	display: flex;
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.4;
}

.eag-consent-row input[type="checkbox"] {
	margin-right: 10px;
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: var(--eag-color-emprende);
}

/* Honeypot (oculto visualmente pero presente para bots) */
.eag-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0;
	overflow: hidden;
	pointer-events: none;
}

/* Tooltip de consentimiento */
.eag-consent-text.eag-has-tip {
	position: relative;
	cursor: help;
	border-bottom: 1px dotted #999;
}

.eag-consent-tip {
	position: absolute;
	left: 0;
	top: calc(100% + 8px);
	width: min(650px, 90vw);
	background: #222;
	color: var(--eag-color-white);
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.5;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s;
	z-index: 999;
}

.eag-consent-tip a {
	color: #8fd3ff;
}

.eag-consent-text.eag-has-tip:hover .eag-consent-tip,
.eag-consent-text.eag-has-tip:focus-within .eag-consent-tip {
	opacity: 1;
	visibility: visible;
}

/* Enlace Si ya estás registrado... */
.eag-registro-login-link {
	margin: 24px 0;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #475569;
}

.eag-registro-login-link a {
	color: var(--eag-color-emprende-dark);
	text-decoration: underline;
}

/* Aviso bajo campo Correo */
.eag-registro-email-notice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0 8px;
	padding: 10px 12px;
	border: 1px solid rgb(215, 227, 255);
	background: rgb(243, 247, 255);
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--eag-info-text);
}

.eag-registro-email-notice-icon {
	flex: 0 0 auto;
	line-height: 1.25;
}

.eag-registro-email-notice a {
	color: var(--eag-info-text);
	text-decoration: underline;
}

/* Resumen de condiciones tras los datos de facturación */
.eag-registro-paynotice {
	margin: 0 0 18px;
	padding: 18px 20px;
	background: #f4faf6;
	border: 1px solid #cde9d7;
	border-radius: 14px;
}

.eag-registro-paynotice-content {
	font-size: 14px;
	line-height: 1.55;
	color: #3a4a42;
}

.eag-paynotice-title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 900;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--eag-color-emprende-dark);
}

/* Cada sección es una cláusula independiente; el filete superior la separa. */
.eag-paynotice-sec {
	margin: 14px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--eag-paynotice-rule);
}

.eag-paynotice-sec h4 {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 800;
	color: #13231a;
}

.eag-paynotice-sec p {
	margin: 0 0 6px;
}

/* Viñetas */
.eag-paynotice-bullets {
	margin: 8px 0 0;
	padding-left: 18px;
	list-style: none;
}

.eag-paynotice-bullets li {
	position: relative;
	margin: 0 0 6px;
}

.eag-paynotice-bullets li::before {
	content: "";
	position: absolute;
	left: -14px;
	top: .55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--eag-color-emprende-2);
}

.eag-paynotice-foot {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--eag-paynotice-rule);
	font-size: 13px;
	color: #5a6b61;
	text-align: center;
}
