/* Formulario JVFD (frontend) */

.jvfd-form {
	--jvfd-accent: var(--wp--preset--color--primary, currentColor);
	--jvfd-radius: 14px;
	--jvfd-border: color-mix(in srgb, currentColor 18%, transparent);
	--jvfd-surface: color-mix(in srgb, currentColor 3%, transparent);
	--jvfd-surface-2: color-mix(in srgb, currentColor 6%, transparent);
	--jvfd-ring: color-mix(in srgb, var(--jvfd-accent) 35%, transparent);

	width: 100%;
	max-width: 560px;
	padding: 20px;
	border: 1px solid var(--jvfd-border);
	border-radius: var(--jvfd-radius);
	background: var(--jvfd-surface);
	backdrop-filter: blur(6px);
}

.jvfd-title {
	margin: 0 0 14px;
	line-height: 1.2;
}

.jvfd-feedback {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--jvfd-border);
	background: var(--jvfd-surface-2);
}

.jvfd-success {
	border-left: 4px solid var(--jvfd-border);
}

.jvfd-error {
	border-left: 4px dashed var(--jvfd-border);
}

.jvfd-form__form {
	display: grid;
	gap: 14px;
}

.jvfd-field {
	display: grid;
	gap: 6px;
}

.jvfd-label {
	font-weight: 600;
}

.jvfd-input,
.jvfd-textarea {
	width: 100%;
	padding: 11px 12px;
	border-radius: 12px;
	border: 1px solid var(--jvfd-border);
	background: rgba(0, 0, 0, 0.01);
	transition: box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.jvfd-textarea {
	min-height: 120px;
	resize: vertical;
}

.jvfd-input:focus,
.jvfd-textarea:focus {
	outline: none;
	border-color: var(--jvfd-ring);
	box-shadow: 0 0 0 3px var(--jvfd-ring);
	background: rgba(0, 0, 0, 0);
}

/* Elementor suele sobreescribir inputs; esto fuerza nuestras reglas sin depender del tema */
.elementor-widget-container .jvfd-form .jvfd-input,
.elementor-widget-container .jvfd-form .jvfd-textarea {
	width: 100%;
	border-radius: 12px;
}

.elementor-widget-container .jvfd-form .jvfd-button {
	border-radius: 999px;
}

.jvfd-actions {
	display: flex;
	justify-content: flex-end;
}

.jvfd-button {
	appearance: none;
	border: 1px solid color-mix(in srgb, var(--jvfd-accent) 55%, transparent);
	background: var(--jvfd-accent);
	color: #fff;
	padding: 10px 14px;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 80ms ease, filter 120ms ease;
}

.jvfd-button:hover {
	filter: brightness(1.02);
}

.jvfd-button:active {
	transform: translateY(1px);
}

@media (max-width: 600px) {
	.jvfd-form {
		padding: 16px;
		border-radius: 12px;
	}
}
