/* FFE Connect - Estilos para Contact Form 7 */

.ffe-form-container {
	max-width: 700px;
	margin: 0 auto;
	background: white;
	border-radius: 16px;
	padding: 40px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	border: 1px solid #e9ecef;
}

.ffe-form-header {
	text-align: center;
	margin-bottom: 35px;
	padding-bottom: 25px;
	border-bottom: 2px solid #f8f9fa;
}

.ffe-form-header h3 {
	color: #2c3e50;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 12px 0;
	letter-spacing: -0.5px;
}

.ffe-form-header p {
	color: #6c757d;
	font-size: 16px;
	margin: 0;
	line-height: 1.5;
}

/* Secciones del formulario */
.ffe-inscription-form .ffe-form-section {
	margin-bottom: 30px;
	padding: 25px;
	background: #f8f9fa;
	border-radius: 12px;
	border-left: 4px solid #007cba;
}

.ffe-inscription-form .ffe-form-section:last-of-type {
	background: transparent;
	padding: 20px 0;
	border: none;
}

.ffe-section-title {
	color: #2c3e50;
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 20px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ffe-form-row {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

.ffe-form-row:last-child {
	margin-bottom: 0;
}

.ffe-form-field {
	flex: 1;
}

.ffe-form-field-half {
	flex: 0 0 calc(50% - 10px);
}

.ffe-form-field label {
	display: block;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 6px;
	font-size: 15px;
	letter-spacing: 0.3px;
}

.ffe-form-field input[type='text'],
.ffe-form-field input[type='email'],
.ffe-form-field input[type='tel'],
.ffe-form-field select {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid #dee2e6;
	border-radius: 10px;
	font-size: 15px;
	transition: all 0.3s ease;
	background: white;
	box-sizing: border-box;
	font-family: inherit;
}

.ffe-form-field input[type='text']:focus,
.ffe-form-field input[type='email']:focus,
.ffe-form-field input[type='tel']:focus,
.ffe-form-field select:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.15);
	transform: translateY(-1px);
}

.ffe-form-field input[type='text']:hover,
.ffe-form-field input[type='email']:hover,
.ffe-form-field input[type='tel']:hover,
.ffe-form-field select:hover {
	border-color: #adb5bd;
}

.ffe-form-field select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 16px center;
	background-repeat: no-repeat;
	background-size: 16px;
	padding-right: 50px;
}

/* Checkbox de política de privacidad */
.ffe-checkbox-field {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 10px;
	border: 1px solid #dee2e6;
}

.ffe-checkbox-field .wpcf7-acceptance {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 14px;
	line-height: 1.6;
	color: #495057;
}

.ffe-checkbox-field input[type='checkbox'] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #007cba;
	cursor: pointer;
}

.ffe-checkbox-field a {
	color: #007cba;
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.ffe-checkbox-field a:hover {
	border-bottom-color: #007cba;
}

/* Botón de envío */
.ffe-form-submit-section {
	text-align: center;
	margin-top: 35px;
	padding-top: 25px;
	border-top: 1px solid #dee2e6;
}

.ffe-submit-btn {
	background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
	color: white;
	border: none;
	padding: 16px 40px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
	letter-spacing: 0.5px;
	min-width: 200px;
}

.ffe-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
	background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

.ffe-submit-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(0, 124, 186, 0.3);
}

/* Estilos para mensajes de respuesta */
.wpcf7-response-output {
	margin: 20px 0 0 0;
	padding: 15px;
	border-radius: 10px;
	font-weight: 500;
	text-align: center;
}

/* Estilos para errores de validación */
.wpcf7-not-valid {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
	background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
	color: #721c24;
	padding: 15px;
	border-radius: 10px;
	border: 1px solid #f5c6cb;
	margin: 15px 0;
	font-weight: 500;
}

.wpcf7-mail-sent-ok {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	color: #155724;
	padding: 15px;
	border-radius: 10px;
	border: 1px solid #c6e2d1;
	margin: 15px 0;
	font-weight: 500;
}

.wpcf7-spam-blocked {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	color: #856404;
	padding: 15px;
	border-radius: 10px;
	border: 1px solid #ffeaa7;
	margin: 15px 0;
	font-weight: 500;
}

/* Estilos para modo preview de Elementor */
.ffe-elementor-preview {
	background: #f1f3f4;
	border: 2px dashed #a4afb7;
	padding: 20px;
	text-align: center;
	border-radius: 8px;
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ffe-elementor-preview h3 {
	margin: 0 0 10px 0;
	color: #23282d;
	font-size: 18px;
}

.ffe-elementor-preview p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

.ffe-elementor-preview small {
	color: #999;
	font-size: 12px;
	display: block;
	margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
	.ffe-form-container {
		padding: 25px 20px;
		margin: 10px;
		border-radius: 12px;
	}

	.ffe-inscription-form .ffe-form-section {
		padding: 20px;
		margin-bottom: 25px;
	}

	.ffe-form-row {
		flex-direction: column;
		gap: 0;
	}

	.ffe-form-field-half {
		flex: 1;
		margin-bottom: 20px;
	}

	.ffe-form-header h3 {
		font-size: 24px;
	}

	.ffe-section-title {
		font-size: 16px;
	}

	.ffe-submit-btn {
		width: 100%;
		min-width: auto;
		padding: 14px 30px;
	}

	.ffe-checkbox-field {
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.ffe-form-container {
		padding: 20px 15px;
	}

	.ffe-inscription-form .ffe-form-section {
		padding: 15px;
	}

	.ffe-form-header h3 {
		font-size: 22px;
	}
}

/* Loading state */
.wpcf7-form.submitting .ffe-submit-btn {
	opacity: 0.7;
	cursor: not-allowed;
	pointer-events: none;
}

.wpcf7-form.submitting .ffe-submit-btn:after {
	content: ' ⏳';
}

/* Course field highlight when pre-selected */
.ffe-course-select.preselected {
	background-color: #e8f4fd;
	border-color: #007cba;
}

/* Estilos para campos dependientes */
.ffe-form-field.disabled {
	opacity: 0.6;
	transition: opacity 0.3s ease;
}

.ffe-form-field.disabled label {
	color: #6c757d !important;
}

.ffe-form-field.disabled select {
	background-color: #f8f9fa !important;
	cursor: not-allowed !important;
	color: #6c757d !important;
}

.ffe-form-field.disabled select:disabled {
	border-color: #dee2e6 !important;
}

/* Animación suave cuando se habilita un campo */
.ffe-form-field:not(.disabled) {
	transition: opacity 0.3s ease;
}

/* Indicador visual de dependencia */
.ffe-comunidad-select:focus + .ffe-form-field .ffe-provincia-select {
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Validación y estados de error */
.ffe-field-error {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.ffe-field-error label {
	color: #dc3545 !important;
}

.ffe-invalid {
	border-color: #dc3545 !important;
	background-color: #fff5f5 !important;
}

.ffe-custom-error {
	animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mejorar visibilidad de campos obligatorios */
.ffe-form-field label::after {
	content: ' *';
	color: #dc3545;
	font-weight: bold;
}

.ffe-form-field label[for='acepto_terminos']::after,
.ffe-form-field label[for='acepto_privacidad']::after {
	content: '';
}

/* Estados de campos select */
select:invalid,
select[required]:invalid {
	color: #6c757d;
}

select:valid,
select[required]:valid {
	color: #212529;
}

/* Placeholder para selects */
select option:first-child {
	color: #6c757d;
	font-style: italic;
}
